How does the logical XOR operator work with more than two values?
For example, in an operation such as 1 ^ 3 ^ 7?
0 0 0 1
0 0 1 1
0 1 1 1
__
0 1 0 1
for some reason gives 0 1 0 1, where, as I thought, it should turn out: 0 1 0 0, since XOR is true only if strictly one of the operands is true.
source
share