Open the app
  1. Home
  2. Lessons
  3. GCSE & IGCSE Computer Science
  4. Logic gates and truth tables

Logic gates and truth tables

🎬 The doodle video for this lesson is coming soon. Subscribe on YouTube to see it first.

At the lowest level, computers make decisions with logic gates. Three gates are the building blocks.

AND, OR, NOT

AND: output is 1 only if both inputs are 1.
OR: output is 1 if at least one input is 1.
NOT: has one input and flips it: 1 becomes 0, 0 becomes 1.

Truth tables

A truth table lists every possible input and the output.

Combining gates

Work through combined expressions one step at a time, like brackets in maths.
NOT (A AND B) with A = 1, B = 1: A AND B = 1, so NOT 1 = 0.
Worked example

Find (A OR B) AND C when A = 0, B = 1, C = 1.

  1. Brackets first: A OR B = 0 OR 1 = 1.
  2. Then 1 AND C = 1 AND 1 = 1.

Answer: 1

Key idea

AND needs both inputs to be 1. OR needs at least one. NOT flips the input. Work out combined expressions bracket by bracket.

The interactive lesson includes the diagrams for this topic.

Check you have got it

Answer 6 quick questions with instant marking. If you get one wrong, GCSE-ready shows you why and gives you another go. It is free, and you do not need an account.