# Exclusive or

#### Dear Wikiwand AI, let's keep it short by simply answering these key questions:

Can you list the top facts and stats about Exclusive disjunction?

SHOW ALL QUESTIONS

Exclusive or or exclusive disjunction or exclusive alternation, also known as non-equivalence which is the negation of equivalence, is a logical operation that is true if and only if its arguments differ (one is true, the other is false).[1]

Quick facts: XOR, Truth table, Logic gate, Normal forms, D...
Exclusive or
XOR
Truth table${\displaystyle (0110)}$
Logic gate
Normal forms
Disjunctive${\displaystyle {\overline {x}}\cdot y+x\cdot {\overline {y}}}$
Conjunctive${\displaystyle ({\overline {x}}+{\overline {y}})\cdot (x+y)}$
Zhegalkin polynomial${\displaystyle x\oplus y}$
Post's lattices
0-preservingyes
1-preservingno
Monotoneno
Affineyes
Close

It is symbolized by the prefix operator ${\displaystyle J}$[2]:16 and by the infix operators XOR (/ˌɛks ˈɔːr/, /ˌɛks ˈɔː/, /ˈksɔːr/ or /ˈksɔː/), EOR, EXOR, ${\displaystyle {\dot {\vee }}}$, ${\displaystyle {\overline {\vee }}}$, ${\displaystyle {\underline {\vee }}}$, , ${\displaystyle \oplus }$, ${\displaystyle \nleftrightarrow }$ and ${\displaystyle \not \equiv }$.

It gains the name "exclusive or" because the meaning of "or" is ambiguous when both operands are true; the exclusive or operator excludes that case. This is sometimes thought of as "one or the other but not both" or "either one or the other". This could be written as "A or B, but not, A and B".

XOR is equivalent to logical inequality (NEQ) since it is true only when the inputs are different (one is true, and one is false). The negation of XOR is the logical biconditional, which yields true if and only if the two inputs are the same, which is equivalent to logical equality (EQ).

Since it is associative, it may be considered to be an n-ary operator which is true if and only if an odd number of arguments are true. That is, a XOR b XOR ... may be treated as XOR(a,b,...).