Logic Gates Explained - IGCSE / O-Level Computer Science (AND, OR, NOT, NAND, NOR, XOR)
Every computer, phone and games console makes billions of decisions every second — using nothing but 1s and 0s. The components that make those decisions are called logic gates. This lesson covers all six gates you need for IGCSE / O-Level Computer Science, their truth tables, Boolean notation, and how to combine them into real circuits.
Binary: 1 and 0
In digital logic, 1 = TRUE / ON / HIGH voltage, and 0 = FALSE / OFF / LOW voltage. Every input and output of a logic gate is always one of these two values.
What is a logic gate?
A logic gate is an electronic component with one or more binary inputs and exactly one binary output. It follows a fixed rule, described by a truth table — a list of every input combination and the output it gives.
The six logic gates
| Gate | Rule | Notation |
|---|---|---|
| NOT | Flips the input (0 to 1, 1 to 0) | NOT A |
| AND | Output 1 only if all inputs are 1 | A · B |
| OR | Output 1 if any input is 1 | A + B |
| NAND | AND, then inverted (0 only if all 1s) | NOT(A · B) |
| NOR | OR, then inverted (1 only if all 0s) | NOT(A + B) |
| XOR | Output 1 only if inputs differ | A ⊕ B |
Combining gates: a worked example
Circuits chain gates together. For Q = A AND (NOT B), invert B first, then AND with A:
| A | B | NOT B | Q |
|---|---|---|---|
| 0 | 0 | 1 | 0 |
| 0 | 1 | 0 | 0 |
| 1 | 0 | 1 | 1 |
| 1 | 1 | 0 | 0 |
A real-world example
A burglar alarm might sound when the system is Armed AND (a Door OR a Window is opened): Alarm = Armed AND (Door OR Window) — an OR gate feeding into an AND gate.
Exam tips
- Don't confuse AND (all inputs) with OR (any input).
- Remember NAND and NOR are the inverted versions of AND and OR.
- Draw each gate symbol precisely — the shape matters.
- Always complete every row of a truth table, in order.
Subscribe to ISLAC on YouTube for a new IGCSE / O-Level lesson every day.
Comments
Post a Comment