Xor

Xor[e1,e2,]

is the logical XOR (exclusive OR) function. It gives True if an odd number of the e_(i) are True, and the rest are False. It gives False if an even number of the e_(i) are True, and the rest are False.

Details

  • Xor[e1,e2,] can be input in StandardForm and InputForm as e_(1) xor e_(2) xor .... The character can be entered as xor or \[Xor].
  • Xor gives symbolic results when necessary, applying various simplification rules to them.
  • Unlike And, Nand, Or, and Nor, Xor must always test all its arguments, and so is not a control structure, and does not have attribute HoldAll.

Examples

open allclose all

Basic Examples  (2)

In[1]:=
Click for copyable input
Out[1]=
In[2]:=
Click for copyable input
Out[2]=

Enter using xor:

In[1]:=
Click for copyable input
Out[1]=

Scope  (4)

Applications  (3)

Properties & Relations  (3)

Neat Examples  (2)

See Also

LogicalExpand  Mod  BitXor  Xnor  Nor  Or  BooleanCountingFunction

Tutorials

Introduced in 1988
(1.0)
| Updated in 2003
(5.0)