# Exclusive disjunction

 Venn diagram of ${\displaystyle \scriptstyle A\oplus B}$ but not is Venn diagram of ${\displaystyle \scriptstyle A\oplus B\oplus C}$ ${\displaystyle ~\oplus ~}$ ${\displaystyle ~\Leftrightarrow ~}$

Exclusive disjunction (also called exclusive or, XOR) is a logic operation on two values. It is often represented by the symbol ${\displaystyle \veebar }$ (or ${\displaystyle \oplus }$).[1] It will be true, if exactly one of the two values is true. Otherwise, it will be false. This also means that the result of 'XOR' will be true precisely both the values are different. Same values will result in a false.[2]

The best way to remember a XOR operation is: "One or the other, but not both".

Because of that, this is different from inclusive disjunction.[3]

## Truth table

The truth table of ${\displaystyle p\,\mathrm {XOR} \,q}$ (also written as ${\displaystyle p\oplus q}$, ${\displaystyle p\veebar q}$,[1] or ${\displaystyle p\neq q}$) is as follows:[2]

p q
F F F
F T T
T F T
T T F

## References

1. "Comprehensive List of Logic Symbols". Math Vault. 2020-04-06. Retrieved 2020-09-03.
2. Weisstein, Eric W. "XOR". mathworld.wolfram.com. Retrieved 2020-09-03.
3. "Disjunction | logic". Encyclopedia Britannica. Retrieved 2020-09-03.