-1
$\begingroup$

In terms of logic and truth tables why is it that the truth table for exclusive or is as follows:

Consider $P$ and $Q$. Let $P + Q$ denote exclusive or. Then if $P$ and $Q$ are both true or are both false then $P + Q$ is false. If one of them is true and one of them is false then $P + Q$ is true. By exclusive or I mean $P$ or $Q$ but not both. I have been trying to figure out why the truth table is the way it is. For example if $P$ is true and $Q$ is true then no matter what would it be true?

$\endgroup$
  • 1
    $\begingroup$ That's the definition of exclusive or: either one or the other, but not both. $\endgroup$ – Shady_arc May 21 '14 at 15:47
  • $\begingroup$ You said it yourself: if $P$ and $Q$ are both true, then $P+Q$ is false... $\endgroup$ – fkraiem May 21 '14 at 15:47
  • 2
    $\begingroup$ It seems that you understand everything that you want to understand, you just don't understand that you understand it. $\endgroup$ – Asaf Karagila May 21 '14 at 15:49
  • $\begingroup$ Exclusive or captures some of the ways we use the word or. For example, "I either stay home or go out", but I can't have both. $\endgroup$ – Rui Baptista May 23 '14 at 13:08
0
$\begingroup$

The exclusive or operation (often xor, also known as either-or) only produces a true value if exactly one of the two statements is true; therefore, it has to be the case that either $P \wedge -Q$ or $-P \wedge Q$ (that is, either $P$ is true and $Q$ is false or $P$ is false and $Q$ is true).

If $P\vee Q$, that is, if $P$ and $Q$ are both true, then $P\wedge Q$ - $P$ or $Q$ - is true, because at least one of $P,Q$ is true, but this is the or operation, not the xor (exclusive or) operation.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.