Teacher Guide: Truth Tables
Learn to build a truth table for any compound expression step by step and use it to find tautologies, contradictions and equivalent expressions.
Use this lesson with your class
Free, no student accounts needed.
Share with students
Students open the lesson and practise with instant feedback.
Class quiz
10 questions on Boolean Logic. Students join with a name, you see everyone's score.
For Teachers
- Determine the number of rows of a truth table using
- Fill the variable columns of a truth table in a systematic order for 2 and 3 variables
- Build the final column of a compound expression using helper columns
- Identify tautologies, contradictions and contingencies from the final column
- Use truth tables to decide whether two expressions are logically equivalent
- • Understanding of true and false statements (Introduction to Boolean Logic, True and False Statements)
- • The AND, OR and NOT operations and their basic truth tables
- • Powers of 2, such as
- 1. Why do you think a table with 10 variables would be impractical to write by hand? How many rows would it have?
- 2. Two friends say the same rule in different words. How could a truth table settle who is right?
- 3. Can you think of a sentence that is always true no matter what? Why is it a tautology?
- 4. Why is one row that differs enough to show that two expressions are not equivalent?
The number of rows is instead of
Remediation: Build the tables for 1, 2 and 3 variables together and count: 2, 4, 8. Ask students to predict 4 variables and check with a tree diagram that branches into T and F at every level.
NOT in front of a variable negates the whole expression
Remediation: Put and side by side and build both tables. The different final columns show that brackets change the meaning.
If two expressions agree in most rows, they are equivalent
Remediation: Compare with : they match in two rows and differ in two. Stress that equivalence is an all-rows check, like two answer keys that must match on every question.
For Struggling Students:
- • Start with one NOT and one AND or OR, using only 2 variables and 4 rows
- • Give pre-printed tables with the variable columns already filled in
- • Use colored highlighters: green for T, red for F, to make patterns visible
For On-Level Students:
- • Build complete 3-variable tables with two helper columns
- • Classify a list of expressions as tautology, contradiction or contingency
- • Prove both De Morgan's laws with truth tables
For Advanced Students:
- • Find an expression that matches a given final column (reverse truth table)
- • Investigate why a table with 10 variables has rows and discuss why computers are used
- • Prove the distributive law
- CCSS.MATH.PRACTICE.MP6 (MP6)
Attend to precision
- CCSS.MATH.PRACTICE.MP7 (MP7)
Look for and make use of structure
- CCSS.MATH.PRACTICE.MP3 (MP3)
Construct viable arguments and critique the reasoning of others
- visualInteractive Truth Table
Students fill in the result column for AND and OR and check their answers
- activityRow Detectives
Pairs receive a table with a missing and a repeated row and must find and fix them
- worksheetEquivalent or Not?
Pairs of expressions to compare with full truth tables, including both De Morgan's laws
Lesson Content
Everything students see: definition, examples, common mistakes, applications. Tap to open.
Lesson Content
Everything students see: definition, examples, common mistakes, applications. Tap to open.
Definition
- 1.Count the variables and write empty rows.
- 2.Fill the variable columns in a fixed order: the first column is half T, then half F; each next column switches twice as often; the last column alternates T, F, T, F.
- 3.Add a helper column for every part of the expression, innermost part first (a NOT on a single variable, then the brackets).
- 4.Combine the helper columns into the final column.
| T | T | F | F |
| T | F | T | T |
| F | T | F | F |
| F | F | T | F |
- All T: the expression is a tautology (always true).
- All F: it is a contradiction (always false).
- Two expressions with the same final column in every row are logically equivalent.
Worked Examples
Build the truth table for .
Count the rows
There are 2 variables, and , so we need rows
Fill the variable columns
: T, T, F, F (half T, half F). : T, F, T, F (alternating) → All 4 combinations appear once
Add the helper column
Flip every value of : T, F, T, F becomes F, T, F, T → : F, T, F, T
Combine with OR
Row by row: T OR F = T, T OR T = T, F OR F = F, F OR T = T → : T, T, F, T
Answer: The final column is T, T, F, T. The expression is false only in row 3, where is false and is true.
Common Mistakes
Writing too few rows, for example 6 rows for 3 variables
Why it's wrong: The number of rows is not . Each variable doubles the number of combinations, so 3 variables give rows.
Correct: Always use rows: 4 for 2 variables, 8 for 3 variables, 16 for 4 variables.
Filling the variable columns in a random order
Why it's wrong: Without a system it is easy to write the same combination twice and miss another one. The table then gives a wrong verdict.
Correct: Use the fixed pattern: first column in blocks of half the rows, each next column in blocks half as long, last column alternating T, F.
Treating as if it were
Why it's wrong: Without brackets, NOT applies only to the variable right after it. The bracketed version flips the result of the whole AND.
Correct: Make a helper column for exactly what NOT touches: alone, or first and then its negation.
Calling two expressions equivalent after checking only a few rows
Why it's wrong: Two expressions can agree on several rows and still differ in one. and agree in rows 1 and 4 but not in rows 2 and 3.
Correct: Compare the final columns in every single row. Equivalent means identical in all rows.
Why It Matters
- Programming: before shipping a condition like (member OR coupon) AND NOT blocked, testers check every combination of inputs
- Electronics: engineers use truth tables to design circuits and to replace a complicated circuit with a simpler, cheaper one that does the same job
- Security and alarms: an alarm with 4 sensors has possible states, and every one of them must behave correctly
- Arguments and debates: a truth table shows whether two sentences really say the same thing or only sound alike
- Puzzles and games: logic puzzles are solved by ruling out rows that cannot be true
Real World Applications
Alarm Systems
Security engineers list every state of the sensors to make sure the alarm reacts correctly in each one.
Example:
An alarm with 3 door sensors has states, from all doors closed to all doors open.
A house alarm has 4 sensors, and each one is either on (T) or off (F). The alarm rings if at least one sensor is on (OR).
How many rows does the truth table have, and in how many of them does the alarm ring?
Step 1: Write the mathematical expression
Write the number of rows as a power of 2:
Testing Software
Programmers test a condition with every combination of inputs, which is exactly a truth table.
Example:
A login rule (correct password AND NOT locked) needs test cases to be fully checked.
An online shop gives a discount if , where = is a member, = has a coupon, = account is blocked.
In how many of the input combinations does the customer get the discount?
Step 1: Write the mathematical expression
Write the number of test cases as a power of 2:
Simplifying Circuits
If two circuits have the same truth table, engineers can use the one with fewer or cheaper parts.
Example:
De Morgan's laws let a designer swap a NOT-AND for an OR of two NOTs without changing what the circuit does.
Circuit A computes . Circuit B computes .
Do the two circuits always give the same output?
Step 1: Write the mathematical expression
Write the number of rows as a power of 2:
Key Takeaways
- 1A truth table lists every combination of truth values and the value of the expression in each row
- 2With variables the table has rows: 4 for 2 variables, 8 for 3 variables
- 3Fill the variable columns in a fixed order: blocks of half the rows first, last column alternating T, F
- 4Use helper columns for each part of the expression, innermost part first
- 5All T in the final column means a tautology, all F means a contradiction
- 6Two expressions are equivalent when their final columns match in every row
Frequently Asked Questions
Why does every new variable double the rows?
Does the order of the rows matter?
What is an expression called if it is neither a tautology nor a contradiction?
Do I always need helper columns?
Glossary
- Truth table
- A table that shows the value of an expression for every combination of its variables
- Compound expression
- An expression built from variables and operators, such as
- Helper column
- An extra column for one part of an expression, used to build the final column step by step
- Tautology
- An expression that is true in every row, such as
- Contradiction
- An expression that is false in every row, such as
- Logically equivalent
- Two expressions with the same value in every row, written with
Formula Card
Number of rows
$n$ is the number of variables: $2^2 = 4$, $2^3 = 8$, $2^4 = 16$
Tautology
Always true: the final column is all T
Contradiction
Always false: the final column is all F
De Morgan's laws
Two equivalences you can prove with a truth table