FL
🔗 Topic 10 Boolean logic · 10.8 · 10.9 · 10.10

10.8–10.10 Composition Lab

The three-way conversion muscle. Expression ↔ truth table ↔ circuit. Every Cambridge Paper 2 tests this. Every year. Without fail.

⚠️ Lab A · Signal is a strong prerequisite. Lab B assumes you know all six gate symbols and their truth tables. If that's not solid, brush up on Lab A first — but you can carry on here anyway. Your call.
🧪 Exam Mode ON — recall from memory, then reveal
§1 · Topic Overview

Where Lab B sits

In Lab A you learnt the six gates in isolation. Lab B is where they become useful. You'll wire them together into logic circuits and convert freely between three representations:

  • Logic expression — e.g. X = (A AND B) OR NOT C
  • Truth table — every input combination and its output
  • Logic circuit — the actual wired diagram

Cambridge tests this every year without fail: 2022 F/M22 Q3, M/J22 Q4, 2023 Q9, 2024 Q8, 2025 Q7. Master the three-way conversion and you own the second half of Paper 2's logic content.

🔗 The Circuit metaphor

"The gates compose. The circuit computes the function." Each of the three forms describes the same function. Move between them fluently — that's what Lab B teaches.

§2 · Learning Objectives

By the end of Lab B you will be able to:

  • Read a logic expression and draw the corresponding logic circuit
  • Read a logic circuit and write the corresponding logic expression
  • Complete a truth table from a logic expression (row by row, using intermediate columns)
  • Complete a truth table from a logic circuit (labelling intermediate outputs D, E)
  • Derive a logic expression from a completed truth table using sum-of-products (NOT + AND + OR only)
  • Understand bracketing / precedence — avoid the NOT (B OR C) vs B OR NOT C trap
§3 · Key Terminology

Six new terms (inherits all Lab A terms)

Logic circuit — a combination of several logic gates that are linked.
Intermediate output — the output of a gate inside a circuit that becomes the input of the next gate. Usually labelled D, E, F.
Working space — the truth-table columns for intermediate outputs. Cambridge often provides these to help you track values.
Sum-of-products — a method for writing an expression from a truth table: for each row where output = 1, write an AND of the row's variables (each 1 as-is, each 0 as NOT-of), then join all such AND terms with OR.
Bracket / grouping — parentheses that determine which parts of an expression evaluate first. Innermost first, same as maths.
Final gate — the last gate in a circuit; the one whose output is the overall output. Start here when writing expressions or building circuits.
§4 · Core Theory · four skills

§4.1 · Circuit → truth table (Skills Focus 10.1)

  1. Count the inputs. 2 inputs → 4 rows. 3 inputs → 8 rows. Set up the skeleton first.
  2. Fill inputs in binary-count order. 000 · 001 · 010 · 011 · 100 · 101 · 110 · 111. Same order every time.
  3. Label intermediate outputs. Where a gate's output feeds another gate's input, label it D, E, F. Add columns to your truth table.
  4. Fill each intermediate column, gate by gate. One column at a time. All rows before moving to the next.
  5. Fill the final output column using the intermediate columns as inputs to the final gate.
Cambridge stem: "Complete the truth table for the given logic statement" — 2022 M/J22 P22 Q4(b), and dozens more.

§4.2 · Circuit → expression (§10.8)

  1. Start with the output label and equals sign: Y =
  2. Identify the final gate (the one whose output is the circuit output). Write its word: Y = AND.
  3. Look at what feeds each input of the final gate. Each becomes a bracketed sub-expression.
  4. Recurse. If a sub-expression contains a gate, apply the same method to it.
Worked example (textbook §10.8): the OR/NOT/AND circuit yields Y = (A OR B) AND (NOT C).

§4.3 · Truth table → expression (§10.9 · sum-of-products)

Key rule: only NOT, AND, OR are used to construct expressions from truth tables. The other three gates (NAND, NOR, XOR) are for identification and evaluation, not construction.

  1. Look only at rows where the output is 1. Ignore the rest.
  2. For each such row, write an AND expression: for each input that's 1, write the variable; for each input that's 0, write NOT variable. Join with AND.
  3. Join all row-expressions with OR. Result: X = (row1) OR (row2) OR (row3)…
Worked example (textbook §10.9): a 2-input truth table with output 1 at (0,1) and (1,1) yields X = (NOT A AND B) OR (A AND B).

§4.4 · Expression → circuit (§10.10)

Reverse of §4.2. Read the expression, draw the circuit from the right (final gate) working left.

  1. Identify the outermost gate. The gate joining the outermost brackets. Draw it on the right of your page.
  2. Each bracketed section is an input to the outermost gate. For each, identify its own outermost gate. Draw it feeding into the outer gate.
  3. Recurse for each sub-bracket.
  4. Plain variables (A, B, C) become input lines on the far left.
