Monitoring and control systems – A Level Computer Science (old syllabus, to 2021) (9608)

8 questions · Clear filters

0 / 0Answer a question to start your score.
Quick quiz (10)Saved 0
Advertisement
1
9608/31/M/J/20 · Question 9May/June 2020Paper 3112 marks
Loading question…
Question text

9
A train cannot move if any of the eight automatic train doors are open. The train door monitoring
system, set out below, checks that all the doors are closed before the train can move.
•
If a monitoring system detects that a door is open, it sets a specific bit in address 500 to 1.
•
If the bit for door one is equal to 1, the binary value for hexadecimal FF is sent to address
501. The contents of address 501 are changed to make door 1’s light flash when the door is
open.
•
If the bit for door two is equal to 1, the binary value for hexadecimal FF is sent to address
502. The contents of address 502 are changed to make door 2’s light flash when the door is
open.
This is repeated for each door from 3 to 8.
•
Each door sets its bit in address 500 to zero when the door closes, and the contents of the
corresponding door address are set to zero.
•
The train manager can identify which door is open from the flashing light.
The current contents of address 500 are:
Door number
1
2
3
4
5
6
7
8
1
0
0
1
0
0
1
0
Address 500
(a) Complete the following table by writing the values stored in addresses 503 to 508. Use the
contents of address 500 shown above. Note that addresses 501 and 502 are complete.
1
1
1
1
1
1
1
1
501
Door 1
0
0
0
0
0
0
0
0
502
Door 2
503
Door 3
504
Door 4
505
Door 5
506
Door 6
507
Door 7
508
Door 8
[2]
(b) The following table shows assembly language instructions for the processor controlling the
train door monitoring system that has one general purpose register, the Accumulator (ACC).
Instruction
Explanation
Label
Op code
Operand
LDM
&n
Load the hexadecimal number n to ACC
Load the contents of the location at the given address
LDD
<address>
to ACC
STO
<address>
Store the contents of ACC at the given address
Bitwise AND the contents of ACC with the hexadecimal
AND
&n
number n
Compare the contents of ACC with the hexadecimal
CMP
&n
number n
Following a compare instruction, jump to <address> or
JPE
<address>
<label> if the compare was True
<label>:
<op code>
<operand>
Labels an instruction
Macro to wait one second before the next instruction is
WAIT
executed
After rechecking the doors, address 500 now contains 10101010.
(i)
Complete the table by writing the values of the Accumulator (ACC) and the contents of
address 501 as these instructions are executed once to check door 1.
Instruction
501
ACC
Label
Op code
Operand
CHECK1:
LDD
500
AND
&80
CMP
&00
JPE
DOOR1
LDM
&FF
DOOR1:
STO
501
WAIT
LDM
&00
STO
501
WAIT
JMP
CHECK1
[4]
(ii)
Write the assembly language instructions to check door 2.
Instruction
Label
Op code
Operand
[4]
(c) Explain how the check door routines show a flashing light or no light.
…
…
…
… [2]
Permission to reproduce items where third-party owned material protected by copyright is included has been sought and cleared where possible. Every
publisher will be pleased to make amends at the earliest possible opportunity.
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.
Cambridge Assessment International Education is part of the Cambridge Assessment Group. Cambridge As

2
9608/31/M/J/19 · Question 6May/June 2019Paper 3110 marks
Loading question…
Question text

6
Monitoring and control systems have many different applications.
(a) Explain the importance of feedback in a control system.
…
…
…
…
…
… [3]
(b) An indoor swimming pool is to be kept at a constant temperature of 28 degrees.
Describe the use of feedback in this control system.
…
…
…
…
…
…
…
… [4]
(c) Give one example of a monitoring system. Explain why this is a monitoring system.
Monitoring system …
…
Explanation …
…
…
…
[3]
Permission to reproduce items where third-party owned material protected by copyright is included has been sought and cleared where possible. Every
publisher will be pleased to make amends at the earliest possible opportunity.
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.
Cambridge Assessment International Education is part of the Cambridge Assessment Group

3
9608/32/M/J/19 · Question 6May/June 2019Paper 324 marks
Loading question…
Question text

6
A company sells plant watering systems that automatically turn on water sprinklers when the soil
becomes too dry.
The plant watering system has a processor and connecting cables.
Identify two other hardware devices that are required in this system. State the purpose of each
device.
Device 1 …
Purpose …
…
Device 2 …
Purpose …
…
[4]

Advertisement
4
9608/31/M/J/18 · Question 7May/June 2018Paper 3110 marks
Loading question…
Question text

