← Computer Science

Boolean logic — Lesson 1: Logic gates

Logic gates are the building blocks of every digital circuit. Each gate takes one or more binary inputs (0 or 1) and produces a single binary output by following a fixed rule. This lesson covers the gates you need for IGCSE and the truth table for each.

Slide 1 / 4

What a logic gate is

inputs (0 or 1) A B LOGIC GATE output a single 0 or 1
  • A logic gate takes one or more binary inputs (0 or 1) and gives a single binary output.
  • A 1 usually means TRUE / on / high, and a 0 means FALSE / off / low.
  • Each gate follows a fixed rule shown by its truth table, which lists the output for every possible combination of inputs.
  • NOT has one input. For IGCSE, every other gate has two inputs. Gates are wired together to build circuits.

Check you've got it

0/4

1. A 2-input AND gate has inputs A = 1 and B = 0. What is its output?

2. Which gate outputs 1 only when all of its inputs are 0?

3. A NOT gate is given an input of 0. What is its output?

4. For a 2-input XOR gate, which pair of inputs gives an output of 1?

Practise exam-style questions on this

Type your answer, see your mark against the mark scheme in seconds. Free, 5 a day.

Start practising →

Teaching this topic?

Mark your whole class's answers and see who's stuck, for £19 a month.

See the class plan →

Free revision content. Multiple-choice answers are marked instantly. Written answers are marked by AI on /free-mark. Independent, not endorsed by Cambridge International.