true when either but not both inputs are true From Wikipedia, the free encyclopedia
Exclusive disjunction (also called exclusive or, XOR) is a logic operation on two values. It is often represented by the symbol (or ).[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]
Venn diagram of |
Venn diagram of |
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]
The truth table of (also written as , ,[1] or ) is as follows:[2]
p | q | ⊕ |
---|---|---|
F | F | F |
F | T | T |
T | F | T |
T | T | F |
Seamless Wikipedia browsing. On steroids.
Every time you click a link to Wikipedia, Wiktionary or Wikiquote in your browser's search results, it will show the modern Wikiwand interface.
Wikiwand extension is a five stars, simple, with minimum permission required to keep your browsing private, safe and transparent.