# 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.
Remember that XOR returns 1 if exactly one bit is 1 and returns 0 otherwise.

Related

BitAND, BitNOT, BitOR, BitShift, Hex

Example

$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