Learn in your language
Skip to content
IGCSE · Cambridge (CIE) · 0478

Write an expression from a truth table

Infer a gate relationship from the rows where the output is 1 and verify every case.

Cambridge IGCSE Computer Science 0478 · Boolean logic · 2026–2028 Version 6 · Topic 10
Exam scope and assessment notes

This original learning sequence follows Topic 10 of Cambridge IGCSE Computer Science 0478, 2026–2028 syllabus Version 6. It covers standard symbols and functions for NOT, AND, OR, NAND, NOR and XOR/EOR, and translation among statements, expressions, circuits and truth tables. NOT has one input; other gates have at most two. Circuit practice is limited to three inputs and one output and keeps the requested design without simplification. Lessons and checks support learning but do not award an official Cambridge grade. Full timed-paper practice, practical programming in an executable workspace and human subject-teacher review remain outstanding; the separate 2029–2031 syllabus is not mapped here.

Before you begin

  • Be able to read binary 0 and 1 as the two possible logic values. Each lesson introduces the gate or translation skill it uses.

Work on paper. Try each question before revealing help, and explain why your method works.

Quick readiness check

Which gate is true for exactly one true input?

What you will learn

  • Inspect true and false output rows
  • Recognise standard gate patterns
  • Verify a proposed expression against all rows

Core idea

A truth table specifies the output for every possible input combination. Standard two-input patterns are distinctive: AND is true only for 11; OR is false only for 00; XOR is true for 01 and 10; NAND and NOR invert their base gate.

In a logic circuit, 1 represents TRUE and 0 represents FALSE. A gate applies a defined rule to its input value or values and produces one binary output.

A reliable method

Compare the table to familiar gate patterns. If it appears to be a known gate, check all four rows before naming it. For a composite table, use intermediate columns or compare the rows where the output is true with a candidate expression.

Keep the given statement, expression, diagram or table in view while working. Check each row or connection against the rule, and preserve the stated circuit structure; the syllabus does not ask you to simplify it.

Pause and explain

A table outputs 0 only for row 00. Which gate matches?

Put the idea to work

Worked example

A two-input table has outputs 0,1,1,0 for rows 00,01,10,11. Give an expression.

Show the worked solution
  1. The output is 1 exactly when the two inputs differ.
  2. That is the XOR/EOR rule.
  3. Check 00 and 11 are both false.

Answer Y=A XOR B.

Try a topic test

Choose Easy, Normal or Difficult. Save your answers and open worked review after finishing.

Test this topic →

From guided practice to a new situation

Write your answer and reasoning first. Use a hint only if you are stuck. The model solution is for self-checking; your written work is not automatically marked.

1 · Guided

Rows 00,01,10,11 have outputs 0,0,0,1. Identify a gate expression.

Give me a hint

Look for the only row where both inputs are 1.

Compare my reasoning
  1. The output is true only on 11.
  2. That is the AND condition.

Y=A AND B.

Look for these in your work

  • True row identified
  • Expression
2 · Independent

Rows 00,01,10,11 have outputs 1,0,0,0. Identify the gate and justify it.

Give me a hint

Compare the table to the inverse of AND.

Compare my reasoning
  1. AND is true only on 11.
  2. The given table reverses every AND output.
  3. Therefore the pattern is NAND.

Y=A NAND B.

Look for these in your work

  • Base pattern
  • Inversion
3 · Transfer

A two-input output is 1 for rows 01 and 11, and 0 for 00 and 10. Identify and verify a simple expression.

Give me a hint

Compare the output with the value of one input column.

Compare my reasoning
  1. The output equals B in all four rows.
  2. A gate expression that produces B is not a two-input gate from the specified set by itself.
  3. If only standard gates are permitted, B could pass directly as a wire; do not claim a listed gate reproduces it without checking.

The table is Y=B (a direct connection). It does not match a two-input gate truth table from the six standard gates.

Look for these in your work

  • Column comparison
  • Scope of gate patterns

Common mistakes

  • Identifying a gate from only one row
  • Confusing inclusive OR with XOR
  • Assuming a table with three inputs is a single gate
Recall without your notes

What can you explain now?

Outputs 1,1,1,0 for rows 00,01,10,11 match which gate?

Compare with the explanation

NAND

NAND is the inverse of AND, whose only true row is 11.

After trying it yourself, choose your next review. This is your self-assessment.

Your review choice appears on Today. Sign in to sync it across devices.

Make it stick

What is a safe check before identifying an expression from a truth table?

If you needed the solution, close it and solve the problem again from a blank page. A correct answer is stronger when you can explain the reason for each step.

Keep learning Computer Science

Course scope and assessment

165 original lessons map the listed objectives across all 10 main topics in the 2026–2028 Version 6 syllabus, with worked explanations and guided, independent and transfer practice. This is mapped teaching coverage, not proof of full exam readiness. Three earlier starter lessons remain available but are not counted as syllabus-mapped teaching. Practical programming experience in an executable browser workspace, full timed-paper practice, human subject-teacher review and the separate 2029–2031 syllabus remain outstanding. Practice is self-checked and does not award an official Cambridge grade.

StudyForA · Learn with understanding

Original teaching content and links to official sources. Check your exam year and qualification before using a resource.