Definition:Exclusive Or
Definition
Exclusive or is a binary connective which can be written symbolically as $p \oplus q$ whose behaviour is as follows:
- $p \oplus q$
means:
- Either $p$ is true or $q$ is true but not both.
or symbolically:
- $p \oplus q := \paren {p \lor q} \land \neg \paren {p \land q}$
where $\land$ denotes the and operator and $\lor$ denotes the or operator.
There is no standard symbol for this, but the one shown above is seen commonly enough to be adopted as standard for this site.
Truth Function
The exclusive or connective defines the truth function $f^\oplus$ as follows:
\(\ds \map {f^\oplus} {\F, \F}\) | \(=\) | \(\ds \F\) | ||||||||||||
\(\ds \map {f^\oplus} {\F, \T}\) | \(=\) | \(\ds \T\) | ||||||||||||
\(\ds \map {f^\oplus} {\T, \F}\) | \(=\) | \(\ds \T\) | ||||||||||||
\(\ds \map {f^\oplus} {\T, \T}\) | \(=\) | \(\ds \F\) |
Truth Table
The characteristic truth table of the exclusive or operator $p \oplus q$ is as follows:
- $\begin{array}{|cc||c|} \hline p & q & p \oplus q \\ \hline \F & \F & \F \\ \F & \T & \T \\ \T & \F & \T \\ \T & \T & \F \\ \hline \end{array}$
Boolean Interpretation
The truth value of $\mathbf A \oplus \mathbf B$ under a boolean interpretation $v$ is given by:
- $v \left({\mathbf A \oplus \mathbf B}\right) = \begin{cases}
F & : v \left({\mathbf A}\right) = v \left({\mathbf B}\right) \\ T & : \text{otherwise} \end{cases}$
Semantics of Exclusive Or
The exclusive disjunction is used to represent any statement in natural language such that exactly one of two substatements are held to be true.
Thus $p \oplus q$ can be interpreted as:
- $p$ or $q$, but not both
- Either $p$ or $q$.
Notational Variants
Various symbols are encountered that denote the concept of exclusive or:
Symbol | Origin | Known as |
---|---|---|
$p \oplus q$ | sometimes called o-plus | |
$p\ \mathsf{XOR} \ q$ | ||
$p + q$ | ||
$p \not \Leftrightarrow q$ | ||
$p \not \equiv q$ | ||
$p \ne q$ | ||
$p \ \dot \lor \ q$ | ||
$p \ \_ \lor \ q$ |
Also known as
This usage of or, that disallows the case where both disjuncts are true, is also called:
- exclusive disjunction
- logical inequality
- non-equivalence
- symmetric difference
- the alternative function
- aut (from the Latin), pronounced out.
Some sources refer to this as the strong or, where the weak or is used in the sense of the inclusive or.
In natural language, when it is necessary to be precise about the nature of the term being used, the phrase but not both is often employed.
Some sources give the symbol as $\underline \lor$ or $\not \equiv$
Examples
Monday or Not Monday
The following is an example of an exclusive or statement:
- Either today is Monday or today is not Monday.
One of Five Statements is True
Which of the following $5$ statements is true?
- $(1): \quad$ Exactly one of these statements is false.
- $(2): \quad$ Exactly two of these statements are false.
- $(3): \quad$ Exactly three of these statements are false.
- $(4): \quad$ Exactly four of these statements are false.
- $(5): \quad$ Exactly five of these statements are false.
Also see
- Results about exclusive or can be found here.
Sources
- 1946: Alfred Tarski: Introduction to Logic and to the Methodology of Deductive Sciences (2nd ed.) ... (previous) ... (next): $\S \text{II}.7$: Sentential Calculus
- 1959: A.H. Basson and D.J. O'Connor: Introduction to Symbolic Logic (3rd ed.) ... (previous) ... (next): $\S 2.5$: Further Logical Constants
- 1973: Irving M. Copi: Symbolic Logic (4th ed.) ... (previous) ... (next): $2$ Arguments Containing Compound Statements: $2.1$: Simple and Compound Statements
- 1980: D.J. O'Connor and Betty Powell: Elementary Logic ... (previous) ... (next): $\S \text{I}: 12$: Material Equivalence and Alternation
- 1988: Alan G. Hamilton: Logic for Mathematicians (2nd ed.) ... (previous) ... (next): $\S 1$: Informal statement calculus: $\S 1.2$: Truth functions and truth tables: Disjunction: Remark
- 1989: Ephraim J. Borowski and Jonathan M. Borwein: Dictionary of Mathematics ... (previous) ... (next): exclusive disjunction, exclusive or or non-equivalence
- 1993: M. Ben-Ari: Mathematical Logic for Computer Science ... (previous) ... (next): Chapter $2$: Propositional Calculus: $\S 2.1$: Boolean operators
- 1993: Keith Devlin: The Joy of Sets: Fundamentals of Contemporary Set Theory (2nd ed.) ... (previous) ... (next): $\S 1$: Naive Set Theory: $\S 1.1$: What is a Set?: Exercise $1.1.1$
- 1998: David Nelson: The Penguin Dictionary of Mathematics (2nd ed.) ... (previous) ... (next): disjunction (alternation)
- 2000: Michael R.A. Huth and Mark D. Ryan: Logic in Computer Science: Modelling and reasoning about systems ... (previous) ... (next): $\S 1.1$: Declarative sentences (footnote)
- 2000: James R. Munkres: Topology (2nd ed.) ... (previous) ... (next): $1$: Set Theory and Logic: $\S 1$: Fundamental Concepts
- 2008: David Joyner: Adventures in Group Theory (2nd ed.) ... (previous) ... (next): Chapter $1$: Elementary, my dear Watson: $\S 1.1$: You have a logical mind if...
- 2008: David Nelson: The Penguin Dictionary of Mathematics (4th ed.) ... (previous) ... (next): disjunction (alternation)
- 2012: M. Ben-Ari: Mathematical Logic for Computer Science (3rd ed.) ... (previous) ... (next): $\S 2.2.3$
- 2014: Christopher Clapham and James Nicholson: The Concise Oxford Dictionary of Mathematics (5th ed.) ... (previous) ... (next): exclusive disjunction