---
title: "IGCSE Computer Science Logic Gates & Truth Tables (0478)"
description: "IGCSE Computer Science logic gates and truth tables explained: all six gates, a step-by-step method and three worked 0478 examples, plus common mistakes."
url: https://teachverse.app/blog/igcse-computer-science-logic-gates-truth-tables
published: 2026-11-03T14:05:02.657Z
updated: 2026-11-03T14:05:02.657Z
tag: "Subject guides"
keywords: ["igcse computer science logic gates", "igcse truth tables", "0478 boolean logic", "nand nor xor gates igcse", "logic expressions igcse", "igcse computer science paper 2"]
author: "TeachVerse"
---

# IGCSE Computer Science Logic Gates & Truth Tables (0478)

Logic gates questions look small on the page, but they are some of the most predictable marks in IGCSE Computer Science (0478). You are given a circuit, an expression or a short scenario, and you fill in a truth table or write an expression. This guide explains IGCSE Computer Science logic gates and truth tables step by step, with worked examples you can check yourself.

## What the syllabus expects

The Boolean logic section of the Cambridge 0478 syllabus ([2023–2025 version](https://www.cambridgeinternational.org/Images/595424-2023-2025-syllabus.pdf); always check the latest syllabus for your exam year) asks you to:

- use the standard symbols and know the function of six gates: NOT, AND, OR, NAND, NOR and XOR;
- work out the output for every possible combination of inputs;
- complete truth tables from a problem statement, a logic expression or a logic circuit;
- write a logic expression from a statement, a circuit or a truth table;
- draw circuits for the statement given, **without simplifying**.

NOT takes one input. Every other gate takes two inputs. A whole circuit has at most three inputs and one output, so a truth table never has more than eight rows.

## The six gates in one table

Remember each gate by a plain-English rule rather than by memorising the table.

| Gate | Plain-English rule | Output is 1 when... |
|---|---|---|
| NOT | Flips the input | the input is 0 |
| AND | Both must be 1 | A = 1 and B = 1 |
| OR | At least one is 1 | A = 1 or B = 1 (or both) |
| NAND | The opposite of AND | anything except both inputs being 1 |
| NOR | The opposite of OR | both inputs are 0 |
| XOR | Exactly one is 1 | the inputs are different |

Here is the full truth table for the three gates students confuse most:

| A | B | XOR | NAND | NOR |
|---|---|---|---|---|
| 0 | 0 | 0 | 1 | 1 |
| 0 | 1 | 1 | 1 | 0 |
| 1 | 0 | 1 | 1 | 0 |
| 1 | 1 | 0 | 0 | 0 |

NAND and NOR are simply AND and OR followed by NOT. If you forget one, work out AND or OR first, then flip every output.

## Write the rows in a fixed order

For three inputs, always list A, B and C as binary counting from 000 to 111. This guarantees you cover all eight combinations once and makes errors easy to spot. If you completed [binary and hexadecimal](/blog/igcse-computer-science-binary-hexadecimal-shifts) work, it is the same counting pattern.

| Row | A | B | C |
|---|---|---|---|
| 1 | 0 | 0 | 0 |
| 2 | 0 | 0 | 1 |
| 3 | 0 | 1 | 0 |
| 4 | 0 | 1 | 1 |
| 5 | 1 | 0 | 0 |
| 6 | 1 | 0 | 1 |
| 7 | 1 | 1 | 0 |
| 8 | 1 | 1 | 1 |

## A method that works for any truth table

1. **Write all input rows first**, in counting order.
2. **Add a column for each part of the expression**, working from the innermost brackets outwards.
3. **Fill one column at a time** down all rows, rather than one row at a time across. It is faster and you make fewer slips.
4. **Copy the last helper column into the output column.**
5. **Sanity-check** a couple of rows by reading the expression out loud.

## Worked example 1: an expression to a truth table

Complete the truth table for **X = (A AND B) OR (NOT C)**.

Add helper columns for A AND B and NOT C, then OR them together.

| A | B | C | A AND B | NOT C | X |
|---|---|---|---|---|---|
| 0 | 0 | 0 | 0 | 1 | 1 |
| 0 | 0 | 1 | 0 | 0 | 0 |
| 0 | 1 | 0 | 0 | 1 | 1 |
| 0 | 1 | 1 | 0 | 0 | 0 |
| 1 | 0 | 0 | 0 | 1 | 1 |
| 1 | 0 | 1 | 0 | 0 | 0 |
| 1 | 1 | 0 | 1 | 1 | 1 |
| 1 | 1 | 1 | 1 | 0 | 1 |

The output is 1 in five of the eight rows. A useful check: X is 0 only when C = 1 **and** A AND B is 0.

> Tip: Never try to do a three-input truth table in your head. The helper columns cost you ten seconds and protect several marks.

## Worked example 2: from a scenario to an expression

*A warning light X comes on when the master switch A is on, and either the door sensor B or the window sensor C is triggered.*

Break the sentence into parts:

- "master switch is on, **and**" means an AND with A;
- "door **or** window" means B OR C, which needs brackets.

So **X = A AND (B OR C)**.

| A | B | C | B OR C | X |
|---|---|---|---|---|
| 0 | 0 | 0 | 0 | 0 |
| 0 | 0 | 1 | 1 | 0 |
| 0 | 1 | 0 | 1 | 0 |
| 0 | 1 | 1 | 1 | 0 |
| 1 | 0 | 0 | 0 | 0 |
| 1 | 0 | 1 | 1 | 1 |
| 1 | 1 | 0 | 1 | 1 |
| 1 | 1 | 1 | 1 | 1 |

To draw the circuit, put B and C into an OR gate, then feed its output and A into an AND gate. The brackets decide the shape of the circuit, so a missing bracket changes the whole answer.

## Worked example 3: a circuit to an expression

Suppose a circuit has A and B going into an AND gate, that output going through a NOT gate, and the result going into an AND gate with C. Read it left to right, one gate at a time:

1. A AND B
2. NOT (A AND B)
3. (NOT (A AND B)) AND C

So **X = (NOT (A AND B)) AND C**. This is the same as a NAND gate on A and B, followed by AND with C. Its output is 1 only in rows where C = 1 and A and B are not both 1, which gives rows 2, 4 and 6 in the standard order.

## Mistakes that cost marks

- **Simplifying when told not to.** The syllabus says circuits must be drawn for the statement given, without simplification. A neat shortcut can lose marks if it is not what was asked.
- **Mixing up XOR and OR.** OR is 1 for 1,1. XOR is 0 for 1,1.
- **Forgetting NAND and NOR are inverted.** Do the AND/OR first, then flip.
- **Skipping the brackets.** A AND (B OR C) is not the same as (A AND B) OR C. Try row 2 (A = 0, B = 0, C = 1) in both to see the difference.
- **Losing track of rows.** Use the fixed counting order every time.
- **Leaving gaps.** Fill every cell with a 0 or a 1.

> Tip: When a question says "state" or "complete", the table is all they want. When it says "draw" or "write", check the command word first. Our guide to [IGCSE command words](/blog/igcse-command-words-explained) shows how to read them.

## Practising properly

Understanding the table is not the same as being able to build one under time pressure. Practise by:

1. Writing your own expression with three inputs, then swapping with a friend to complete the table.
2. Taking any circuit and writing the expression for it before you touch the table.
3. Doing the same task in the other direction, from a scenario to a circuit.

Pair this with other algorithm work, such as [trace tables](/blog/igcse-computer-science-trace-tables), because both reward careful, step-by-step working. For a wider routine, see [how to use topical papers for IGCSE revision](/blog/igcse-topical-past-papers).

A good way to check your own understanding is to teach it. Explaining why XOR differs from OR in your own words, to a friend or to an AI pupil in TeachVerse, quickly shows whether you really know the rule. Learning by explaining has support in research: [Fiorella & Mayer (2013)](https://doi.org/10.1016/j.cedpsych.2013.06.001) found that explaining material to others led to better understanding and recall than studying it again. TeachVerse's practice questions are original ones written in the style of Cambridge IGCSE papers, not real past papers. You can [try it free](/get-started) with three new lessons a day.

## Quick revision checklist

- I can draw or recognise all six gate symbols.
- I can state the rule for each gate in one sentence.
- I always list inputs in binary counting order.
- I use helper columns for any expression with brackets.
- I never simplify unless asked.
- I can go from scenario to expression to circuit and back again.
