You are viewing a free preview of this lesson.
Subscribe to unlock all 10 lessons in this course and every other course on LearningBro.
This lesson brings together everything you have learned about Boolean logic and provides exam-style practice. It covers the key skills tested in GCSE Computer Science exams (AQA specification 3.3.2 and OCR specification 1.4.2): truth tables, Boolean expressions, logic circuits and simplification.
In your GCSE Computer Science exam, Boolean logic questions typically ask you to:
Questions are usually worth 2–6 marks. Truth table questions often ask you to complete 4 or 8 rows. Expression and circuit questions may ask you to show a step-by-step process.
| Gate | Expression | Output is 1 when... |
|---|---|---|
| NOT | ¬A | Input is 0 |
| AND | A ∧ B | Both inputs are 1 |
| OR | A ∨ B | At least one input is 1 |
| XOR | A ⊕ B | Inputs are different |
| NAND | ¬(A ∧ B) | Not both inputs are 1 |
| NOR | ¬(A ∨ B) | Both inputs are 0 |
The decision tree below summarises a sensible approach when you first read an exam question:
graph TD
Start["Read the question"] --> Q1{"What is given?"}
Q1 -->|Truth table| A1["Identify gate or<br/>write sum-of-products"]
Q1 -->|Boolean expression| A2["Build truth table<br/>or draw the circuit"]
Q1 -->|Logic circuit| A3["Trace each gate<br/>to find expression"]
A1 --> Check["Check 2^n rows<br/>and verify a few rows"]
A2 --> Check
A3 --> Check
Check --> Done["Write final answer<br/>showing working"]
Complete the truth table for the expression Q = ¬A ∧ B (3 marks)
| A | B | ¬A | Q = ¬A ∧ B |
|---|---|---|---|
| 0 | 0 | ? | ? |
| 0 | 1 | ? | ? |
| 1 | 0 | ? | ? |
| 1 | 1 | ? | ? |
Solution:
| A | B | ¬A | Q = ¬A ∧ B |
|---|---|---|---|
| 0 | 0 | 1 | 0 |
| 0 | 1 | 1 | 1 |
| 1 | 0 | 0 | 0 |
| 1 | 1 | 0 | 0 |
Method: First calculate ¬A (opposite of A), then AND it with B.
The following truth table represents which logic gate? (1 mark)
| A | B | Q |
|---|---|---|
| 0 | 0 | 1 |
| 0 | 1 | 1 |
| 1 | 0 | 1 |
| 1 | 1 | 0 |
Answer: NAND gate — the output is the inverse of AND. The only row with output 0 is when both inputs are 1.
Write the Boolean expression for a circuit where input A passes through a NOT gate, and the result is ORed with input B. (2 marks)
Answer: Q = ¬A ∨ B
Step by step:
Complete the truth table for Q = (A ∧ B) ∨ C (4 marks)
| A | B | C | A ∧ B | Q = (A ∧ B) ∨ C |
|---|---|---|---|---|
| 0 | 0 | 0 | 0 | 0 |
| 0 | 0 | 1 | 0 | 1 |
| 0 | 1 | 0 | 0 | 0 |
| 0 | 1 | 1 | 0 | 1 |
| 1 | 0 | 0 | 0 | 0 |
| 1 | 0 | 1 | 0 | 1 |
| 1 | 1 | 0 | 1 | 1 |
| 1 | 1 | 1 | 1 | 1 |
Method: First calculate A ∧ B for each row, then OR the result with C.
Simplify the expression: (A ∧ B) ∨ (A ∧ ¬B) (3 marks)
Solution:
Answer: A
For the circuit below, determine the output Q when A = 1, B = 0, C = 1.
+------\
A ----| )---+ +------\
B ----| ) +-----| \
+------/ | )---- Q
AND +---| /
+-----\ | +------/
C ----| >o-----+ OR
+-----/
NOT
Expression: Q = (A ∧ B) ∨ ¬C
Solution:
Answer: Q = 0
Use De Morgan's Law to simplify ¬(A ∨ B). (2 marks)
Answer: ¬(A ∨ B) = ¬A ∧ ¬B
De Morgan's Law states: "Break the bar, change the sign." The OR becomes AND, and both variables are negated.
Verification by truth table:
| A | B | A ∨ B | ¬(A ∨ B) | ¬A | ¬B | ¬A ∧ ¬B |
|---|---|---|---|---|---|---|
| 0 | 0 | 0 | 1 | 1 | 1 | 1 |
| 0 | 1 | 1 | 0 | 1 | 0 | 0 |
| 1 | 0 | 1 | 0 | 0 | 1 | 0 |
| 1 | 1 | 1 | 0 | 0 | 0 | 0 |
Both columns are identical, confirming the simplification is correct.
Draw a logic circuit for the expression Q = A ∧ (B ∨ ¬B). Then simplify. (4 marks)
Circuit:
+-----\
B -+--| >o---+
| +-----/ | +------\
| NOT +---| \
| | | )---+ +------\
+--------------+---| / +---| )---- Q
+------/ | | )
OR A---| )
+------/
AND
Simplification:
Simplified answer: Q = A
The entire circuit simplifies to just a wire from A to Q.
Always show your working — use intermediate columns in truth tables and show each step when simplifying expressions.
Check your row count — for n inputs, you must have exactly 2^n rows. Two inputs = 4 rows. Three inputs = 8 rows.
Use the binary counting method to fill in input columns — this ensures you never miss a combination.
Memorise all six gates — know the truth table, symbol and expression for NOT, AND, OR, XOR, NAND and NOR.
Know De Morgan's Laws — these are commonly tested and can simplify expressions significantly.
Verify your answer — if time permits, check one or two rows of your truth table by substituting values back into the expression.
Draw neat diagrams — in circuit-drawing questions, use the standard symbols and label all inputs and outputs clearly.
Look for patterns — if a truth table matches XOR (0, 1, 1, 0), state it. If it matches NAND (1, 1, 1, 0), name it. This shows the examiner you understand the concepts.
Build the truth table for Q = (A ∨ B) ∧ ¬(A ∧ B). (4 marks)
Subscribe to continue reading
Get full access to this lesson and all 10 lessons in this course.