The bitwise XOR operator (^) performs a bitwise XOR on two expressions. Usage:
result = expression1 ^ expression2
where result is any variable.
expression1 is any expression.
expression2 is any expression.
Bitwise XOR operator description
^ operator looks at the binary representation of the values of two expressions and performs a bitwise XOR. The result of this operation is as follows:
0101 (expression1)
1100 (expression2)
----
1001 (result)
if and only if only When a bit of an expression is 1, the result will be 1. Otherwise this bit of the result is 0.