It has to do with mutual exclusion. xor
is exclusive. or
is inclusive.
Truth Table Comparison
$x $y ($x or $y) ($x xor $y) 0 0 0 0 1 0 1 1 0 1 1 1 1 1 1 0
Note: the difference in the last case. xor
is only true when either $x
or $y
is true, but not both (as the case for or
).