The Bitwise Logical Operators
The bitwise logical operators are &, ^, |and ~. The given table displays the outcome of every operation. Within the discussion which follows, remember that the bitwise operators are applied to each individual bit inside each operand.
A B A|B A&B A^B ~A
0 0 0 0 0 1
1 0 1 0 1 0
0 1 1 0 1 1
1 1 1 1 0 0