§5 · Worked Examples · six across the four skills

The composition muscle, worked step by step

Each example follows the textbook method exactly. Given → step-by-step → trace → result → why it works.

§6 · Common Misconceptions · 10 traps

Where students lose marks (and how not to)

§7 · Cambridge Exam Focus

Mark-scheme language — memorise these phrases

"Consider the following logic statement" — stem for expression → circuit + truth-table questions
"Draw a logic circuit to represent the given logic statement" — verbatim from every year 2022–2025
"Do not attempt to simplify the logic statement" — critical constraint · translate literally, don't optimise
"All logic gates must have a maximum of two inputs" — recurring exam constraint
"Complete the truth table for the given logic statement" — recurring stem
"Working space" — Cambridge's own heading for intermediate-output columns · use them
"Write a logic expression for the given logic circuit" — recurring stem
"as shown on the syllabus" — Cambridge phrasing when symbol correctness matters
§8 · Quick Knowledge Check · 8 questions

0 / 8 revealed

Q1 · How many rows does a truth table for a 3-input circuit have?
8. 2^n rows for n inputs. 2 inputs → 4 rows. 3 inputs → 8. 4 inputs → 16.
Q2 · What is the first step when writing a logic expression from a circuit?
Start with the output label and an equals sign — e.g. Y = . Then identify the final gate.
Q3 · When drawing a circuit from an expression, which gate do you draw first?
The final (outermost) gate. Draw it on the right side of your page. Work backwards from there.
Q4 · When writing a logic expression from a truth table, which rows do you focus on?
Rows where the output is 1. Ignore all other rows. This is the sum-of-products method.
Q5 · Which three gates are used in sum-of-products construction?
NOT, AND, OR only. NAND, NOR, XOR are for identification and evaluation — not for building expressions from truth tables. (Textbook §10.9.)
Q6 · What does the column heading "A B C" tell you at the top of a truth table?
The three input variables, in binary-count order left to right. A is MSB, C is LSB. The output column comes after.
Q7 · What is an intermediate output?
The output of a gate inside a circuit that becomes the input of the next gate. Usually labelled D, E, F. Cambridge often provides columns for these under "Working space".
Q8 · What does "Working space" mean in a Cambridge truth-table question?
Columns for intermediate outputs where you can track values as you work through the circuit. Use them — they're marks-earning.
§9 · Ready for the next lab?

✅ You can convert freely between the three representations.

Expression ↔ truth table ↔ circuit — you know the sum-of-products method, you catch the B OR NOT C vs NOT (B OR C) trap, and you always start from the final gate.

Next up: Lab C · Purpose (Application) — where you'll read real-world problem statements and translate them into gates, circuits, and truth tables. This is the exam integration lab.

📊 Where you are

0Practice attempts
0Exam questions
0Skills mastered

🎯 Weakest modes

🔥 Revise next

🔗 The Circuit arc

Signal taught you the gates. Circuit (this lab) teaches you to compose them. Purpose teaches you to read a real-world problem and translate it into gates.

The gates compose. The circuit computes the function.

🎓 The composition muscle

Learn slows down what Book Notes covered. Each of the four skills gets a walk-through. When you're comfortable, head to Activities and open the Circuit Builder.

The three representations — same function, three views

Every logic function has three equivalent forms. Being fluent in all three — and moving between them — is the whole point of Lab B.

FormExampleBest for
ExpressionX = (A AND B) OR NOT CCompact writing · algebra
Truth table8 rows · A/B/C/X columnsEnumerating every case · marking
Circuit3 gates wired · A/B → AND → OR ← NOT ← CHardware · visual reasoning

