Exclusive or ( XOR ) is defined as:
0 ^ 0 = 0 1 ^ 0 = 1 0 ^ 1 = 1 1 ^ 1 = 0
That is, it is 0 when two values ββare the same, 1 if they are different.
So, given that the two bit patterns are exactly equal, each XORed bit will be evaluated as 0 , since each bit will either have 1 in both positions, or 0 in both positions.
Yuushi
source share