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 from the Boolean Logic topic and provides exam-style practice for OCR J277 Paper 2 (Computational Thinking, Algorithms and Programming). Boolean logic questions appear in Paper 2 and can range from 1-mark recall questions to 6-mark extended response questions.
Boolean logic questions in OCR J277 Paper 2 may ask you to:
| Question type | Typical marks | What you need to do |
|---|---|---|
| Identify a gate from a truth table | 1-2 | Name the gate that matches the given truth table |
| Complete a truth table | 2-4 | Fill in missing output values for a given circuit |
| Draw a logic circuit | 2-3 | Draw the gates for a given Boolean expression |
| Write a Boolean expression | 2-3 | Convert a circuit diagram or truth table to an expression |
| Trace through a circuit | 3-4 | Calculate the output for given inputs |
| Simplify an expression | 2-3 | Use Boolean algebra rules to simplify |
| Apply De Morgan's Laws | 2-3 | Rewrite an expression using De Morgan's Laws |
A logic gate has the following truth table:
| A | B | Q |
|---|---|---|
| 0 | 0 | 1 |
| 0 | 1 | 0 |
| 1 | 0 | 0 |
| 1 | 1 | 0 |
State the name of this logic gate.
Answer: NOR gate
Explanation: The output is 1 only when both inputs are 0. This is the inverse of OR (which outputs 0 only when both inputs are 0).
Complete the truth table for the circuit: Q = (A AND B) OR (NOT C)
| A | B | C | A AND B | NOT C | Q |
|---|---|---|---|---|---|
| 0 | 0 | 0 | 0 | 1 | 1 |
| 0 | 0 | 1 | 0 | 0 | 0 |
| 0 | 1 | 0 | 0 | 1 | 1 |
| 0 | 1 | 1 | 0 | 0 | 0 |
| 1 | 0 | 0 | 0 | 1 | 1 |
| 1 | 0 | 1 | 0 | 0 | 0 |
| 1 | 1 | 0 | 1 | 1 | 1 |
| 1 | 1 | 1 | 1 | 0 | 1 |
OCR Exam Tip: Always include intermediate columns in your truth table working, even if the question does not explicitly ask for them. This shows your method and helps you avoid errors.
Write the Boolean expression for a circuit where gate 1 is an AND gate with inputs A and B, and gate 2 is an OR gate with inputs from gate 1 and input C.
Answer: Q = (A AND B) OR C
A circuit implements the expression: Q = NOT(A OR B) AND C
Calculate the output Q when A = 0, B = 1, C = 1.
Step-by-step working:
Answer: Q = 0
Use De Morgan's Law to rewrite the expression NOT(A AND B).
Answer: (NOT A) OR (NOT B)
Explanation: De Morgan's first law states that NOT(A AND B) = (NOT A) OR (NOT B). The NOT is distributed to each variable, and AND changes to OR.
Write a Boolean expression for the following truth table:
| A | B | Q |
|---|---|---|
| 0 | 0 | 1 |
| 0 | 1 | 0 |
| 1 | 0 | 0 |
| 1 | 1 | 1 |
Solution using sum of products:
Q = ((NOT A) AND (NOT B)) OR (A AND B)
This is the expression for XNOR (exclusive NOR) — the output is 1 when the inputs are the same.
Simplify the expression: (A AND B) OR (A AND NOT B)
Working:
Simplified expression: Q = A
flowchart TD
Q[Read the question] --> T{What is given?}
T -->|Truth table only| SOP[Use sum of products: write a product term per row where Q=1, OR them together]
T -->|Boolean expression| TT[Build a truth table by evaluating the expression for each input combination]
T -->|Circuit diagram| TR[Trace gate by gate from inputs to output, then write the expression]
T -->|Scenario in English| EX[Translate to AND/OR/NOT, then build a truth table]
SOP --> S{Asked to simplify?}
TT --> S
TR --> S
EX --> S
S -->|Yes| LAW[Apply identity, complement, absorption, or De Morgan]
S -->|No| FIN[Verify by substituting one row]
LAW --> FIN
FIN --> ANS[Write final answer with brackets]
When answering Boolean logic questions in OCR J277 Paper 2:
OCR Exam Tip: If you are unsure about a Boolean expression, construct a truth table to verify it. Even in simplification questions, you can check your simplified expression by confirming it produces the same outputs as the original.
| Gate | Outputs 1 when... | Boolean symbol |
|---|---|---|
| NOT | Input is 0 | Ā |
| AND | Both inputs are 1 | A . B |
| OR | At least one input is 1 | A + B |
| XOR | Inputs are different | A ⊕ B |
| NAND | Not both inputs 1 | NOT(A . B) |
| NOR | Both inputs are 0 | NOT(A + B) |
De Morgan's Laws:
OCR GCSE J277 examines only three operators: AND, OR, NOT. Although this lesson and earlier ones mention XOR, NAND, and NOR for completeness, your Paper 2 answers must use only AND, OR, NOT. Common scenarios rewritten into J277 form:
(A . (NOT B)) + ((NOT A) . B) (not A XOR B)NOT (A . B) (not A NAND B)NOT (A + B) (not A NOR B)If your truth table matches one of the "beyond spec" gates, always rewrite it in AND/OR/NOT form before committing your final answer.
A security system unlocks (U = 1) when a keycard is valid (K = 1) AND either a PIN is entered (P = 1) OR a fingerprint is recognised (F = 1).
(a) Write a Boolean expression for U.
(b) Complete the truth table.
Solution:
(a) U = K . (P + F).
(b)
Subscribe to continue reading
Get full access to this lesson and all 10 lessons in this course.