Maths in a minute: Truth tables

In standard mathematical logic every statement — "the cat is white", "the dog is black", "I am hungry" — is considered to be either true or false. Given two statements P and Q, you can make more complicated statements using logical connectives such as AND and OR.

For example, the statement P AND Q (eg "the cat is white and the dog is black") is only considered true if both P and Q are true, otherwise it is false. This can be summarised in a truth table:

PQP AND Q
TTT
TFF
FTF
FFF

The table lists every combination of truth values for P and Q and then tells you what the corresponding truth value for P AND Q is.

Similarly, the OR connective is defined by the following table:

PQP OR Q
TTT
TFT
FTT
FFF

There is also a truth table that defines NOT P, the negation of a statement P (if P is "the cat is white" then NOT P is "the cat is not white"). Unsurprisingly, NOT P is true when P is false and vice versa:

PNOT P
TF
FT

Using the OR and the NOT operators, we can derive the law of the excluded middle, which says that P OR NOT P is always true:

PNOT PP OR NOT P
TFT
FTT

Using truth tables you can figure out how the truth values of more complex statements, such as

P AND (Q OR NOT R)

depend on the truth values of its components. We have filled in part of the truth table for our example below, and leave it up to you to fill in the rest.

PQRNOT RQ OR NOT R P AND (Q OR NOT R)
TTTFT
TTFTT
TFTFF
FTTFT
TFFTT
FTFTT
FFTFF
FFFTT

If you have enjoyed doing this, you could also define your own logical connectives using truth tables. Or you could read a text book on Boolean logic or propositional logic.


About this article

Marianne Freiberger is Editor of Plus.

FQXi logo

This article is part of our Who's watching? The physics of observers project, run in collaboration with FQXi. Click here to see more articles about constructivism.