2.4.3

Truth Tables

Test yourself

Truth Tables

A truth table shows all possible input combinations and their corresponding outputs, helping to test and complete logic expressions or circuits systematically.

Illustrative background for What is a truth table?Illustrative background for What is a truth table? ?? "content

What is a truth table?

  • A truth table is used to demonstrate the logic of a logic circuit or a Boolean expression.
  • It shows the outcome (the 'output') for every possible combination of inputs.
  • Inputs can only be 0 (false) or 1 (true).
  • Truth tables are a systematic way to test how logic gates behave and if a logic circuit works as expected.
Illustrative background for Building a simple truth tableIllustrative background for Building a simple truth table ?? "content

Building a simple truth table

  • A truth table has columns for each input and a column for the final output.
    • It is common to give the input and output a label (e.g. Input = A, Output = X)
  • The number of possible input combinations is calculated as 2n, where n is the number of inputs.
    • For one input, there are 21 = 2 combinations (0 and 1).
    • For two inputs, there are 22 = 4 combinations (00, 01, 10, 11).
    • For three inputs, there are 23 = 8 combinations.
Illustrative background for Completing a truth tableIllustrative background for Completing a truth table ?? "content

Completing a truth table

  • You may be asked to complete a truth table from:
    • A problem statement (e.g. “The alarm sounds if both sensors detect movement”)
    • A logic expression (e.g. 𝐴⋅𝐵+𝐶)
    • A logic circuit (given as a diagram with NOT, OR, NAND or other gates)
  • For each row, calculate the output by applying the logic operators or gates to the input values.
Illustrative background for Three-input truth table exampleIllustrative background for Three-input truth table example ?? "content

Three-input truth table example

  • To complete a truth table, you need to know the specific logic circuit or expression.
  • With 3 inputs, there are 8 possible combinations of 0s and 1s.
  • Each row shows one possible input combination and the corresponding output.

Jump to other topics

1Computer Systems

1.1Data Representation

1.2Data Transmission

1.3Hardware

1.4Software

1.5The Internet & its Uses

1.6Cyber Security

1.7Automated & Emerging Technologies

2Algorithms, Programming & Logic

Unlock your full potential with Seneca Premium

  • Unlimited access to 10,000+ open-ended exam questions

  • Mini-mock exams based on your study history

  • Unlock 800+ premium courses & e-books

Get started with Seneca Premium