is the logical XOR (exclusive OR) function. It gives True if an odd number of the are True, and the rest are False. It gives False if an even number of the are True, and the rest are False.
- Xor[e1,e2,…] can be input in StandardForm and InputForm as . 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.
Examplesopen allclose all
Basic Examples (2)
Enter using xor:
Find the Xor of two regions in 2D:
Find the Xor of three regions in 3D:
A cellular automaton based on Xor:
Find the area of the symmetric difference of sets given by algebraic conditions:
This shows the set:
Properties & Relations (3)
Neat Examples (2)
The Xor of disks on a circle:
Generate three disks on a circle:
A truth table for a 12-variable Xor function:
Introduced in 1988
Updated in 2003