🔍 Contrast box · sum-of-products vs constant-value (audit fix #B-5)

Two methods for writing an expression from a truth table. Only one is safe for exams.

Sum-of-products (primary)

The safe method. Always works. Uses NOT, AND, OR only.

For each row where output = 1, write an AND term (1 as-is, 0 as NOT-of). Join with OR.

Example: output = 1 at (0,1) and (1,1) → (NOT A AND B) OR (A AND B)

Constant-value (stretch)

The shorter method. Sometimes.

Spot input values that stay constant across the output=1 rows. Use those to write a simpler expression.

Same example: B is always 1 in both output=1 rows → B. Same function, one letter.

Exam advice: Use sum-of-products by default. Constant-value is a stretch skill — save it for questions where it's clearly asked or where simplification is invited. If in doubt, sum-of-products always earns full marks.

The intermediate-column trick — Cambridge's own scaffold

Any time a gate's output feeds another gate, give it a label — D, E, F. Add a column to your truth table for each. Fill one column at a time, all rows, before moving on. This is what "Working space" means in Cambridge exams.

Example. For Y = (A OR B) AND NOT C:

ABCD
(A OR B)
E
(NOT C)
Y
(D AND E)
000010
001000
010111
011100
100111
101100
110111
111100

Notice. Column D is only A and B. Column E is only C. Column Y depends only on D and E. You never juggle three variables at once — that's what the intermediate columns are for.

Ready for Activities?

The Circuit Builder has 5 modes — one per Cambridge question shape. Start with Modes 4 and 5 (truth-table completion) — they're the highest-frequency Cambridge questions and they're the fastest to build fluency in. Modes 1, 2, 3 unlock once you've completed 4 and 5 once (progressive disclosure).

🎯 Cambridge exam anchors

  • 10.2.b — Multi-gate truth table
  • 10.2.c — Truth table from expression
  • 10.3.c — Circuit from truth table
  • 10.3.d — Circuit from expression
  • 10.4.b — Expression from truth table
  • 10.4.c — Expression from circuit

Not in this lab: problem-statement questions (10.3.b, 10.4.a) — those live in Lab C.

🎮 Circuit Builder

Five modes — one per Cambridge question shape. Each mode uses the parser under the hood: your answer is compared behaviourally, so (A AND B) OR C and C OR (A AND B) are both accepted; A OR (B AND C) (wrong grouping) is not.

Progressive disclosure: Modes 1, 2, 3 (build a circuit) unlock after you've completed Modes 4 and 5 (read one) at least once. Start with what's fast — the reading modes.

⌨️ Keyboard: Tab through gate palette · Enter to select · Arrow keys to position · Enter to place · Delete to remove. Wire tool: Tab to output pin · Space to start wire · Tab to target pin · Space to connect.

60-second Sprint

Mixed drills from Modes 4 and 5 (fast to answer). Adaptive: your weakest mode surfaces 2× more often. Streaks show at 3 · 6 · 10 correct.

60Seconds left
0Correct
0Streak

🔗 Mode coverage

Complete each mode at least once. Weak modes surface 2× more often.

💡 Mode guide

Mode 4 · Circuit → TT. See a circuit, complete the truth table cell by cell. Highest-frequency Cambridge question.

Mode 5 · Expression → TT. See an expression, fill the intermediate + output columns. Row-by-row discipline.

Mode 1 · Expression → Circuit. Read an expression, write your own equivalent (parser checks behavioural match).

Mode 2 · TT → Circuit. Given a truth table, write the sum-of-products expression.

Mode 3 · Circuit → Expression. Rendered circuit, you write the expression.

✎ Practice — 18 adaptive MCQs

Weighting adapts to your accuracy per mode. Missed questions log to Mistakes automatically.

🧪 Practice Exam Mode ON. No multiple-choice options shown — recall the answer, then reveal and self-mark.

📊 Practice stats

0Attempts
Accuracy

📋 Exam pool — 12 Paper 2 cited questions

Every question traces to a real Cambridge Paper 2 (P21/P22/P23 for 2023+, P11/P12/P13 for 2022 under the pre-syllabus-change format). Write your answer, then self-mark against the mark scheme.

📋 Exam stats

0Attempts
Average mark

🔄 Review — 10 traps + 6 memory triggers

Read before your exam. Look at Mistakes for the ones you keep making.

Examiner-cited & source-cited traps

🧠 Memory triggers

Six one-liners. Recite these before your exam and you own the composition muscle.

🎯 Your weakest modes

💔 Your logged mistakes

🏆 Mastery — 12-item revision checklist

Tick each item as you master it. Tap any status chip to override manually. When all 12 are ticked, the Module Mastered banner unlocks.

🏆 Module Mastered — Topic 10 · Lab B · Circuit complete!

Revision checklist

Skill grid — per-mode mastery

Mastered = 3+ attempts and ≥70% accuracy. Tap the status chip to override.

📊 Session summary

0Modes attempted
0Modes mastered
Complete Practice and Circuit Builder to unlock achievements.Achievement
💔 Mistakes

Your mistakes log

Every wrong answer captures here automatically.

📊 Progress

Progress dashboard

Your attempts, accuracy, and mastery counts across Lab B.

Practice

0Attempts
Accuracy

Exam

0Attempts
Avg mark

🎯 Weakest modes

🔖 Bookmarks

Bookmarked questions

📝 My Notes

Personal notes + feedback

Add note

Send feedback

Category
🗄️ Vault

Your knowledge vault

Saved ✓