Funktionsreferenz

BitXOR

Performs a bitwise exclusive OR (XOR) operation.

BitXOR ( value1, value2 [, value n] )

 

Parameter

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

 

Bemerkungen

Remember hex notation can be used for numbers.
Remember that XOR returns 1 if exactly one bit is 1 and Gibt 0 zurück. otherwise.

 

Siehe auch

BitAND, BitNOT, BitOR, BitShift, Hex

 

Beispiel


$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