2 mathematical and logical operators, 3 general operator rules, 4 operator details – ElmoMC SimplIQ Software Manual User Manual
Page 34: 5 mathematical functions, 6 exclusive or operation, Mathematical and logical operators -5, General operator rules -5, Operator details -5, Mathematical functions -5, Exclusive or operation -5
![background image](/manuals/558389/34/background.png)
SimplIQ
Software Manual
4BThe
SimplIQ
User Programming Language
MAN-SIMSW (Ver. 1.4)
5-5
5.4.2
Mathematical and Logical Operators
The description and syntax is the same as for the Interpreter language (refer to
section
5.4.3
General Operator Rules
The description and syntax is the same as for the Interpreter language (refer to
section
5.4.4
Operator Details
The description and syntax is the same as for the Interpreter language (refer to
section
5.4.5
Mathematical Functions
The description and syntax is the same as for the Interpreter language (refer to
section
5.4.6
Exclusive OR Operation
The exclusive OR is a function that can be operated only from a user program; it returns an
XR value out of two arguments, which are interpreted as integers.
Example:
XOR(170,75)
is interpreted as follows:
The binary representation of 170 (a int_value) is 0000 0000 1010 1010. The binary
representation of 75 (b int_value) is 0000 0000 0100 1011. Performing the bitwise exclusive
OR operation on these two values gives the binary result 000 000 1110 0001, which is
decimal 225:
XOR(a,b)
0000 0000 1010
1010
0000 0000 0100
1011
0000 0000 1110 0001
The exclusive OR between the binary bit representation of two integers returns 0 if both
integers are identical; otherwise, it returns 1.
Syntax:
z = XOR(x,y)
where z is the result of an exclusive OR operation between x and y.
Notes:
This operation is valid only in the user program; it is not valid through the
Interpreter.