The bitwise XOR "^" operator produces 1 if both of the bits in its operands are different. However, if both of the bits are same then this operator produces 0. Moreover if both of the bits are 1 i.e. 1^1 then also it produces 1.
WRONG!!! It should be: Moreover if both of the bits are 1 i.e. 1^1 then also it produces 0.