Truth Tables
A truth table lists every possible input combination of a logic circuit and the resulting output.
▶ Interact
Play with the controls to see the idea in action.
📘 Learn
A truth table lists every possible input combination of a logic circuit and the resulting output.
- n inputs give 2 to the n rows
- Use 0 and 1 or false and true
- Useful for designing circuits
🧠 Quick quiz
Three questions. Score 2 or more to complete the topic.
What is Truth Tables?
Within Computer Science, which covers algorithms, programming, data, networks, hardware and safe, responsible use of technology, this topic explains Truth Tables. Computing topics explain how software, hardware and data work, with diagrams and models that show each step in order.
Check that you can explain Truth Tables in your own words and give one example from everyday life. If you can do that, you have understood the core idea.
Understanding Truth Tables helps you design, test and explain programs, websites and systems, from small projects to exam questions.
Truth Tables in detail
A truth table lists all possible combinations of inputs to a logic circuit or Boolean expression, with the resulting output for each. For two inputs, there are four rows (00, 01, 10, 11), and for three inputs, eight rows, since there are 2ⁿ combinations for n inputs.
To build one for a circuit with several gates, add columns for the intermediate outputs and work through step by step. Truth tables help to check that a circuit does what is intended, to compare circuits and to simplify logic. They are used in designing hardware, writing conditions in programs and solving logic problems.
How the interactive helps you understand Truth Tables
Watch the binary display in the interactive. Use any sliders or buttons it offers to change the values and see how the binary display responds.
Before you change anything, predict the result. Then change one value at a time and check whether your prediction was right. This is a quick way to build a correct mental model of Truth Tables.
Real-life uses and examples
- Recognise Truth Tables in an app or device you use every day.
- Apply Truth Tables when you design a small program, website or spreadsheet.
- Explain Truth Tables to someone new to computing by comparing it to a familiar process.
Common mistakes to avoid
- Using the term without being able to say what the computer actually does.
- Testing only the normal case and forgetting the edge cases.
- Learning the definition without testing it. Use the quiz and the interactive to check that you can apply the idea.
Frequently asked questions about Truth Tables
What is Truth Tables?
A truth table lists every possible input combination of a logic circuit and the resulting output.
What are the most important points about Truth Tables?
The main points are: n inputs give 2 to the n rows; Use 0 and 1 or false and true; Useful for designing circuits.
Why is Truth Tables useful?
Understanding Truth Tables helps you design, test and explain programs, websites and systems, from small projects to exam questions.
How can I practise Truth Tables?
Open the interactive at the top of this page and change the controls one at a time. Predict the result before each change, then take the three-question quiz. A score of two or more marks the topic as complete on this device.
Which topics are related to Truth Tables?
Related topics in Computer Science include Pseudocode, Computational Thinking, Selection: If Statements.