Complete a truth table from a problem statement, logic expression or logic circuit

Boolean Logic – Cambridge IGCSE 0478

Learning Objective

Students will be able to complete a truth table when given a problem statement, a logical expression, or a logic circuit, and to move confidently between these three representations.

Key Concepts

  • Boolean variables have only two possible values: True (1) or False (0).
  • Only two‑input logic gates (except NOT) are used in the IGCSE exam. A circuit may contain a maximum of three inputs and one output.
  • Standard logical operators required by the syllabus and their Cambridge symbols:
OperatorCambridge SymbolGateExpression
AND∧ (or &)ANDA ∧ B
OR∨ (or +)ORA ∨ B
NOT¬ (or overline)NOT¬A
XORXORA ⊕ B
NANDNAND¬(A ∧ B)
NORNOR¬(A ∨ B)

Optional extensions (not required for the exam): Implication (A→B) and Equivalence (A↔B). These may appear in enrichment activities but are not part of the syllabus.

Gate‑Symbol Cheat‑Sheet

GateGraphic SymbolBoolean Symbol
ANDAND gate∧ (or &)
OROR gate∨ (or +)
NOTNOT gate¬ (or overline)
XORXOR gate
NANDNAND gate
NORNOR gate

Truth Tables for Individual Gates

InputsAND (∧)OR (∨)XOR (⊕)NOT (¬)NAND (↑)NOR (↓)
A=0, B=0000¬A=111
A=0, B=1011¬B=010
A=1, B=0011¬A=010
A=1, B=1110¬B=000

Structure of a Truth Table

For n input variables there are 2ⁿ rows. Each row lists a unique combination of inputs and the resulting output.

Input AInput BOutput F
00
01
10
11

From a Problem Statement → Expression → Circuit → Truth Table

  1. Identify the variables. Give each a clear letter.
  2. Write the logical expression. Use the symbols from the cheat‑sheet.
  3. Draw the circuit. Replace each operator with its two‑input gate symbol (NOT is a single‑input gate).
  4. Complete the truth table. List all input combinations, evaluate sub‑expressions step‑by‑step, and record the final output.

Worked Example 1 – Simple AND

Statement: “The alarm sounds if the door is open and the motion sensor detects movement.”

  • Variables: D = door open, M = motion detected, A = alarm sounds
  • Expression: A = D ∧ M
  • Circuit: two inputs → AND gate → output A

AND gate circuit

DMA = D ∧ M
000
010
100
111

Worked Example 2 – XOR (“Door or Window, but not both”)

Statement: “The alarm sounds if either the door is open or the window is open, but not both.”

  1. Variables: D = door open, W = window open, A = alarm sounds
  2. Expression (two equivalent forms):
    • A = (D ∨ W) ∧ ¬(D ∧ W)
    • A = D ⊕ W (XOR)
  3. Circuit: two inputs → XOR gate → output A

XOR gate circuit

DWD ∨ WD ∧ W¬(D ∧ W)A = (D ∨ W) ∧ ¬(D ∧ W)
000010
011011
101011
111100

Worked Example 3 – NAND

Statement: “The alarm sounds unless both the door and the window are open.”

  • Variables: D = door open, W = window open, A = alarm sounds
  • Expression: A = ¬(D ∧ W)  or  A = D ↑ W (NAND)
  • Circuit: two inputs → NAND gate → output A

NAND gate circuit

DWD ∧ WA = ¬(D ∧ W)
0001
0101
1001
1110

Worked Example 4 – NOR

Statement: “The light stays off unless either switch S₁ or switch S₂ is turned on.”

  • Variables: S₁, S₂ = switches, L = light on
  • Expression: L = ¬(S₁ ∨ S₂)  or  L = S₁ ↓ S₂ (NOR)
  • Circuit: two inputs → NOR gate → output L

NOR gate circuit

S₁S₂S₁ ∨ S₂L = ¬(S₁ ∨ S₂)
0001
0110
1010
1110

Completing a Truth Table from a Logical Expression

Break the expression into sub‑expressions, evaluate them column by column, and finally record the output.

Example Expression: F = (P ∨ Q) ∧ ¬R

PQRP ∨ Q¬RF
000010
001000
010111
011100
100111
101100
110111
111100

Completing a Truth Table from a Logic Circuit

  1. Label every input on the circuit diagram.
  2. Write the logical expression by replacing each gate with its symbol.
  3. Use the “Expression → Table” method above.

Example Circuit (same expression as above):

Circuit: (X+Y)·¬Z

Expression: F = (X ∨ Y) ∧ ¬Z → truth table identical to the previous example.

Deriving a Logical Expression from a Truth Table

Given a table, write the minimal Boolean expression in **sum‑of‑products** (SOP) form.

Mini‑Exercise

ABF (XOR)
000
011
101
110

Solution outline:

  • Rows where F = 1: (0,1) and (1,0).
  • Product terms:
    • (0,1): ¬A ∧ B
    • (1,0): A ∧ ¬B
  • Combine with OR: F = (¬A ∧ B) ∨ (A ∧ ¬B), which simplifies to F = A ⊕ B.

Practice Questions

  1. Complete the truth table for G = ¬(A ∧ B) ∨ (C ∧ ¬D).
  2. A circuit has three inputs P, Q, R. P and Q go into an XOR gate; the result is ANDed with R. Write the logical expression and fill the truth table.
  3. Problem statement: “A student passes if they score at least 50 % in **both** the written test and the practical test, **or** they achieve a perfect score in the written test.”
    • Define variables.
    • Write the expression.
    • Draw a simple circuit (max three inputs, two‑input gates only).
    • Complete the truth table.
  4. Given the truth table below, write the corresponding Boolean expression (use sum‑of‑products).
    XYZF
    0000
    0011
    0101
    0110
    1001
    1010
    1100
    1110

Summary Checklist – From Any Starting Point to a Completed Truth Table

  • Identify **all** input variables (maximum three for the exam).
  • Translate the English statement into a Boolean expression using the official Cambridge symbols.
  • If you start from a circuit, label the inputs and write the equivalent expression.
  • List every possible combination of inputs (2ⁿ rows).
  • Evaluate sub‑expressions column by column – write intermediate results if it helps.
  • Record the final output for each row.
  • Cross‑check:
    • NOT columns are exact opposites of the original variable.
    • AND column is 1 only when **all** its inputs are 1.
    • OR column is 0 only when **all** its inputs are 0.
    • XOR column has an odd number of 1’s.
    • NAND and NOR are the opposites of AND and OR respectively.

Create an account or Login to take a Quiz

44 views
0 improvement suggestions

Log in to suggest improvements to this note.