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.

AND OR NOT

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

GateRuleNotation
NOTFlips the input (0 to 1, 1 to 0)NOT A
ANDOutput 1 only if all inputs are 1A · B
OROutput 1 if any input is 1A + B
NANDAND, then inverted (0 only if all 1s)NOT(A · B)
NOROR, then inverted (1 only if all 0s)NOT(A + B)
XOROutput 1 only if inputs differA ⊕ B

Combining gates: a worked example

Circuits chain gates together. For Q = A AND (NOT B), invert B first, then AND with A:

ABNOT BQ
0010
0100
1011
1100

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

Popular posts from this blog

Photosynthesis Explained – IGCSE & O Level Biology (Video Lesson)

Demand & Supply Explained — IGCSE Economics (Curves, Shifts & Equilibrium)