Boolean logic
Logic diagrams, truth tables and combining AND OR and NOT to solve problems.
Learning Objectives
- 1Recognise the symbol for each of the AND, OR and NOT logic gates
- 2Know the truth table for each logic gate
- 3Create, complete or edit logic diagrams and truth tables for a given scenario
- 4Work with more than one gate in a logic diagram
What is Boolean logic?
The AND gate
| A | B | A AND B |
|---|---|---|
| 0 | 0 | 0 |
| 0 | 1 | 0 |
| 1 | 0 | 0 |
| 1 | 1 | 1 |
The OR gate
| A | B | A OR B |
|---|---|---|
| 0 | 0 | 0 |
| 0 | 1 | 1 |
| 1 | 0 | 1 |
| 1 | 1 | 1 |
The NOT gate
| A | NOT A |
|---|---|
| 0 | 1 |
| 1 | 0 |
Combining gates
B OR NOT C AND A, the correct order of evaluation is B OR ((NOT C) AND A), since NOT is applied first, then AND, then OR. Brackets always override this order and should be evaluated first, exactly as in standard algebra.Completing truth tables for combined circuits
# A B NOT A Q (NOT A OR B)
# 0 0 1 1
# 0 1 1 1
# 1 0 0 0
# 1 1 0 1// A B NOT A Q (NOT A OR B)
// 0 0 1 1
// 0 1 1 1
// 1 0 0 0
// 1 1 0 1Exam Phrasing: Use These Exact Phrases
- ✓AND outputs 1 only when both/all inputs are 1
- ✓OR outputs 1 when at least one input is 1
- ✓NOT reverses its single input
- ✓A NOT gate must be drawn with a bubble on the output, otherwise it is just a buffer
- ✓List truth table rows in binary counting order (00, 01, 10, 11) so no combination is missed
- 💡Always include the bubble on a NOT gate, without it the shape represents a buffer, not a logic gate.
- 💡AND and OR gates must not have a bubble, adding one would turn them into NAND or NOR, which are not required by this specification.
- 💡Examiners mark the shape of a gate, not any label you add, focus on drawing the correct outline.
- 💡List truth table input rows in binary counting order (00, 01, 10, 11) to make sure you don't miss or repeat a combination.
- 💡For a circuit with more than one gate, work through it step by step: calculate the first gate's output, then use it as an input to the next gate.
Wrong:
Drawing a NOT gate as a plain triangle with no circle
Right:
Drawing a NOT gate as a triangle with a small bubble/circle on the output
Why it matters: A triangle with no bubble represents a buffer, a different component, not a NOT gate, examiners have specifically flagged this recurring mistake.
Wrong:
Adding a bubble to an AND or OR gate
Right:
AND and OR gates are drawn with no bubble
Why it matters: Adding a bubble to AND or OR would represent NAND or NOR gates instead, which are not part of this specification.
Wrong:
Listing truth table rows in a random or inconsistent order
Right:
Listing rows in binary counting order: 00, 01, 10, 11
Why it matters: A systematic order guarantees every input combination is included, especially important with three or more inputs.
Question:
Complete a truth table for the logic circuit where output Q = A AND B AND C. [4]
💡 Attempt this before revealing the answer, practice makes perfect!
Model Answer:
With three inputs, there are 8 possible combinations, listed in binary counting order from 000 to 111. Since Q uses AND across all three inputs, Q is only 1 when A, B and C are all 1 (the final row, 1 1 1). Every other row outputs 0.
Mark Scheme:
- 1All 8 rows of input combinations correctly listed (binary counting order or equivalent complete set)
- 2Correctly identifies that only the row where A=1, B=1, C=1 outputs Q=1
- 3All other 7 rows correctly output Q=0
- 4Table is clearly and completely filled in
Work out the output of a Boolean expression.
Loading a question…
Questions are generated fresh every time, so you can keep practising as long as you want.
Tap a card to flip it. Use the arrow keys to move and space to flip.
Exam-style questions. Have a go, then reveal the mark scheme to check your answer.
1.State the output of an OR gate when A = 0 and B = 1.
[1]2.Draw the symbol for a NOT gate and explain why the bubble on the output is important.
[2]3.A security system grants access if the correct PIN is entered AND the door sensor shows the door is closed. Write this as a Boolean expression, and explain what type of gate this represents.
[2]4.Complete a truth table for Q = A AND B, listing all input combinations in binary counting order.
[4]5.A circuit has the expression Q = NOT A OR B. Complete a truth table for this circuit, showing an intermediate column for NOT A.
[5]# A B NOT A Q (NOT A OR B)
# 0 0 1 1
# 0 1 1 1
# 1 0 0 0
# 1 1 0 1// A B NOT A Q (NOT A OR B)
// 0 0 1 1
// 0 1 1 1
// 1 0 0 0
// 1 1 0 16.A security alarm sounds when a door sensor is triggered AND the alarm is armed, or when the panic button is pressed. Describe how this could be built from logic gates and explain how you would check your design.
[6]The examiners' reports are the most useful and least read of the three: they say what candidates actually got wrong each year. All files are hosted by OCR.
Past-paper questions grouped by topic
The same OCR questions, sorted by topic rather than by year (via Physics & Maths Tutor).
Constructing logic gate diagrams from a real-world scenario was answered extremely well by most candidates. Where mistakes occurred, they were mainly about gate shapes: candidates need to remember that the circle on a NOT gate is essential (without it, the shape is a buffer, not a logic gate), and that AND/OR gates must not have circles, since adding one would represent NAND/NOR instead.
When completing a truth table, most candidates correctly filled in every possible input combination. Examiners noted that although inputs don't strictly have to be in a particular order, best practice is to start at 00 and count up in binary (01, 10, 11), especially important for larger systems with 3 or 4 inputs, so that no combination is accidentally missed. 1/0, True/False and Yes/No were all accepted as valid notation.
Drawing logic circuits is a commonly asked question type. The most common issues were a missing circle on a NOT gate (turning it into a buffer) and including an incorrect number of inputs on a gate. Examiners are instructed to mark the shape of each gate and ignore any text labelling, so candidates should focus on drawing accurate shapes rather than relying on labels.