Purpose |
The XOR operator works as both a logical and a bitwise arithmetic operator. | ||||||||||||||||||
Syntax |
p XOR q | ||||||||||||||||||
Remarks |
XOR as a logical operator XOR returns FALSE (zero) if and only if both its operands have the same value. Here is XOR's truth table:
Using XOR as a bitwise arithmetic operatorAn XOR mask complements (reverses)
selected bits of an
| ||||||||||||||||||
See also |