Drop Down MenusCSS Drop Down MenuPure CSS Dropdown Menu

Monday, March 16, 2015

What is bitwise Ex-OR operator ?

The bitwise Exclusive OR (EX-OR) operator (^) is a bitwise logical operator. It is represent by caret (^) symbol. It works with two operands I.e. it is a binary operator. The comparison of bits started from the least significant bit. It works with operands bit by bit.

The result of bitwise Exclusive OR operator is 0 (zero) when both bits has same values i.e. both bits has either 0 (zero) or 1. The result of bitwise Exclusive OR operator is 1 (one) when both bits have different values. The operation table of bitwise Exclusive OR (^) operator is as follow:
Operand A
Operand B
Result ( A ^ B )
0
0
0
0
1
1
1
0
1
1
1
0

The precedence of bitwise Exclusive OR operator is lower than the relational operator so additional parentheses are necessary.


No comments:

Post a Comment