Skip to content

Lesson 4: Truth tables (beginner, 12 min)

A truth table lists every assignment of the inputs in a fixed order and the output on each. This lesson builds the table for the entry rule row by row and then uses tables to tell tautologies, contradictions and contingent formulas apart.

Level: beginner12 min15 claims in this lesson were confirmed by the exact checker at build time

List every assignment in a fixed order, work through the entry rule row by row, and spot tautologies, contradictions, and contingent formulas.

With n inputs there are 2 to the power n assignments, so four rows for two inputs and eight for three. The first step fixes the order the engine always uses: the first input is the most significant bit and row 0 is all FALSE, so the rows count up in binary. The second step walks (member OR invited) AND NOT banned through its eight rows and finds entry allowed on exactly three of them. The third step reads a column as a classification: all TRUE is a tautology (A OR NOT A), all FALSE a contradiction (A AND NOT A), and a mixed column a contingent formula (A AND B).

The three classification claims are verified at build time, and the step carries twelve worked assignments that the engine re-evaluates. The exercises are two tables to fill in, one for the entry rule and one for NOT A OR B, and two formulas to classify, one of which is a tautology in disguise.

The lesson is the foundation for everything that follows: equivalence is two columns agreeing, a counterexample is a row, and a Karnaugh map is the same table folded. The truth table generator in the tools section builds the table for any formula up to twelve inputs, with the same row order.

Do this lesson interactively in the app

Steps

1. One row per assignment

With n inputs there are 2ⁿ assignments, so a truth table has 2ⁿ rows: 4 for two inputs, 8 for three.

Tangibool always uses the same order: the first input is the most significant bit and the first row is all FALSE, as if counting in binary from 0. Rows never move, so a row number always means the same assignment.

may_enter := member OR invited · output

member: the person is a member; invited: the person has an invitation;

One row per assignment
#memberinvitedmay_enter
0FALSEFALSEFALSE
1FALSETRUETRUE
2TRUEFALSETRUE
3TRUETRUETRUE

Open the truth table of may_enter and check that the first row is all FALSE.

2. The entry rule, row by row

allow_entry := (member OR invited) AND NOT banned has three inputs, so 8 rows. Entry is allowed in exactly three of them: invited only, member only, and member and invited, each time with banned=FALSE.

Every row with banned=TRUE gives FALSE: the ban overrides membership and invitation.

allow_entry := (member OR invited) AND NOT banned · output

member: the person is a member; invited: the person has an invitation; banned: the person is banned; allow_entry: the person may enter;

The entry rule, row by row
#memberinvitedbannedallow_entry
0FALSEFALSEFALSEFALSE
1FALSEFALSETRUEFALSE
2FALSETRUEFALSETRUE
3FALSETRUETRUEFALSE
4TRUEFALSEFALSETRUE
5TRUEFALSETRUEFALSE
6TRUETRUEFALSETRUE
7TRUETRUETRUEFALSE

Open the truth table and find the three TRUE rows.

3. Always, never, sometimes

A column tells you what kind of formula you have:

- all TRUE: a tautology, such as A OR NOT A; - all FALSE: a contradiction, such as A AND NOT A; - a mix: contingent, such as A AND B.

For large models, Tangibool answers the same questions with exact checks instead of full tables.

always := A OR NOT A · outputnever := A AND NOT A · outputsometimes := A AND B · output
Always, never, sometimes
#ABalwaysneversometimes
0FALSEFALSETRUEFALSEFALSE
1FALSETRUETRUEFALSEFALSE
2TRUEFALSETRUEFALSEFALSE
3TRUETRUETRUEFALSETRUE

Ask “Is this always true?” for each output and compare the answer with its column.

tautology always · holdscontradiction never · holdscontingent sometimes · holds

Exercises

  1. Fill in the allow_entry column for all 8 rows (member, invited, banned; the first row is all FALSE). (truth-table)
  2. Fill in the column of f := NOT A OR B (A first). (truth-table)
  3. Is (A AND B) OR NOT A OR NOT B a tautology, a contradiction, or contingent? (classify)
  4. Classify (A OR B) AND NOT A AND NOT B. (classify)

Do this lesson interactively in the app

Questions

How many rows can a table have?

The engine draws tables up to twelve inputs, 4,096 rows. Checks run exhaustively well beyond that, but a table that long is for computers, not readers; use the checks and the Karnaugh map instead.

What is a contingent formula?

One that is TRUE on some rows and FALSE on others, which is most formulas you will write. Only tautologies and contradictions have a column of one value.

Related

Guides

Tools

Practice

See also

Lessons

Generated from the Tangibool engine, semantics tangibool-semantics/1, engine 1.0.0, build . Every table, map, simplification and verdict on these pages was computed by the Tangibool engine when the site was built, and every claim was re-checked by the same exact checker the app uses. Limits are stated where they apply. © 2026 Foreranger LTD.