XOR
Is a bitwise operation defined by the truth-table:
A | B | \( A \oplus B \) |
---|---|---|
0 | 0 | 0 |
1 | 0 | 1 |
0 | 1 | 1 |
1 | 1 | 0 |
From the above you can observe that an XOR is equivalent to: \[ A \xor B = (A \lor B) \land \neg (A \land B) \]
We can also observe the cancellation property: \[ A \xor B \xor B = A \] Which can be extended as the negation rule: \[ A \xor B = C \rightarrow A \xor B \xor C = 0 \]