In Computing a Truth Value you found a formula's value in one row. A truth table does that for every possible row at once, so you can see everything a formula can do.
Key idea
Why it works
| $p$ | $q$ | $r$ |
|---|---|---|
| T | T | T |
| T | T | F |
| T | F | T |
| T | F | F |
| F | T | T |
| F | T | F |
| F | F | T |
| F | F | F |
Worked examples
Worked example: How many rows?
- Count the different letters: $p$, $q$, $r$. Repeats of $p$ do not count again.
- $2^3 = 8$.
Answer: 8 rows
Worked example: Build a small table
- Rows: TT, TF, FT, FF.
- Column $\neg q$: F, T, F, T.
- Column $p \to \neg q$: T→F is F; T→T is T; F→F is T; F→T is T.
Answer: F, T, T, T
Worked example: Read a value
- $q$ runs in blocks of 2: T T F F T T F F.
- Rows 5 and 6 make up the third block of two, and that block is T T.
Answer: T
Common mistake
- Count the letters and write $2^n$ rows in the standard order.
- Add a column for each part, from the smallest outward.
- Fill each column from the columns it depends on.
- The last column, under the main connective, is the answer.
Truth tables can grow large, but they never fail: a table always answers the question it is asked. That is why the next topics use them to decide whether a formula is always true, whether two formulas agree, and whether an argument is valid.