Truth table generator
Every row of a logic expression with AND, OR, NOT and XOR.
5 of 8 rows are true
- A B C │ out
- 0 0 0 │ 0
- 0 0 1 │ 1
- 0 1 0 │ 0
- 0 1 1 │ 1
- 1 0 0 │ 1
- 1 0 1 │ 1
- 1 1 0 │ 0
- 1 1 1 │ 1
How it works
A truth table lists every combination of inputs and the output for each. With n inputs there are 2ⁿ rows.
Write AND as AND, & or ·; OR as OR, | or +; NOT as NOT, ! or ¬; XOR as XOR or ^.
Worked example
With Expression = A AND NOT B OR C:
- A B C │ out
- 0 0 0 │ 0
- 0 0 1 │ 1
- 0 1 0 │ 0
- 0 1 1 │ 1
- 1 0 0 │ 1
- 1 0 1 │ 1
- 1 1 0 │ 0
- 1 1 1 │ 1
Answer: 5 of 8 rows are true
Questions
- Which goes first, AND or OR?
- NOT first, then AND, then XOR, then OR, just like × before + in arithmetic. Use brackets to be sure.
Learn the method properly
The chapter behind this tool, with animations, an experiment and an AI tutor who checks each step you write.
Open the chapter