← IGCSE Computer Science Paper 2

What a logic gate is

An electronic component that takes one or two binary inputs (0 or 1) and gives one binary output (0 or 1) by a fixed rule. Processors are built from many gates.

Understanding What a logic gate is in IGCSE Computer Science Paper 2

What it does: Every input (A, B) and the output (X) hold only the binary values 0 or 1, never any other number. An OR gate's rule never changes: with inputs 1 and 0 it always outputs 1, every time. A logic gate always gives a single output, which is either 0 or 1. The NOT gate has one input. AND, OR, NAND, NOR and XOR have two inputs. A processor is built from many logic gates. Other chips use them as well. A gate processes its inputs into one output. It does not store data.

Common mistakes: A logic gate's output can only be binary, 0 or 1. The value 2 is not allowed, so the line should be OUTPUT X = 0. Gate inputs are binary, so they can only be 0 or 1. The line should be INPUT A = 1.

Class: _____________________  ·  Name: _____________________  ·  Date: _________

Free printable worksheet with full answer key — or add this module to a class and your students practise it interactively.

This module's key terms are also in a printable crossword (Modules 539–551) and word search (Modules 539–580).

Take this worksheet further — free with Cloodit

Each concept is reinforced from every angle — learned, then applied, then tested.

Learning
Duo
A logic gate takes binary inputs and gives how many outputs?
Two outputsOne output
Matches
A = 2, B = 1, X = 3
↓
Gate inputs and outputs can only be binary values 0 or 1, so 2 and 3 are not valid.
Applying
Meanings
Term
logic gate
Meaning
An electronic component that takes one or two binary inputs (0 or 1) and gives one binary output (0 or 1) by a fixed rule. Processors are built from many gates.
Practice
Input A = 1
Testing
Gaps
X = A B
Check Answer
Spots
3INPUT B = 0
4OUTPUT X = 2

Cloodit turns curriculum-aligned coding content into journeys students work through one biome at a time.

The 'Roadrunner' badge — Streak Runner, one of Cloodit's 106 collectible badges
Students earn collectable badges

Over 100 of them, across seven natural biomes.

Study Buddy
Students build a real study resource

Turns their work into revision material ready for Flash Cards and Exam study.

Diamond Dash — one of Cloodit's live, competitive Sprint games
Students lock in with Sprints

Live, competitive practice for the start of the lesson or a teacher-led lesson finisher.

A Cloodit certificate of achievement, ready to personalise and print
Custom printable certificates

Honour your top performers, or encourage a student who's trying hard — ready to print in seconds.

Quick Questions

1. A logic gate takes binary inputs and gives how many outputs?
A. Two outputs
B. One output ✓
A logic gate always gives a single output, which is either 0 or 1.
2. Which values can the input or output of a logic gate have?
A. Only 0 or 1 ✓
B. Any number from 0 to 9
Gates work with binary values only: 0 (off) or 1 (on).
3. Which statement describes a logic gate?
A. A program that changes its rule each time it runs
B. An electronic component that follows a fixed rule ✓
The rule of a gate is fixed. The same inputs always give the same output.
4. The same inputs are given to a gate twice. What happens to the output?
A. It is the same both times ✓
B. It may be different each time
Gates follow a fixed rule, so identical inputs always give an identical output.
5. How many inputs can a gate in the IGCSE 0478 course have?
A. One or two ✓
B. Always exactly four
The NOT gate has one input. AND, OR, NAND, NOR and XOR have two inputs.

Match the Pairs

X = NOT A → A gate with one input A and one output X. The output is always the opposite binary value of the input.
X = A AND B → A gate with two inputs A and B and one output X. The output is 1 only when both inputs are 1.
A logic gate takes binary inputs, which can only be 0 or 1, and gives one output that is also 0 or 1. → A = 1, B = 0, X = 1
A gate follows a fixed rule, so the same inputs always give the same output. → 1 OR 0 = 1
A = 2, B = 1, X = 3 → Gate inputs and outputs can only be binary values 0 or 1, so 2 and 3 are not valid.
A, B, C -> gate -> X, Y → A gate gives a single output, not two. It also takes only one or two inputs, not three.

Key Term

logic gate
An electronic component that takes one or two binary inputs (0 or 1) and gives one binary output (0 or 1) by a fixed rule. Processors are built from many gates.

Fill in the Blanks

1. X = A AND B
Hint: Type the gate name that gives 1 only when both inputs are 1
2. X = NOT A
Hint: Type the gate name that takes just one input and reverses it
3. Inputs: A = 1, B = 0 Gate: AND Output: X = 0
Hint: Type the binary output this gate gives for these two inputs
4. A gate input can only be 0 or 1
Hint: Type the other binary digit that a gate input can be
5. Inputs: A and B Output: X X = A OR B
Hint: Type the letter label used for the single output of the gate

Spot the Error

Question 1
A GATE AND
B INPUT A = 1
C INPUT B = 0
D OUTPUT X = 2
Line D — A logic gate's output can only be binary, 0 or 1. The value 2 is not allowed, so the line should be OUTPUT X = 0.
Question 2
A GATE NOT
B INPUT A = 7
C OUTPUT X = 0
Line B — Gate inputs are binary, so they can only be 0 or 1. The line should be INPUT A = 1.
Question 3
A GATE OR
B INPUT A = 0
C INPUT B = yes
D OUTPUT X = 1
Line C — A gate input must be the binary digit 0 or 1, not a word. The line should be INPUT B = 1.
Question 4
A GATE NOT
B INPUT A = 0
C OUTPUT X = 1, Y = 0
Line C — A logic gate produces a single output. It cannot give two outputs, so the line should be OUTPUT X = 1.
Question 5
A PROCESSOR HAS ONE GATE
B EACH GATE: 1 OR 2 INPUTS
C EACH GATE: 1 OUTPUT
Line A — A processor is built from many logic gates working together, not just one. The line should say PROCESSOR HAS MANY GATES.

Student with a class code? Join your class →