edubun
English

Truth tables

Three letters give 2 × 2 × 2 = 8 rows, and a truth table writes out every one of them, so no case is left to guesswork.

One row for every possible situation

The connectives from the last two units have a useful property: once you know whether each simple part is true or false, the truth value of the whole compound is fixed. A truth table uses this. It lists every possible combination of truth values for the simple statements, one combination per row, and then works out the value of the compound statement in each row. Nothing about the meaning of the sentences is needed, only the T and F values.

How many rows? Each simple statement can be T or F, so every new letter doubles the count. One letter gives 2 rows, two letters give 4, three give 8, and n letters give 2 to the power n. A table with five letters already has 32 rows, which is why people who use truth tables a lot keep their formulas short. The usual way to write the rows, used in forall x and most textbooks, is to split the first column into a top half of T and a bottom half of F, the second column into quarters, and so on, until the last column alternates T, F, T, F. That pattern guarantees that no combination is missed or repeated.

Working from the inside out

Take the statement (p ∨ q) ∧ ¬r. After the three input columns, add a column for each piece in the order you would work out brackets in arithmetic: first p ∨ q, then ¬r, then the main connective ∧ that joins them. In each row you only ever apply one small rule from the earlier units. The final column is the answer. Here the whole statement is true in 3 of the 8 rows, the ones where r is false and at least one of p and q is true.

The truth table for (p ∨ q) ∧ ¬r. The tinted column is the main connective; the outlined rows are the three where the whole statement is true.

Tautologies, contradictions and equivalence

Some final columns come out all T. The statement p ∨ ¬p (“it is raining or it is not raining”) is true in every row, whatever the weather. A statement like that is called a tautology, or a logical truth. Others come out all F, such as p ∧ ¬p; these are contradictions. Most statements are true in some rows and false in others, and are called contingent: whether they are true depends on how the world is.

Two statements are equivalent when their final columns match row for row. This is how you check De Morgan’s laws or the claim that a conditional matches its contrapositive: build both columns over the same inputs and compare. The table also shows that p → q has the same column as ¬p ∨ q, which is a handy way to rewrite a conditional when a problem only lets you use not, and and or.

BackgroundTruth tables are often credited to Ludwig Wittgenstein, whose Tractatus Logico-Philosophicus appeared in 1921, and to Emil Post, who used them in an article in the American Journal of Mathematics the same year. The history turned out to be older. In 1997 John Shosky reported truth-table grids written on the back of a page of a 1912 typescript of a lecture by Bertrand Russell, with the table for the conditional in Wittgenstein’s hand. The historian Irving Anellis later showed that an unpublished manuscript by the American logician Charles Peirce, dated to 1893, already contains a truth table for the conditional.
  1. How many rows does a truth table with 3 letters have?
  2. How many rows does a truth table with 5 letters have?
  3. Which is a tautology?
    • p ∨ ¬p
    • p ∧ ¬p
    • p → ¬p
  4. p ∧ ¬p is
    • a tautology
    • a contradiction
    • contingent
  5. In how many of the 8 rows is (p ∨ q) ∧ ¬r true?
  6. Which has the same truth table as p → q?
    • ¬p ∨ q
    • p ∨ ¬q
    • ¬p → ¬q
  7. In a 4-letter table written in the usual order, how many T values are in the first column?
  8. Two statements are equivalent when
    • their final columns match in every row
    • they share at least one T row
    • they use the same letters
  9. Put the steps for building a truth table in order.
  10. A statement is true in some rows and false in others. It is
    • contingent
    • a tautology
    • a contradiction
Key points
  • n letters give 2 to the n rows.
  • Fill inputs in the halves, quarters, ... pattern so nothing is missed.
  • Work from the inside out; the main connective column is the answer.
  • All T: tautology. All F: contradiction. Same column: equivalent.
Sources for this course (9)
  • P. D. Magnus, Tim Button, Aaron Thomas-Bolduc, Richard Zach, forall x: Calgary , chapters 1 to 6 on sentences, arguments, validity, soundness, connectives and truth tables (forallx.openlogicproject.org/html/)
  • Stanford Encyclopedia of Philosophy, Robin Smith, "Aristotle's Logic" (plato.stanford.edu/entries/aristotle-logic/)
  • definition of deduction from Prior Analytics I.2 24b18-20, the three figures and the medieval names Barbara and Celarent
  • Aristotle, On Interpretation 17a, E. M. Edghill translation (classics.mit.edu/Aristotle/interpretation.1.1.html)
  • "a prayer is a sentence, but is neither true nor false"
  • Irving H. Anellis, "Peirce's Truth-functional Analysis and the Origin of Truth Tables" (arxiv.org/abs/1108.2429): Peirce manuscript of 1893, Shosky's 1997 find on a 1912 Russell typescript
  • Emil Post, "Introduction to a general theory of elementary propositions", American Journal of Mathematics 43 (1921)
  • Wittgenstein, Tractatus Logico-Philosophicus (1921, English 1922)
  • 4.31. Everyday example sentences are made up for teaching.

Checked: 2026-10-17