Logic gates and circuits
Inside every processor are billions of tiny logic gates. Each gate takes 1s and 0s in and gives a 1 or 0 out.
Three gates
| Gate | Inputs | Output is 1 when... |
|---|---|---|
| AND gate | 2 | both inputs are 1 |
| OR gate | 2 | at least one input is 1 |
| NOT gate | 1 | the input is 0 (it inverts the input) |
Combining gates
We can write a circuit as an expression, such as Q = (A AND B) OR C.
Work out the brackets first, just like in maths.
If A = 1, B = 0, C = 1: A AND B = 0, then 0 OR 1 = 1.
A real use: seatbelt warning
E = engine on (1 = on), S = seatbelt fastened (1 = fastened).
Light = E AND (NOT S)
| E | S | NOT S | Light |
|---|---|---|---|
| 0 | 0 | 1 | 0 |
| 0 | 1 | 0 | 0 |
| 1 | 0 | 1 | 1 |
| 1 | 1 | 0 | 0 |
Q = NOT (A OR B). Find Q when A = 0 and B = 1.
- A OR B = 0 OR 1 = 1.
- NOT 1 = 0.
Answer: Q = 0
AND gates output 1 only if both inputs are 1; OR gates output 1 if either input is 1; NOT gates invert. Work out combined circuits from the inside out.
- Logic gates
- AND: 1 only if both inputs are 1. OR: 1 if at least one input is 1. NOT: flips 0 to 1 and 1 to 0.
- AND
- A Boolean operator that gives True (1) only when both inputs are True.
- Output
- Information sent out from a computer, for example to a screen, speaker or printer.
- Input
- Data put into a computer, for example from a keyboard, mouse, microphone or sensor.
- NOT
- A Boolean operator that flips its input: True becomes False and False becomes True.
Try two quick questions
See if it has sunk in. Answers are marked straight away.
2 more questions
Try each one, then tap to check.
An AND gate has inputs 0 and 1. What is the output?
Show the answer
Answer: 0
AND needs both inputs to be 1.
An OR gate has inputs 1 and 0. What is the output?
Show the answer
Answer: 1
OR outputs 1 if at least one input 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.
Facts checked against the sources below, 27 October 2026. Last updated 2 October 2026. Spotted a mistake? Tell us and we will fix it.