FutureLogic Blog → Boolean Logic → IGCSE 0478

What are logic gates? NOT, AND and OR explained

Logic gates are electronic circuits that process binary inputs to produce a binary output. NOT reverses one input; AND outputs 1 only when both inputs are 1; OR outputs 1 when at least one input is 1.

Learn Cambridge IGCSE Computer Science 0478, Topic 10.1–10.4, with clear diagrams, truth tables, worked examples and exam practice.

What is a logic gate?

A logic gate is an electronic circuit that applies a logical operation to one or more binary inputs to produce a binary output. The binary values 0 and 1 can represent FALSE and TRUE, or OFF and ON.

Binary input(s) → logical operation → binary output.

Logic gates are building blocks of digital systems. They combine signals from switches or sensors to control outputs such as warning lamps or electronic locks. A truth table lists every possible input combination and the output.

Cambridge syllabus focus

Sections 10.1–10.4: the role of logic gates and NOT, AND and OR. Later articles cover NAND, NOR, XOR, expressions, circuits, truth tables and problem statements.

10.2 — How does the NOT gate work?

NOT has one input and reverses it. The small circle on the output side represents inversion.

AX
NOT gate — inputs left, output right
X = NOT A
ANOT A
01
10

Check your understanding

What is NOT 0?

Reveal answer

1 — NOT reverses the input.

10.3 — How does the AND gate work?

AND outputs 1 only when both inputs are 1. A machine might run only when its guard is closed AND its start button is pressed.

ABX
AND gate — inputs left, output right
X = A AND B
ABA AND B
000
010
100
111

Check your understanding

What is 1 AND 0?

Reveal answer

0 — both inputs are not 1.

10.4 — How does the OR gate work?

OR outputs 1 when at least one input is 1, including when both are 1. A warning lamp might activate when a temperature sensor OR a pressure sensor detects a problem.

ABX
OR gate — inputs left, output right
X = A OR B
ABA OR B
000
011
101
111

Check your understanding

What is 1 OR 1?

Reveal answer

1 — at least one input is 1.

AND versus OR — what is the difference?

AND needs both inputs to be 1. OR needs at least one input to be 1. In particular, 1 OR 1 = 1; this is not the same as XOR.

ABANDOR
0000
0101
1001
1111

How do you complete a truth table?

  1. Identify the input variables and the gate.
  2. List every combination. For two inputs: 00, 01, 10, 11.
  3. Apply the gate rule to each row.
  4. Check the output against the gate's defining condition.

For n independent binary inputs, a complete truth table needs 2n rows. One input needs two rows; two inputs need four.

Worked example — NOT followed by AND

Consider X = (NOT A) AND B. First reverse A, then AND the result with B. Use an intermediate column to avoid losing track of the NOT operation.

ABNOT A(NOT A) AND B
0010
0111
1000
1100

The output is 1 only when A = 0 and B = 1. For more complex circuits, continue to our step-by-step truth-table exam method.

Examiner insights — February/March 2026

The Cambridge February/March 2026 Paper 2 Principal Examiner Report says most candidates drew good logic-circuit diagrams and completed the truth table accurately for Question 7. Some gate symbols were drawn imprecisely, particularly NOR and XOR, and a small number of outputs were inverted, possibly because a NOT operation was added or missed.

FutureLogic study advice: learn the distinctive symbols, label inputs and outputs, and check each inversion separately. These observations concern the February/March 2026 series only.

Common exam mistakes

✗ Mixing up AND and OR.

AND needs both; OR needs at least one.

✗ Thinking OR excludes both inputs being 1.

OR gives 1 when both are 1.

✗ Forgetting NOT inversion.

NOT 0 = 1; NOT 1 = 0.

✗ Missing rows.

List all input combinations before filling outputs.

Original FutureLogic exam-style practice

Original educational questions, not official Cambridge questions. Suggested marks are indicative.

Question 1 (2 marks)

Describe the role of a logic gate and state the two possible output values.

Reveal model answer

A logic gate performs a logical operation on binary input(s) (1) and produces an output of either 0 or 1 (1).

Question 2 (2 marks)

Explain why an AND gate outputs 0 when A = 1 and B = 0.

Reveal model answer

AND produces 1 only when both inputs are 1 (1). B is 0, so the condition is not met (1).

Question 3 (4 marks)

Construct a four-row truth table for X = A OR B.

Reveal model answer

For input combinations 00, 01, 10 and 11, outputs are 0, 1, 1 and 1.

Question 4 (4 marks)

Construct the truth table for X = (NOT A) AND B, including an intermediate column.

Reveal model answer

NOT A: 1, 1, 0, 0. Final X: 0, 1, 0, 0 for inputs 00, 01, 10, 11.

Quick quiz

  1. How many inputs does NOT have?
  2. When does AND output 1?
  3. When does OR output 0?
  4. How many truth-table rows for two inputs?
  5. What does the small circle on NOT represent?

Quiz answers

Reveal answers
  1. One.
  2. When both inputs are 1.
  3. When both inputs are 0.
  4. Four.
  5. Inversion.

Final summary

NOT

Reverses one input.

AND

Both inputs must be 1.

OR

At least one input must be 1.

Truth table

Every input combination and its output.

NOT reverses. AND requires both. OR accepts either or both.

Ready to practise Boolean logic?

Try the interactive Gates Lab and apply what you have learned.