This is the “xor” (exclusive or)
operator and is denoted as ^ (caret). Given below all the bitwise
operators.
& (ampersand) – bitwise
conjunction
| (bar) – bitwise disjunction
~ (tilde) – bitwise negation
^ (caret) – bitwise exclusive (xor)
Given below the truth table.
The arguments of these operators must be integers. We must not use floats here.
The logical operators don’t penetrate
into the bit level of its argument. They’re only interested in the final
integer value.
These operators can be used in
abbreviated form.
No comments:
Post a Comment