7
A museum stores antique items that need to be kept at constant temperature.
The museum is not sure about the actual temperatures. The museum installs some equipment.
This records the temperatures every hour and ensures the temperature stays within a set range.
(a) Identify the type of system described.
… [1]
(b) The system has a temperature sensor.
Identify two other items of hardware that the museum can use for the type of system identified.
Describe the purpose of each item.
Item 1 …
Purpose …
…
Item 2 …
Purpose …
…
[4]
(c) The equipment records the temperature in all seven rooms in the museum.
Each recording is stored as two successive bytes in memory. The format is as shown.
Temperature
Room
7
6
5
4
3
2
1
0
Byte 1
Byte 2
The room is indicated by the setting of one of the bits in Byte 2 to 1. For example, room 7 is
indicated by setting bit 7 to 1.
Bit 0 of Byte 2 is a flag:
•
The flag’s initial value is zero.
•
When the reading has been processed, the flag’s value is set to 1.
Byte 1 contains the temperature reading as an unsigned integer.
One reading returns the following binary data.
Temperature
Room
7
6
5
4
3
2
1
0
1
0
1
1
0
0
1
1
0
0
1
0
0
0
0
1
Byte 1
Byte 2
(i)
Analyse the data contained in the two bytes.
…
…
…
…
… [3]
(ii)
The system receives a temperature reading of 238 from room number 4.
Complete the bytes to show the two bytes for this recording. The reading has not yet
been processed.
7
6
5
4
3
2
1
0
Byte 1
Byte 2
[2]
Permission to reproduce items where third-party owned material protected by copyright is included has been sought and cleared where possible. Every
publisher will be pleased to make amends at the earliest possible opportunity.
To avoid the issue of disclosure of answer-related information to candidates, all copyright acknowledgements are reproduced online in the Cambridge International
Examinations Copyright Acknowledgements Booklet. This is produced for each series of examinations and is freely available to download at www.cie.org.uk after
the live examination series.
Cambridge International Examinations is part of the Cambridge Assessment Group. Cambridge Assessment is the brand name of University of Cambridge Local

5
9608/32/M/J/18 · Question 6May/June 2018Paper 3216 marks
Loading question…
Question text

6
(a) There are five scenarios on the left and two types of system on the right.
Draw a line to link each scenario to its correct type of system.
Scenario
System
Car speed display
Aeroplane autopilot
Control
Rollercoaster
Monitoring
Recording the rainfall at
a weather station
Robot loading a part onto
a conveyor belt
[2]
(b) Mary has six fish tanks. The temperature of the water in each tank needs to be within a
specific range.
Identify three items of hardware that Mary can add to her tanks to help maintain the
temperature. Describe the purpose of each item.
Item 1 …
Purpose …
…
Item 2 …
Purpose …
…
Item 3 …
Purpose …
…
[6]
(c) A temperature reading is taken from each tank once per minute. The temperature reading is
stored as two successive bytes. The format is shown:
Fish tank
Temperature reading
7
6
5
4
3
2
1
0
Byte 1
Byte 2
The fish tank number is indicated by setting one of the bits in Byte 1 to 1. For example, fish
tank number 5 is indicated by setting bit 5 to 1.
Bit 7 of Byte 1 is a flag:
•
the flag’s initial value is zero
•
when the reading has been processed, the flag’s value is set to 1
Bit 0 of Byte 1 is unused.
Byte 2 contains the temperature reading as a two’s complement integer.
(i)
After a temperature reading has been taken, the bytes contain the following data.
7
6
5
4
3
2
1
0
0
0
0
0
1
0
0
0
0
0
0
0
1
0
1
1
Byte 1
Byte 2
Analyse the data contained in the two bytes.
…
…
…
…
…
… [3]
(ii)
The system receives a temperature reading of − 2 from fish tank number 4.
Complete the bytes to show the values for this reading after it has been processed.
7
6
5
4
3
2
1
0
Byte 1
Byte 2
[2]
(d) A hardware device to affect the temperature of each tank is on or off depending on the value
of a bit in memory location 6753.
If bit 4 is 1, then the hardware device in fish tank 4 is on.
Write assembly language instructions to set bit 4 of memory location 6753 to 1 without
cha

6
9608/31/M/J/17 · Question 6May/June 2017Paper 3112 marks
Loading question…
Question text

6
A computer system is used to manage some of the functions in a vehicle. The vehicle has a
number of sensors and actuators. One sensor is used to monitor the moisture on the screen. If the
moisture exceeds a pre-set value, the windscreen wiper motor turns on automatically.
The software used in the computer system is dedicated to the sensor management functions.
When the system starts, the software runs some initial tasks. It then loops continuously until the
system is switched off.
(a) (i)
State the name given to the type of system described.
… [1]
(ii)
Explain your answer to part (i).
…
… [1]
(b) Within the software loop, the value of each sensor is read in turn. The value read from the
sensor is then processed.
State two drawbacks with this method of reading and processing sensor data.
Drawback 1 …
…
Drawback 2 …
…
[2]
(c) An alternative method of reading and processing sensor data is to use interrupts. Each sensor
is connected so that it can send an interrupt signal to the processor if its value changes.
On receipt of an interrupt signal, the processor carries out a number of steps as shown in the
following diagram.
Interrupt
1. Disable interrupts
2. Save current task
3. Identify source of
interrupt
4. Jump to Interrupt
Service Routine
5. Restore task
Return to task
6. Enable interrupts
(i)
State the purpose of step 1.
…
…
… [1]
(ii)
State the purpose of step 6.
…
…
… [1]
(iii)
Explain how the current task is saved in step 2.
…
…
…
… [2]
(iv)
State two benefits of using interrupts to read and process the sensor data.
Benefit 1 …

