Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Exclusive or
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{short description|True when either but not both inputs are true}} {{Redirect|XOR|the logic gate|XOR gate|other uses|XOR (disambiguation)}} {{refimprove|date=May 2013}} {{Infobox logical connective | title = Exclusive disjunction | other titles = XOR | Venn diagram = Venn0110.svg | wikifunction = Z10237 | definition = | truth table = <math>(0110)</math> | logic gate = XOR_ANSI.svg | DNF = <math>\overline{x} \cdot y + x \cdot \overline{y}</math> | CNF = <math>( \overline{x} + \overline{y} ) \cdot ( x + y )</math> | Zhegalkin = <math>x \oplus y </math> | 0-preserving = yes | 1-preserving = no | monotone = no | affine = yes | self-dual = no }} {{Logical connectives sidebar}} [[File:Venn 0110 1001.svg|220px|[[Venn diagram]] of <math>A \oplus B \oplus C</math>|thumb|right]] '''Exclusive or''', '''exclusive disjunction''', '''exclusive alternation''', '''logical non-equivalence''', or [[Logical_equality#Inequality|logical inequality]] is a [[Logical connective|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 [[Parity (mathematics)|odd]].<ref name=wolfram>{{cite web|last1=Germundsson|first1=Roger|last2=Weisstein|first2=Eric|title=XOR|url=http://mathworld.wolfram.com/XOR.html|website=[[MathWorld]]|publisher=[[Wolfram Research]]|access-date=17 June 2015}}</ref> It gains the name "exclusive or" because the meaning of "or" is ambiguous when both [[operand]]s 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 [[Table of logic symbols|symbolized]] by the prefix operator <math>J</math><ref name="Bochenski1949">{{cite book |last1=Bocheński |first1=J. M. |title=Précis de logique mathématique |url=https://burjcdigital.urjc.es/bitstream/handle/10115/1425/PRECIS_DE_LOGIQUE_MATHEMATIQUE.pdf?sequence=1&isAllowed=y |date=1949 |location=The Netherlands |publisher=F. G. Kroonder, Bussum, Pays-Bas |language=French}} Translated as {{cite book |last1=Bocheński |first1=J. M. |translator-last=Bird |translator-first=O. |title=A Precis of Mathematical Logic |date=1959 |publisher=D. Reidel Publishing Company |url=https://archive.org/details/precisofmathemat0000boch/ |url-access=limited |doi=10.1007/978-94-017-0592-9 |location=Dordrecht, Holland|isbn=978-90-481-8329-6 }}</ref>{{rp|page=16}} and by the [[infix operator]]s '''XOR''' ({{IPAc-en|ˌ|ɛ|k|s|_|ˈ|ɔ:|r}}, {{IPAc-en|ˌ|ɛ|k|s|_|ˈ|ɔ:}}, {{IPAc-en|'|k|s|ɔ:|r}} or {{IPAc-en|'|k|s|ɔ:}}), '''EOR''', '''EXOR''', <math>\dot{\vee}</math>, <math>\overline{\vee}</math>, <math>\underline{\vee}</math>, '''<span style="font-size:120%;">⩛</span>''', <math>\oplus</math>, <math>\nleftrightarrow</math>, and <math>\not\equiv</math>.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)