Function Reference


BitXOR

Performs a bitwise exclusive OR (XOR) operation.

BitXOR ( value1, value2 [, value n] )

Parameters

value1 The first number.
value2 The second number.
value n [optional] The nth number - up to 255 values can be specified.

Return Value

Returns the value of the parameters bitwise-XOR'ed together.
Bit operations are performed as 32-bit integers.

Remarks

Remember hex notation can be used for numbers.
BitXOR returns 1 in a bit position if there are an odd number of 1's in the corresponding bit position in all the input arguments, and 0 otherwise.

Related

BitAND, BitNOT, BitOR, BitShift, Hex, BitRotate

Example


Local $x = BitXOR(10, 6) ;x == 12 because 1010b XOR 0110b == 1100

$x = BitXOR(2, 3, 6) ;x == 7 because 0010 XOR 0011 XOR 0110 = 0111