Logic gates and truth tables

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

Practise this lesson free (6 questions)

More tools

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.
ABA AND BA OR B
0000
0101
1001
1111

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.

Quick check

Try two quick questions

See if it has sunk in. Answers are marked straight away.

Extra practice

2 more questions

Try each one, then tap to check.

  1. What is the output of an AND gate when A = 1 and B = 1?

    Show the answer

    Answer: 1

    AND needs both inputs to be 1. So the output is 1.

  2. What is the output of an OR gate when A = 1 and B = 0?

    Show the answer

    Answer: 1

    OR outputs 1 if at least one input is 1. So the output is 1.

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.

Video for this lesson coming soon. Subscribe on YouTube

Sources and references

Facts checked against the sources below, 17 October 2026. Last updated 2 October 2026. Spotted a mistake? Tell us and we will fix it.

What do exam command words like explain and evaluate mean? โ†’

Related lessons