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

7 questions · Clear filters

0 / 0Answer a question to start your score.
Quick quiz (10)Saved 0
Advertisement
1
9608/31/O/N/21 · Question 7Oct/Nov 2021Paper 3120 marks
Loading question…
Question text

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.
(a) (i)
Identify the type of system described.
… [1]
(ii)
Justify your answer to part (a)(i).
…
…
…
… [2]
(iii)
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 …
…
[4]
(b) 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.
(i)
Complete the pseudocode algorithm.
…
01 Always
02 REPEAT
1 TO …
03
FOR FloorNumber
1 TO …
04
FOR SensorNumber
05
IF CheckSensor(FloorNumber, SensorNumber)
06
THEN
07
ScreenOut(FloorNumber, SensorNumber)
08
ENDIF
09
ENDFOR
10
ENDFOR
11
12 // delay loop
13 // delay loop
14 UNTIL …
[4]
(ii)
Write a delay loop in pseudocode for lines 12 and 13 of the pseudocode algorithm.
…
…
… [2]
(c) 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 t

2
9608/32/O/N/21 · Question 8Oct/Nov 2021Paper 3221 marks
Loading question…
Question text

8
A large car park has 6 floors.
There is a large screen at the entrance to the car park. This screen displays the number of empty
parking spaces on each floor.
•
There are 256 parking spaces for cars on each floor.
•
Each parking space has a sensor that detects if a car is parked on it.
•
Data from the sensors are read and processed by a computer system.
(a) (i)
Identify the type of system described.
… [1]
(ii)
Justify your answer to part (a)(i).
…
…
…
… [2]
(iii)
Identify two types of sensor that could be used by this system.
Sensor 1 …
Sensor 2 …
[2]
(b) A program regularly checks each sensor’s readings.
The number of empty parking spaces is displayed on the screen for each floor. If there are no
empty parking spaces on a floor, a message is displayed on the screen to show that the floor
is full.
The pseudocode algorithm to display this information has been written using these identifiers.
Identifier
Data type
Description
FloorNumber
INTEGER
Floor number
SpaceNumber
INTEGER
Parking space number
SpaceAvailable
INTEGER
Counts number of empty parking spaces
on a floor
ForEver
BOOLEAN
Value to ensure continuous loop
The pseudocode algorithm uses the function CheckSpace(Floor, Space). This function
returns TRUE if the parking space is empty and FALSE otherwise.
(i)
Complete the following pseudocode algorithm to check the number of parking spaces
available.
…
01 ForEver
02 REPEAT
1 TO …
03
FOR FloorNumber
0
04
SpaceAvailable
1 TO …
05
FOR SpaceNumber
06
IF CheckSpace(FloorNumber, SpaceNumber)
07
THEN
SpaceAvailable + 1
08
SpaceAvailable
09
ENDIF
10
ENDFOR
11
IF SpaceAvailable > …
12
THEN
13
OUTPUT "Floor ", … ,
" empty parking spaces " …
14
ELSE
15
OUTPUT "Floor ", … , " full"
16
ENDIF
17
ENDFOR
18
19 // delay loop
20 // delay loop
21 UNTIL …
[6]
(ii)
Write a delay loop in pseudocode for lines 19 and 20 of the pseudocode algorithm.
…
…
…
… [2]
(iii)
State why a delay loop is used in this system.
…
… [1]
(c) When a car is parked in a parking space, a bit is set in the appropr

3
9608/31/O/N/20 · Question 7Oct/Nov 2020Paper 3113 marks
Loading question…
Question text

