📐 Paper 1 · Topic 1: Computational Thinking
1.3 Boolean Logic & Truth Tables✓ FREE
Edexcel 1CP2 · GCSE Computer Science · ~13 min read
Notes
──
Video
──
Slides
──
Worksheet
──
Quiz

What is Boolean Logic?

Boolean logic is a system of logic based on only two possible values: True or False — represented in computing as 1 (True) and 0 (False). It was developed by mathematician George Boole in the 19th century and is fundamental to how computers process decisions and data.

Every decision a computer makes — from checking a password to displaying a webpage — ultimately reduces to Boolean logic. Processors work using billions of tiny switches (transistors) that are either on (1) or off (0), making Boolean logic the language of hardware itself.

  • Boolean values: True / False or equivalently 1 / 0
  • Used in conditions, loops, and decision-making in programs
  • The basis of all digital circuit design

The Three Basic Boolean Operators

Edexcel 1CP2 requires you to know three Boolean operators: AND, OR, and NOT. Each takes Boolean inputs and produces a Boolean output.

AND Operator

The AND operator returns True only when ALL inputs are True. If any input is False, the result is False. Think of it as: "both conditions must be met."

ABA AND B
000
010
100
111

Example: A door unlocks if the card is valid AND the PIN is correct. Both must be True.

OR Operator

The OR operator returns True when AT LEAST ONE input is True. It only returns False when all inputs are False. Think of it as: "at least one condition must be met."

ABA OR B
000
011
101
111

Example: An alarm triggers if motion is detected OR a window is broken. Either condition is enough.

NOT Operator

The NOT operator takes a single input and inverts it. True becomes False, and False becomes True.

ANOT A
01
10

Example: A light turns on if the room is NOT already lit.

Combining Operators

Boolean operators can be combined to create more complex logic expressions. When evaluating combined expressions, work from the inside out — resolve brackets first, then apply outer operators.

Worked Example: NOT(A AND B)

This expression first evaluates A AND B, then inverts the result using NOT.

ABA AND BNOT(A AND B)
0001
0101
1001
1110

Notice that NOT(A AND B) is only False when both A and B are True.

Truth Tables

A truth table is a systematic table that lists every possible combination of inputs and their corresponding output for a Boolean expression. Truth tables are the standard way to prove how a logic expression behaves.

Two-Input Truth Tables (4 rows)

With 2 inputs (A and B), there are 4 possible combinations: 00, 01, 10, and 11. Always list them in this order to be systematic.

ABOutput
00...
01...
10...
11...

Three-Input Truth Tables (8 rows)

With 3 inputs (A, B, C), there are 8 possible combinations (2³ = 8). List them systematically — C alternates every row, B alternates every 2 rows, A alternates every 4 rows.

ABCOutput
000...
001...
010...
011...
100...
101...
110...
111...
Exam tip: The number of rows in a truth table is always 2n, where n is the number of inputs. With 1 input: 2 rows. With 2 inputs: 4 rows. With 3 inputs: 8 rows. Always list input combinations in binary counting order (00, 01, 10, 11) so you never miss one. In the exam, add an intermediate column for each step when evaluating complex expressions like NOT(A AND B) — examiners award marks for working.
⚠️ Common Mistakes
  • Confusing AND with OR — AND needs ALL inputs to be True; OR only needs ONE input to be True
  • Forgetting that NOT only takes ONE input — it cannot be written as NOT(A, B)
  • Missing rows in a truth table — always check you have exactly 2n rows
  • Writing truth table rows in a random order — always use binary counting order (00, 01, 10, 11) for consistency
  • Not showing working for combined expressions — always add an intermediate column
Video coming soon
In production

Key points

  • Boolean logic uses only two values: True/False (1/0)
  • AND: returns True only when ALL inputs are True
  • OR: returns True when AT LEAST ONE input is True
  • NOT: inverts its single input — True becomes False, False becomes True
  • Truth table rows = 2ⁿ where n is the number of inputs
  • Always list input combinations in binary counting order
Click slide or press arrow keys to navigate
✍️

Worksheet — 1.3 Boolean Logic & Truth Tables

8 Edexcel-style questions · instantly marked

Q1What is a Boolean value? Give two examples.[2]
✅ Mark scheme
A Boolean value is a value that can only be one of two states [1]. Examples: True or False / 1 or 0 / on or off [1 for any two correct examples].
Q2Complete a truth table for the NOT operator showing all possible inputs and their outputs.[2]
✅ Mark scheme
Table must have 2 rows [1]: A=0 → NOT A=1 [1]; A=1 → NOT A=0 [1]. (Award 1 mark for correct column headings and 1 mark for both rows correct.)
Q3Complete a truth table for the AND operator with inputs A and B, showing all four possible input combinations.[3]
✅ Mark scheme
Four rows required [1]: 0,0→0; 0,1→0; 1,0→0; 1,1→1 [1 per correct pair of rows, up to 2 marks]. Only the final row (both inputs 1) gives output 1.
Q4Complete a truth table for the OR operator with inputs A and B, showing all four possible input combinations.[3]
✅ Mark scheme
Four rows required [1]: 0,0→0; 0,1→1; 1,0→1; 1,1→1 [1 per correct pair of rows, up to 2 marks]. Only the first row (both inputs 0) gives output 0.
Q5What is the output of A AND B when A = 1 and B = 0? Explain your reasoning.[2]
✅ Mark scheme
Output = 0 (False) [1]. The AND operator only returns True (1) when ALL inputs are True — since B = 0, not all inputs are True, so the result is 0 [1].
Q6Evaluate NOT(A OR B) when A = 0 and B = 0. Show your working step by step.[2]
✅ Mark scheme
Step 1: Evaluate A OR B → 0 OR 0 = 0 [1]. Step 2: Apply NOT → NOT(0) = 1. Final answer: 1 (True) [1].
Q7A security system unlocks if the card is valid AND the PIN is correct, OR the master key is used. Let C = card valid, P = PIN correct, M = master key used. Write a Boolean expression and complete a truth table for the case where M = 0 (master key not used), showing all combinations of C and P.[3]
✅ Mark scheme
Boolean expression: (C AND P) OR M [1]. With M=0, this simplifies to C AND P [1]. Truth table (4 rows, M=0): C=0,P=0→0; C=0,P=1→0; C=1,P=0→0; C=1,P=1→1 [1 for all rows correct].
Q8Explain why a truth table for 3 inputs has 8 rows.[3]
✅ Mark scheme
Each input can be either 0 or 1 — two possible values [1]. The number of combinations is calculated using 2ⁿ, where n is the number of inputs [1]. With 3 inputs: 2³ = 2 × 2 × 2 = 8 rows [1].
Topic Quiz
Q 1 of 15
You scored
out of 15
Click to reveal definition
🎉
Session complete!
TermDefinition
🎯

Mini Test — Boolean Logic & Truth Tables

Timed exam-style test.

← 1.2k Records & Hash TablesTopic 1 → Topic 2Next: 2.1a Binary & Denary →