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 LogicA greenhouse uses a simple control system with three sensor inputs, each giving a Boolean value (1 = true, 0 = false):
H = the temperature is too hotD = the soil is too dryM = the system is in manual override modeThe designer wants the water sprinkler output S to switch on only when the soil is dry and the temperature is not hot, or whenever manual override is on. This is written as:
S = (D AND NOT H) OR M
Explain how this Boolean expression controls the sprinkler. Your answer should explain the effect of each logic operator (AND, NOT, OR) and describe two different situations: one in which the sprinkler turns on and one in which it stays off. (6 marks)
A logic circuit produces the output Q from two inputs A and B using the Boolean expression:
Q = (NOT A) OR B
(a) Complete a truth table for this expression. Your table must have a row for each of the four combinations of A and B, and should include a column for NOT A and a column for Q. (3 marks)
(b) State the only combination of A and B for which the output Q is 0. (1 mark)
A logic circuit is built from standard gates. Two inputs P and R are fed into an AND gate. The output of that AND gate is then fed into a NOT gate, whose output is the final result Q.
(a) Write the Boolean expression for Q in terms of P and R. (1 mark)
(b) State the name of the single gate that has exactly the same behaviour as this two-gate circuit. (1 mark)
(c) State the one combination of P and R that makes Q = 0. (1 mark)
A door-entry system unlocks a door (output U = 1) only when a valid card is presented and the correct PIN is entered.
The two inputs are:
C = a valid card is presentedN = the correct PIN is entered(a) Write a Boolean expression for the unlock output U in terms of C and N. (1 mark)
(b) Complete the truth table below for your expression. (1 mark)
C | N | U |
|---|---|---|
| 0 | 0 | ? |
| 0 | 1 | ? |
| 1 | 0 | ? |
| 1 | 1 | ? |
(c) A third input E is added: a fire-alarm override that must unlock the door whatever the card and PIN say. Write a new Boolean expression for U that includes E. (1 mark)
Logic gates each have a defined behaviour.
(a) State the behaviour of an OR gate — i.e. when its output is 1. (1 mark)
(b) A two-input XOR (exclusive OR) gate is sometimes described as a "difference detector". State when an XOR gate outputs 1. (1 mark)
In Boolean logic, the NOT operator is also called the inverter.
An input A has the value 1.
State the value of NOT (NOT A) (a double NOT applied to A). (1 mark)