Bitwise XOR¶
Bitwise XOR operator (^
) can be used to perform binary XOR operation on two numbers.
Syntax
operand1 ^ operand2
Example
a ^ b
1 ^ 0
# 1
1 ^ 1
# 0
4 ^ 2
# 6