Question 4
OCR Computer Science June 2023 Computational thinking, algorithms and programming (J277-02)GCSE5 marks
On the specification
- (a)
- 2.4 Boolean logic
- (b)
- 2.4 Boolean logic
Question text
4 A garden floodlight system uses inputs from sensors and switches to decide whether it should be turned on. The table shows the inputs into the system and the meaning of each input value: Letter Input device Input of 1 Input of 0 A Motion sensor Motion is detected Motion is not detected Light levels indicate it Light levels indicate it B Light sensor is daytime is nighttime The switch is turned The switch is turned C Light switch on off The floodlight (Q) is designed to be on (Q = 1) when the switch is turned on and the motion sensor detects motion at nighttime. (a) Draw a logic diagram for the floodlight. A B Q C [3] (b) Identify the logic gates for truth table 1 and truth table 2. Truth table 1: A B Output 0 0 1 1 10 1 11 1 Logic gate 1: Truth table 2: A B Output 0 0 1 0 10 0 11 1 Logic gate 2: [2]