Skip to main content
Engineering LibreTexts

1.1.8: Exclusive or

  • Page ID
  • \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \) \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)\(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\) \(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\)

    Finally, we turn to the exclusive or operator. The English word ‘or’ is actually somewhat ambiguous. The two operators ⊕ and ∨ express the two possible meanings of this word. The proposition p q can be expressed unambiguously as “p or q, or both”, while p q stands for “p or q, but not both”. If a menu says that you can choose soup or salad, it doesn’t mean that you can have both. In this case, ‘or’ is an exclusive or. On the other hand, in “You are at risk of heart disease if you smoke or drink”, the or is inclusive since you certainly don’t get off the hook if you both smoke and drink. In theoretical computer science and mathematics, the word ‘or’ is always taken in the inclusive sense of p q.

    1.1.8: Exclusive or is shared under a not declared license and was authored, remixed, and/or curated by LibreTexts.

    • Was this article helpful?