exclusive or logic truth table - not understanding why it is the way it is

459 Views Asked by At

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?

1

There are 1 best solutions below

0
On

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.