XOR
is short for exclusive or. It is a logical, binary operator that requires that one of the two operands be true but not both.
So these statements are true:
TRUE XOR FALSE
FALSE XOR TRUE
And these statements are false:
FALSE XOR FALSE
TRUE XOR TRUE
There really isn't such a thing as an"exclusive and" (or XAND
) since in theory it would have the same exact requirements as XOR
. There also isn't an XNOT
since NOT
is a unary operator that negates its single operand (basically it just flips a boolean value to its opposite) and as such it cannot support any notion of exclusivity.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…