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.
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;
| # | member | invited | may_enter |
|---|---|---|---|
| 0 | FALSE | FALSE | FALSE |
| 1 | FALSE | TRUE | TRUE |
| 2 | TRUE | FALSE | TRUE |
| 3 | TRUE | TRUE | TRUE |
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;
| # | member | invited | banned | allow_entry |
|---|---|---|---|---|
| 0 | FALSE | FALSE | FALSE | FALSE |
| 1 | FALSE | FALSE | TRUE | FALSE |
| 2 | FALSE | TRUE | FALSE | TRUE |
| 3 | FALSE | TRUE | TRUE | FALSE |
| 4 | TRUE | FALSE | FALSE | TRUE |
| 5 | TRUE | FALSE | TRUE | FALSE |
| 6 | TRUE | TRUE | FALSE | TRUE |
| 7 | TRUE | TRUE | TRUE | FALSE |
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 | # | A | B | always | never | sometimes |
|---|---|---|---|---|---|
| 0 | FALSE | FALSE | TRUE | FALSE | FALSE |
| 1 | FALSE | TRUE | TRUE | FALSE | FALSE |
| 2 | TRUE | FALSE | TRUE | FALSE | FALSE |
| 3 | TRUE | TRUE | TRUE | FALSE | TRUE |
Ask “Is this always true?” for each output and compare the answer with its column.
tautology always · holdscontradiction never · holdscontingent sometimes · holds
Exercises
- Fill in the
allow_entrycolumn for all 8 rows (member,invited,banned; the first row is all FALSE). (truth-table) - Fill in the column of
f := NOT A OR B(Afirst). (truth-table) - Is
(A AND B) OR NOT A OR NOT Ba tautology, a contradiction, or contingent? (classify) - 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
- Truth table exercises with answers: 2 variables
- Truth table exercises with answers: 3 variables
- Truth table exercises with answers: 4 variables
See also
- Truth table: meaning and examples
- Tautology in logic: meaning and examples
- Contradiction in logic: meaning and examples
- Contingency in logic: meaning and examples
- Truth table generator: any Boolean expression, up to 12 variables, with intermediate columns
- Entry rule: (member OR invited) AND NOT banned, checked every way
- Lesson 9: Counterexamples (intermediate, 12 min)
- Lesson 11: Karnaugh maps (advanced, 15 min)
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.