Definition:Exclusive Or

From ProofWiki
Jump to navigation Jump to search


Exclusive or is a binary connective which can be written symbolically as $p \oplus q$ whose behaviour is as follows:

$p \oplus q$


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:

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$


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.