6 exam-style questions with full mark schemes and model answers. Write your own answer and the AI examiner marks it against the mark scheme.
Learn this properly: Introduction to Boolean Logic and Boolean ValuesA greenhouse control system switches on a heater. The heater turns on when the temperature is low (input L = 1) AND the system is switched on (input S = 1), or whenever a manual override (input M = 1) is active.
The logic for the heater is heater = (L AND S) OR M, written in OCR Boolean algebra as Q=(L⋅S)+M.
Explain how this Boolean expression controls the heater, and construct the complete truth table for the three inputs L, S and M to show every combination that switches the heater on. (6 marks)
A logic circuit has two inputs A and B and one output Q. The output is described by the Boolean expression
Q=(A OR B) AND (NOT A)
written in OCR algebra as Q=(A+B)⋅A.
(a) Complete the truth table for this circuit. Include a column for A + B, a column for A (NOT A), and the output column Q. (3 marks)
(b) Looking at your completed Q column, state the single, simpler logic gate that produces exactly the same output as this whole circuit. (1 mark)
A door-entry system unlocks a door when a valid key card is presented (K = 1) AND the person enters the correct PIN (P = 1). However, during a fire alarm (F = 1) the door must unlock automatically, ignoring the card and PIN.
(a) Write a single Boolean expression for unlock in terms of K, P and F, using the operators AND, OR and (if needed) NOT. (2 marks)
(b) State the output of your expression when K = 0, P = 1 and F = 1, and explain in one sentence why this is the desired behaviour. (1 mark)
The truth table below describes a logic gate with two inputs, A and B, and one output Q.
| A | B | Q |
|---|---|---|
| 0 | 0 | 0 |
| 0 | 1 | 1 |
| 1 | 0 | 1 |
| 1 | 1 | 0 |
(a) Identify the single logic gate that this truth table represents. (1 mark)
(b) State the output Q of this gate for the inputs A = 1, B = 1, and explain in terms of the inputs the one rule that decides when this gate outputs 1. (2 marks)
A student writes the Boolean expression below without using any brackets.
Q = A OR B AND C
Using the standard order of precedence for Boolean operators, explain which operation is carried out first, and state the value of Q when A = 1, B = 0 and C = 0. (2 marks)
A logic gate produces an output of 1 only when both of its two inputs are 1.
Name this logic gate. (1 mark)