Intermediate

Boolean Logic: Gates and Truth Tables

AicademyAicademy
·GCSE Computer Science·AQA 8525·7 slides
3.4.2 Boolean logic

Logic Gates: Binary Decisions

A logic gate is a circuit component that takes one or more binary inputs (0 or 1) and produces a single binary output according to a fixed rule. Digital computers are built from billions of these gates.

The output of each gate is determined entirely by its inputs — there is no analogue gradation. Logic gates are the physical implementation of Boolean algebra, a mathematical system where values are either true (1) or false (0).

AQA 8525 requires knowledge of four gates:

GateInputsCore rule
NOT1Inverts the input
AND2 or moreOutput is 1 only if all inputs are 1
OR2 or moreOutput is 1 if at least one input is 1
XOR2Output is 1 if inputs are different

NAND and NOR gates are explicitly excluded from AQA 8525. Do not use them in answers unless the question supplies them.

Logic gates underpin all digital processing — from the arithmetic logic unit (ALU) inside a CPU to the condition checks in every if statement.

The NOT Gate

The NOT gate (also called an inverter) takes one input and produces its opposite. If the input is 1, the output is 0; if the input is 0, the output is 1.

Boolean notation: (A with an overbar, read "NOT A")

Truth table:

A (NOT A)
01
10

The NOT gate is the only single-input gate in AQA 8525. The circuit symbol is a triangle pointing right with a small circle (bubble) at the output.

Worked example — evaluate for both input values:

  • A = 0 → NOT gate inverts → output = 1
  • A = 1 → NOT gate inverts → output = 0

A truth table for a single-input gate always has exactly 2 rows ( input combinations). For 2 inputs: 4 rows. For 3 inputs: 8 rows.

The overbar in Boolean algebra () means "the complement of A". It always produces the opposite of A's current value.

AND and OR Gates

AND gate — output is 1 only when all inputs are 1. If any input is 0, the output is 0.

OR gate — output is 1 when at least one input is 1. Output is 0 only when all inputs are 0.

Boolean notation:

  • AND: (written A.B)
  • OR: (written A+B)

Truth tables (two inputs):

ABA.B (AND)A+B (OR)
0000
0101
1001
1111

AND produces a 1 in only one row (both inputs 1). OR produces a 1 in three rows (anything except both 0).

Worked example — evaluate where A = 1, B = 0, C = 1:

  1. = 1 AND 0 = 0
  2. = NOT(1) = 0
  3. = 0 OR 0 = 0 → final output = 0

AND is the stricter gate — all inputs must be 1. OR is more permissive — just one 1 is enough.

4 more slides

Continue this lesson

Create a free account to unlock all 7 slides, track your progress, and ask the AI tutor for help.

Related lessons

7 Slides

Lesson

The Fetch-Decode-Execute Cycle

GCSE Computer Science · AQA 8525

1 day ago

7 Slides

Lesson

Binary Addition and Logical Shifts

GCSE Computer Science · AQA 8525

7 hours ago