7
A company has a number of lorries that deliver items around the country. The items in each lorry
are its load. Each lorry has a monitoring system that provides information to the driver about the
state of the load and other data from each trip.
•
Data is stored in three memory locations with addresses 801 to 803.
•
Location 801 contains the distance travelled in kilometres for the current trip, stored as a
binary integer.
•
Location 802 contains the quantity of fuel used in litres for the current trip, stored as a
fixed-point binary number with six places before the binary point and two places after the
binary point.
•
The four most significant bits of location 803 are flags used to identify problems with the load,
for example it is too heavy. A flag is set to 1 if there is a problem, or 0 if not.
The problems are:
•
Bit 7 – load too heavy
•
Bit 6 – load too high
•
Bit 5 – load unstable
•
Bit 4 – load not secured (risk of the load falling off)
•
Bits 0 to 3 are not used
(a) The current contents of addresses 801 to 803 are:
Most significant bit
Least significant bit
0
1
1
0
1
1
0
0
801
0
0
1
0
1
0
0
1
802
0
0
1
0
0
0
0
0
803
State the information that the current contents of addresses 801 to 803 will provide to the
driver.
…
…
…
… [3]
(b) A lorry has a load that is too heavy and is not secured. It has travelled 120 kilometres and
used 35.25 litres of fuel.
Complete the contents of the addresses to record this information.
801
802
803
[3]
(c) The following table shows the instructions for the lorry load monitoring system in assembly
language. There is one general purpose register, the Accumulator (ACC).
Table 7.1
Instruction
Explanation
Label
Op code
Operand
LDM #n
Load the number n to ACC
Load the contents of the location at the
LDD <address>
given address to ACC
Store the contents of ACC at the given
STO <address>
address
Bitwise AND operation of the contents of
AND #n
ACC with the operand
CMP #n
Compare the contents of ACC with number n
Following a compare instruction, jump to
JPE <address>
<address> or <label> if the compare was
True
JMP <address>
Jump to the given address or label
<label>:
<op code> <operand>
Labels an instruction
Note:
# denotes immediate addressing
B denotes a binary number, for example B01001010
& denotes a hexadecimal number, for example &4A
(i)
Write assembly language instructions to set the contents of addresses 801 and 802 to
zero, and set all four most significant bits of the contents of address 803 to one.
Use the instruction set from Table 7.1.
…
…
…
…
…
… [3]
(ii)
A program written

Advertisement
4
9608/32/O/N/20 · Question 8Oct/Nov 2020Paper 3213 marks
Loading question…
Question text

8
A car monitoring system provides information to the driver about the car’s performance and alerts
the driver to possible problems.
•
Data about the car’s performance is stored in three memory locations with addresses 601 to
603.
•
Location 601 contains the distance travelled in kilometres for the current trip as a binary
integer.
•
Location 602 contains the quantity of fuel used in litres for the current trip, as a fixed-point
binary number with 5 places before the binary point and three places after the binary point.
•
The four least significant bits of location 603 are flags used to identify problems with the car,
for example, the fuel is low. A flag is set to 1 if there is a problem, or 0 if not. These problems
are:
•
Bit 0 - high engine temperature
•
Bit 1 - low oil pressure
•
Bit 2 - low battery
•
Bit 3 - low fuel
•
Bits 4 to 7 are not used
(a) The current contents of addresses 601 to 603 are:
Most significant
Least significant
0
0
1
0
1
1
0
0
601
0
0
1
0
1
0
0
1
602
0
0
0
0
0
1
0
0
603
State the information that the current contents of addresses 601 to 603 will provide to the
driver.
…
…
…
… [3]
(b) A car has low oil pressure and low fuel. It has travelled 80 kilometres and used 7.25 litres of
fuel.
Complete the contents of the addresses to record this information.
601
602
603
[3]
(c) The following table shows the assembly language instructions for the car performance
monitoring system. There is one general purpose register, the Accumulator (ACC).
Table 8.1
Instruction
Explanation
Label
Op code
Operand
LDM
#n
Load the number n to ACC
Load the contents of the location at the given
LDD
<address>
address to ACC
STO
<address>
Store the contents of ACC at the given address
Bitwise AND operation of the contents of ACC
AND
#n
with the numeric operand
CMP
#n
Compare the contents of ACC with the number n
Following a compare instruction, jump to
JPE
<address>
<address> or <label> if the compare was True
JMP
<address>
Jump to <address> or <label>
<label>:
<op code>
<operand>
Labels an instruction
Note:
# denotes immediate addressing
B denotes a binary number, for example B01001010
& denotes a hexadecimal number, for example &4A
(i)
Write assembly language instructions to set the contents of addresses 601 and 602 to
zero, and set all four least significant bits of the contents of address 603 to one.
Use the instruction set from Table 8.1.
…
…
…
…
…
… [3]
(ii)
A program continuously checks the flags. If a flag is set, the program moves to the
error-handling routine at the specified label. For example, if the engine tem

5
9608/32/O/N/19 · Question 5Oct/Nov 2019Paper 3210 marks
Loading question…
Question text

5
A weather station uses monitoring and control systems.
(a) Describe the difference between a monitoring system and a control system.
…
…
…
… [2]
(b) (i)
The weather station records how the outside temperature changes over a period of time.
The system will read the temperature once every hour, over a period of 100 days.
The temperature readings are automatically stored in a file. No other data are stored.
Explain why the weather station has decided to use serial organisation for the file.
…
…
…
… [2]
(ii)
Serial files can be accessed using sequential access.
Explain how sequential access could be used for the temperature readings file.
…
…
…
… [2]
(iii)
Name and describe a method of file organisation other than serial or sequential.
Method …
Description …
…
…
…
…
…
[4]

