Truth Tables: Complete Guide with Examples and Generator
Master truth tables with our complete guide. Learn to create, read, and use Boolean truth tables with worked examples. Includes free online truth table generator.
What is a Truth Table?
A truth table is a table showing all possible input combinations and their corresponding outputs for a Boolean function. It's the complete specification of any logical operation.
How to Create a Truth Table
- Count variables: Identify all input variables (A, B, C...)
- Calculate rows: For n variables, you need 2^n rows
- List inputs: Count from 0 to 2^n-1 in binary
- Calculate outputs: Apply the Boolean expression to each row
Example: F = A·B + C
| A | B | C | A·B | F = A·B + C |
|---|---|---|---|---|
| 0 | 0 | 0 | 0 | 0 |
| 0 | 0 | 1 | 0 | 1 |
| 0 | 1 | 0 | 0 | 0 |
| 0 | 1 | 1 | 0 | 1 |
| 1 | 0 | 0 | 0 | 0 |
| 1 | 0 | 1 | 0 | 1 |
| 1 | 1 | 0 | 1 | 1 |
| 1 | 1 | 1 | 1 | 1 |
Key Terms
Minterms
A product term that includes ALL variables, producing 1 for exactly one row.
- Row 5 (A=1, B=0, C=1): minterm = A·B'·C = m5
- Row 7 (A=1, B=1, C=1): minterm = A·B·C = m7
Maxterms
A sum term that includes ALL variables, producing 0 for exactly one row.
- Row 0 (A=0, B=0, C=0): maxterm = A+B+C = M0
SOP from Truth Table
Sum of Products: OR together the minterms where F=1
For the example above: F = Σm(1,3,5,6,7)
POS from Truth Table
Product of Sums: AND together the maxterms where F=0
For the example above: F = ΠM(0,2,4)
Generate Your Own
Try our Truth Table Generator - enter any expression and get instant results!
Frequently Asked Questions
- How do you create a truth table?
- List all possible input combinations (2^n rows for n variables), then calculate the output for each row. Start with 0s and count up in binary.
- How many rows in a truth table with 4 variables?
- A truth table with 4 variables has 2^4 = 16 rows, one for each possible combination of inputs (0000 to 1111).
- What is a minterm?
- A minterm is a product (AND) term that includes all variables, producing 1 for exactly one row of the truth table. For example, A'BC is a minterm for row where A=0, B=1, C=1.