This article needs additional citations for verification. (May 2013) |
XOR | |
---|---|
![]() | |
Truth table | |
Logic gate | ![]() |
Normal forms | |
Disjunctive | |
Conjunctive | |
Zhegalkin polynomial | |
Post's lattices | |
0-preserving | yes |
1-preserving | no |
Monotone | no |
Affine | yes |
Self-dual | no |
Logical connectives | ||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
||||||||||||||||||||||||||
Related concepts | ||||||||||||||||||||||||||
Applications | ||||||||||||||||||||||||||
![]() | ||||||||||||||||||||||||||
Exclusive or, exclusive disjunction, exclusive alternation, logical non-equivalence, or logical inequality is a logical operator whose negation is the logical biconditional. With two inputs, XOR is true if and only if the inputs differ (one is true, one is false). With multiple inputs, XOR is true if and only if the number of true inputs is odd.[1]
It gains the name "exclusive or" because the meaning of "or" is ambiguous when both operands are true. XOR excludes that case. Some informal ways of describing XOR are "one or the other but not both", "either one or the other", and "A or B, but not A and B".
It is symbolized by the prefix operator [2]: 16 and by the infix operators XOR (/ˌɛks ˈɔːr/, /ˌɛks ˈɔː/, /ˈksɔːr/ or /ˈksɔː/), EOR, EXOR, , , , ⩛, , , and .