Tools / Logic Gate Simulator
AQA GCSEOCR GCSECambridge IGCSEA Level

Logic Gate Simulator for GCSE Computer Science

Build AND, OR, NOT, NAND, NOR, XOR and XNOR logic circuits interactively. Toggle inputs A and B and watch the output and truth table update in real time. Use this tool to practise Boolean logic for AQA (8525/7517), OCR (J277/H446) and Cambridge IGCSE (0478) Computer Science exams.

Select gate

Output is 1 only when ALL inputs are 1

Inputs

Gate diagram

A=0B=00
0
Output
LOW (0)

Truth table — AND

ABOutput
000
010
100
111

Logic gate reference — truth tables

You are required to know these truth tables for all three exam boards. NAND and NOR are called "universal gates" because any logic circuit can be built from them alone.

AND Output is 1 only when BOTH inputs are 1
ABOut
000
010
100
111
OR Output is 1 when AT LEAST ONE input is 1
ABOut
000
011
101
111
NOT Single input — inverts (flips) the input
AOut
01
10
NAND Inverted AND — output is 0 only when both inputs are 1
ABOut
001
011
101
110
NOR Inverted OR — output is 1 only when both inputs are 0
ABOut
001
010
100
110
XOR Exclusive OR — output is 1 when inputs are DIFFERENT
ABOut
000
011
101
110

Logic gates exam tips — AQA, OCR and Cambridge

Drawing gate symbols

Exam questions may ask you to draw a circuit from a Boolean expression like A AND (B OR NOT C). Work right to left: identify the final gate, then work backwards through the expression. Always label inputs and the output.

Completing truth tables

For a circuit with 3 inputs, you need 8 rows (2³). Start with the rightmost column cycling 0,1,0,1,... — the next column doubles: 0,0,1,1,0,0,1,1 — and so on. Fill in intermediate wire values as separate columns to avoid mistakes.

NAND and NOR gates

Remember: NAND = NOT-AND (invert the AND output), NOR = NOT-OR. A universal gate question asks you to implement AND, OR or NOT using only NAND gates (or only NOR). NOT from NAND: connect both inputs together.

Boolean algebra simplification

At A Level, you may need to simplify Boolean expressions using De Morgan's laws: NOT(A AND B) = NOT A OR NOT B; NOT(A OR B) = NOT A AND NOT B. These are also the mathematical definitions of NAND and NOR.

Frequently asked questions — logic gates

What are logic gates in GCSE Computer Science?

Logic gates are the fundamental building blocks of digital circuits. They take one or two binary inputs (0 or 1) and produce a single binary output according to Boolean logic rules. The gates you need for GCSE are: AND, OR, NOT, NAND, NOR and XOR. They are used to build processors, memory and all digital systems.

What is the difference between NAND and NOR gates?

A NAND gate outputs 1 in every case except when both inputs are 1. A NOR gate outputs 1 only when both inputs are 0. Both are called "universal gates" because any other gate can be built entirely from NAND or NOR alone.

Do I need to draw logic gate symbols in the exam?

Yes. AQA, OCR and Cambridge all require students to draw and interpret logic gate symbols using the standard British (BS) symbols used in this simulator. You may be asked to complete truth tables or draw circuits from Boolean expressions.

What is a truth table?

A truth table lists all possible combinations of inputs and shows the resulting output. For two inputs (A, B) there are 4 rows. For three inputs there are 8 rows (2³). Always work through the rows systematically — start with A=0,B=0 and increment in binary.

Related resources