9608_w21_qp_31
A paper of Computer Science, 9608
Questions:
7
Year:
2021
Paper:
3
Variant:
1

Login to start this paper & get access to powerful tools

1
4
5
6
7
A large apartment block has 20 floors. On each floor there is one security camera and four sensors. The image from each security camera is output to a display screen for that floor. • There are 20 display screens in the reception area on the lowest floor. • The data from the sensors are read and processed by a computer system. • Warning messages can also be displayed on each display screen. Identify the type of system described. Justify your answer to part . Identify two types of sensor that could be used by this system. State a reason for the use of each sensor. Sensor 1 Reason Sensor 2 Reason A program regularly checks each sensor’s readings. If the value of the reading is out of range, a warning message is displayed on the screen for that floor. A pseudocode algorithm to output the warnings has been written using these identifiers. Identifier Data type Description FloorNumber INTEGER Floor number SensorNumber INTEGER Sensor number Always BOOLEAN Value to ensure continuous loop The pseudocode algorithm uses: • the function CheckSensor(Floor, Sensor) that returns TRUE if the sensor reading is out of range and FALSE otherwise • the procedure ScreenOut(Floor, Sensor) that outputs the warning message "Problem on Floor" to the appropriate screen. Complete the pseudocode algorithm. 01 Always ………………………………………………………………………… 02 REPEAT 03 FOR FloorNumber 1 TO ………………………………………………………………………… 04 FOR SensorNumber 1 TO ………………………………………………………………………… 05 IF CheckSensor(FloorNumber, SensorNumber) 06 THEN 07 ScreenOut(FloorNumber, SensorNumber) 08 ENDIF 09 ENDFOR 10 ENDFOR 12 // delay loop 13 // delay loop 14 UNTIL ………………………………………………………………………… Write a delay loop in pseudocode for lines 12 and 13 of the pseudocode algorithm. If a sensor reading is out of range, a bit is set in a memory location allocated to that floor. The addresses for the memory locations are 401 to 420. For example, memory location 401 is used to store the status of the sensors 1 to 4 on floor 1, memory location 402 is used to store the status of the sensors 1 to 4 on floor 2. The table shows data for some of the floors, with sensor 1 on floor 1 set, sensor 2 on floor 2 set and sensors 3 and 4 on floor 20 set. Bits Memory location Sensor number Floor … … … … … … … … … … The data in memory location 410 is shown. State what this data represents. Explain the way in which the data from sensor 3 on floor 7 can be checked. To avoid the issue of disclosure of answer-related information to candidates, all copyright acknowledgements are reproduced online in the Cambridge Assessment International Education Copyright Acknowledgements Booklet. This is produced for each series of examinations and is freely available to download at www.cambridgeinternational.org after the live examination series.