Thursday, November 14, 2013

Bitwise operator ^ (XOR)

The bitwise operator ^ (XOR) which is also called exclusive or, is used as shown in the chart.

^   0   1
0   1   0
1   0   1

So as we can see the bit1^bit2 equals to 1 if bit1=bit2 else it equals to 0.

No comments:

Post a Comment