7
9608/32/M/J/17 · Question 6May/June 2017Paper 3212 marks
Loading question…
Question text

6
A large office building has many floors. On each floor there are security sensors and security
cameras. There is the same number of sensors on each floor. The building has a single security
room.
The images from the security cameras are output on monitors (one monitor for each floor) placed
in the security room.
The data from the sensors are read and processed by a computer system. Sensor readings and
warning messages can be displayed on the monitors.
(a) (i)
State the name given to the type of system described.
… [1]
(ii)
Explain your answer to part (i).
…
… [1]
(iii)
State two sensors that could be used in this system.
Sensor 1 …
Sensor 2 …
[2]
(b) A software routine:
•
checks the readings from the sensors
•
outputs readings and warning messages to the monitors
•
loops continuously.
The routine uses the following pseudocode variables:
Identifier
Data type
Description
FloorCounter
INTEGER
Loop counter for number of floors
SensorCounter
INTEGER
Loop counter for number of sensors
NumberOfFloors
INTEGER
Stores the number of floors
NumberOfSensors
INTEGER
Stores the number of sensors
ForEver
BOOLEAN
Stores value that ensures continuous loop
(i)
Complete the following pseudocode algorithm for the routine.
…
01 ForEver
02 REPEAT
03
FOR FloorCounter
1 TO NumberOfFloors
1 TO …
04
FOR SensorCounter
05
READ Sensor(SensorCounter)on Floor(FloorCounter)
06
IF Sensor value outside range
07
THEN
08
OUTPUT “Problem on Floor ”, FloorCounter
09
ENDIF
10
ENDFOR
11
ENDFOR
12
//
13
// Delay loop
14
// Delay loop
15
//
16 UNTIL …
[3]
(ii)
A delay needs to be introduced before the loop is processed again.
Write a FOR loop, in pseudocode, to replace lines 13 and 14.
…
… [1]
(iii)
Give a reason for this delay in the system.
…
… [1]
(c) An alternative method of reading and processing sensor data is to use interrupts. Each sensor
is connected so that it can send an interrupt signal to the processor if its value changes.
On receipt of an interrupt signal, the processor carries out a number of steps as shown in the
following diagram.
Interrupt
1. Disable interrupts
2. Save current task
3. Identify source of
interrupt
4. Jump to Interrupt
Service Routine
5. Restore task
Return to task
6. Enable interrupts
(i)
State the purpose of step 3.
…
…

8
9608/31/M/J/16 · Question 6May/June 2016Paper 3113 marks
Loading question…
Question text

6
An intruder detection system for a large house has four sensors. An 8-bit memory location stores
the output from each sensor in its own bit position.
The bit value for each sensor shows:
•
1 – the sensor has been triggered
•
0 – the sensor has not been triggered
The bit positions are used as follows:
Sensor 4 Sensor 3 Sensor 2 Sensor 1
Not used
The output from the intruder detection system is a loud alarm.
(a) (i)
State the name of the type of system to which intruder detection systems belong.
… [1]
(ii)
Justify your answer to part (i).
…
… [1]
(b) Name two sensors that could be used in this intruder detection system. Give a reason for
your choice.
Sensor 1 …
Reason …
…
Sensor 2 …
Reason …
… [4]
The intruder system is set up so that the alarm will only sound if two or more sensors have been
triggered.
An assembly language program has been written to process the contents of the memory location.
The table shows part of the instruction set for the processor used.
Instruction
Explanation
Op code
Operand
Direct addressing. Load the contents of the given address to
LDD
<address>
ACC
STO
<address>
Store the contents of ACC at the given address
INC
<register>
Add 1 to the contents of the register (ACC or IX)
ADD
<address>
Add the contents of the given address to the contents of ACC
Bitwise AND operation of the contents of ACC with the
AND
<address>
contents of <address>
CMP
#n
Compare the contents of ACC with the number n
JMP
<address>
Jump to the given address
Following a compare instruction, jump to <address> if the
JPE
<address>
compare was True
Following a compare instruction, jump to <address> if the
JGT
<address>
content of ACC is greater than the number used in the
compare instruction
END
End the program and return to the operating system
(c) Part of the assembly code is:
Op code
Operand
SENSORS:
B00001010
COUNT:
0
VALUE:
1
LOOP:
LDD
SENSORS
AND
VALUE
CMP
#0
JPE
ZERO
LDD
COUNT
INC
ACC
STO
COUNT
ZERO:
LDD
VALUE
CMP
#8
JPE
EXIT
ADD
VALUE
STO
VALUE
JMP
LOOP
EXIT:
LDD
COUNT
TEST:
CMP
…
JGT
ALARM
Dry run the assembly language code. Start at LOOP and finish when EXIT is reached.
(i)
BITREG
COUNT
VALUE
ACC
B00001010
0
1
[4]
The operand for the instruction labelled TEST is missing.
(ii)
State the missing operand.
… [1]
(iii)
The intruder detection system is improved and now has eight sensors.
One instruction in the assembly language code will need to be amended.
Identify this instruction …
Write the amended instruction … [2]
BLAN

Advertisement