Exclusive or between two bits means that the result is 1 if one and only one bit is 1.
The truth table is:
| 0 | 1
---+---+---
0 | 0 | 1
1 | 1 | 0
When you talk about xoring a larger value, it's just taking each bit one at a time, so:
1111 0000
xor 1010 1010
---- ----
= 0101 1010
For what it's worth, a full list of binary operations:
and
, 1 only if both its inputs are 1, else 0.
or
, 0 only if both its inputs are 0, else 1.
xor
, 1 only if one (not both) of its inputs is 1, else 0.
not
, 1 only if its input is 0, else 1.
And the truth tables:
and| 0 | 1 or| 0 | 1 xor| 0 | 1 not| 0 | 1
---+---+--- ---+---+--- ---+---+--- ---+---+---
0 | 0 | 0 0 | 0 | 1 0 | 0 | 1 | 1 | 0
1 | 0 | 1 1 | 1 | 1 1 | 1 | 0