6
9608/31/O/N/17 · Question 6Oct/Nov 2017Paper 3115 marks
Loading question…
Question text

6
A large warehouse stores goods that must be kept above a temperature of 15 degrees Celsius.
The warehouse has six temperature sensors which are each placed at a different location in the
warehouse.
A computer system is programmed to turn on appropriate heaters when one of the sensors is
below the minimum temperature.
(a) (i)
State the name given to the type of system described.
… [1]
(ii)
Justify your answer to part (i).
…
… [1]
(b) Sensors and heaters are two types of device used in this system.
State two other devices that are used. Justify your choice.
Device 1 …
Justification …
…
Device 2 …
Justification …
…
[4]
(c) The computer system stores the temperature readings for the six sensors in six 8-bit memory
locations.
Six of the bits in an 8-bit register, LOWREG, are used to indicate whether a particular reading
is below the minimum temperature. A value of 1 means the reading is below the minimum
temperature.
For example:
This pattern of bits in LOWREG shows that sensor 5, sensor 4 and sensor 1 have readings
below the minimum temperature.
6
5
4
3
2
1
Not used
Not used
0
1
1
0
0
1
The following table shows part of the instruction set for a processor which has one general
purpose register, the Accumulator (ACC), and an Index Register (IX).
Instruction
Explanation
Op code
Operand
Direct addressing. Load the contents of the given address to
LDD
<address>
ACC.
Immediate addressing. Load the number n to IX.
LDR
#n
Indexed addressing. Form the address from <address> +
the contents of the index register. Copy the contents of this
LDX
<address>
calculated address to ACC.
Store the contents of ACC at the given address.
STO
<address>
Add 1 to the contents of the register (ACC or IX).
INC
<register>
Add the contents of the given address to the ACC.
ADD
<address>
Bitwise OR operation of the contents of ACC with the contents
OR
<address>
of address.
Compare the contents of ACC with number n.
CMP
#n
Compare the contents of ACC with the contents of <address>.
CMP
<address>
Jump to the given address.
JMP
<address>
Following a compare instruction, jump to <address> if the
JPE
<address>
compare was True.
Following a compare instruction, jump to <address> if the
content of ACC is greater than or equal to the number used in
JGE
<address>
the compare instruction.
Question 6(c) continues on the next page.
Part of the assembly language code for updating LOWREG is:
Label
Op code
Operand
LOWTEMP:
15
LOWREG:
B00000000
COUNTER:
1
START:
LDR
#0
LOOP:
LDX
8000
CMP
LOWTEMP
JGE
TEMPOK
LDD
LOWREG
OR
COUNTER
STO
LOWREG
TEMPOK:
LDD
COUNTER
Q1:
CMP
#32
JPE
HEATON
ADD
COUNTER
STO
COUNTER
INC
IX
JMP
LOOP
HEATON:
LDD
LOWREG
(i)
The code uses six memory locations to store the temperature readin

7
9608/32/O/N/17 · Question 6Oct/Nov 2017Paper 3212 marks
Loading question…
Question text

6
The environment in a very large greenhouse is managed by a computer system. The system uses
a number of different sensors that include temperature sensors. In addition, the system controls a
number of heaters, windows and sprinklers.
(a) State one other type of sensor that could be used with this system.
Justify your choice.
Sensor …
Justification …
…
[2]
(b) Describe why feedback is important in this system.
…
…
…
…
…
… [3]
(c) (i)
The system makes use of a number of parameters. These parameters are used in the
code that runs the system.
State one of the parameters used in controlling the temperature in the greenhouse.
… [1]
(ii)
Explain how the parameter identified in part (c)(i) is used in the feedback process.
…
…
…
… [2]
(d) There are eight temperature sensors numbered 1 to 8. Readings from these sensors are
stored in four 16-bit memory locations. The memory locations have addresses from 4000 to
4003. Each memory location stores two sensor readings as two unsigned binary integers.
Sensor 1 reading is stored in bits 8 to 15 of address 4000; Sensor 2 reading is stored in bits
0 to 7 of address 4000 and so on. The diagram shows that the current sensor 1 reading has
a value of 97.
15
14
13
12
11
10
9
8
7
6
5
4
3
2
1
0
4000
0
1
1
0
0
0
0
1
0
0
1
1
1
0
0
1
4001
1
1
0
0
0
0
0
0
1
0
1
0
0
0
0
0
4002
0
0
0
1
0
1
0
0
0
0
0
0
1
1
0
1
4003
1
0
0
0
0
0
1
0
1
1
0
0
0
1
0
1
(i)
Give the denary value of the current reading for Sensor 5.
…
…
…
… [1]
9608/32

Advertisement