You are on page 1of 53

70 | P a g e

Unit 3 Hardware
Topic You should be able to R A G
• Understand the need for and the operation of input, output and storage devices
including embedded systems
Hardware
• Understand and use logic gates with a maximum of two inputs
• Construct logic circuits, truth tables and logic expressions

Key terms
Memory cache – high speed memory external to processor which stores data which the processor will need
again.
Random access memory (RAM) – primary memory unit that can be written to and read from.
Read-only memory (ROM) – primary memory unit that can only be read from.
Dynamic RAM (DRAM) – type of RAM chip that needs to be constantly refreshed.
Static RAM (SRAM) – type of RAM chip that uses flip-flops and does not need refreshing.
Refreshed – requirement to charge a component to retain its electronic state.
Programmable ROM (PROM) – type of ROM chip that can be programmed once.
Erasable PROM (EPROM) – type of ROM that can be programmed more than once using ultraviolet (UV) light.
Hard disk drive (HDD) – type of magnetic storage device that uses spinning disks.
Latency – the lag in a system; for example, the time to find a track on a hard disk, which depends on the time
taken for the disk to rotate around to its read-write head.
Fragmented – storage of data in non-consecutive sectors; for example, due to editing and deletion of old data.
Removable hard disk drive – portable hard disk drive that is external to the computer; it can be connected via
a USB part when required; often used as a device to back up files and data.
Solid state drive (SSD) – storage media with no moving parts that relies on movement of electrons.
Electronically erasable programmable read-only memory (EEPROM) – read-only (ROM) chip that can be
modified by the user, which can then be erased and written to repeatedly using pulsed voltages.
Flash memory – a type of EEPROM, particularly suited to use in drives such as SSDs, memory cards and
memory sticks.
Optical storage – CDs, DVDs and Blu-rayTM discs that use laser light to read and write data.
Dual layering – used in DVDs; uses two recording layers.
Birefringence – a reading problem with DVDs caused by refraction of laser light into two beams.
Binder 3D printing – 3D printing method that uses a two-stage pass; the first stage uses dry powder and the
second stage uses a binding agent.
71 | P a g e
Direct 3D printing – 3D printing technique where print head moves in the x, y and z directions. Layers of
melted material are built up using nozzles like an inkjet printer.
Digital to analogue converter (DAC) – needed to convert digital data into electric current.
Analogue to digital converter (ADC) – needed to convert analogue data (read from sensors, for example) into
a form understood by a computer.
Organic LED (OLED) – uses movement of electrons between cathode and anode to produce an on-screen
image. It generates its own light so no back lighting required.
Screen resolution – number of pixels in the horizontal and vertical directions on a television/computer screen.
Touch screen – screen on which the touch of a finger or stylus allows selection or manipulation of a screen
image; they usually use capacitive or resistive technology.
Capacitive – type of touch screen technology based on glass layers forming a capacitor, where fingers
touching the screen cause a change in the electric field.

Resistive – type of touch screen technology. When a finger touches the screen, the glass layer touches the
plastic layer, completing the circuit and causing a current to flow at that point.
Virtual reality headset – apparatus worn on the head that covers the eyes like a pair of goggles. It gives the
user the ‘feeling of being there’ by immersing them totally in the virtual reality experience.
Sensor – input device that reads physical data from its surroundings.
72 | P a g e
0 9618/1 Specimen paper Q4, 5 - SoW
4 A cake factory uses machines to make cakes .
(a) Complete the following descriptions of types of system. Write the correct missing term in the spaces.
The factory uses a .................................................. system to record data such as the number of cakes being
produced each hour.
When the data collected from sensors are analysed and used as .................................................. it is a
.................................................. system. One example of this system, used in the factory, is to maintain a
constant temperature in the ovens. It uses a .................................................. to measure the values. [4]
(b) Cake mixture is mixed in a large pot. A conveyer belt moves the cake tins beneath the pot. The conveyer
belt stops and a set quantity of the cake mixture fills the cake tin. The conveyer belt then moves and another
cake tin is positioned beneath the pot.
Explain how the control system will ensure the correct amount of mixture is placed in the cake tins.
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
.............................................................................................................................................. [5]
73 | P a g e
(c) The cake factory has servers that store its confidential recipes and control the factory machines.
(i) Describe the implications of a hacker gaining access to the cake factory’s servers.
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...................................................................................................................................... [4]
(ii) Explain how the company could protect its data against hackers.
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...................................................................................................................................... [4]
(d) The machines have a counter to record the number of cake tins filled. Each time a cake tin is filled, the
counter is increased by 1. The value is stored in an 8-bit register, the current value is shown.
0 0 0 0 1 0 0 1
(i) Show the value of the binary number after another five cake tins have been filled. [1]
74 | P a g e
(ii) The following table shows some assembly language instructions for a processor which has one general
purpose register, the Accumulator (ACC).
Instruction
Explanation
Op code Operand
AND #n Bitwise AND operation of the contents of ACC with the operand
AND <address> Bitwise AND operation of the contents of ACC with the contents of <address>
XOR #n Bitwise XOR operation of the contents of ACC with the operand
XOR <address> Bitwise XOR operation of the contents of ACC with the contents of <address>
OR #n Bitwise OR operation of the contents of ACC with the operand
OR <address> Bitwise OR operation of the contents of ACC with the contents of <address>
Bits in ACC are shifted logically n places to the left. Zeros are introduced on the
LSL #n
right hand end
Bits in ACC are shifted logically n places to the right. Zeros are introduced on the
LSR #n
left hand end.
At the end of each day, the register is reset to 0. Write the assembly language statement to reset the register to 0.
...........................................................................................................................................
...................................................................................................................................... [2]
(iii) A two-place logical shift to the left is performed on the binary number shown in part (d).
Show the result of this logical shift. [1]
(iv) State the mathematical result of a one-place logical shift to the right on a binary number.
...........................................................................................................................................
...................................................................................................................................... [1]
(e) The factory servers run software that makes use of Artificial Intelligence (AI).
Explain how the use of AI can help improve the safety and efficiency of the factory.
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
.............................................................................................................................................. [3]
75 | P a g e
5 (a) Draw a logic circuit diagram for the logic expression:
X = NOT (A OR B OR C) OR (B AND C AND D) [4]

(b) Complete the truth table for the logic expression: [4]
X = (A XOR B) OR NOT (A OR B OR C)
A B C Working space X
0 0 0
0 0 1
0 1 0
0 1 1
1 0 0
1 0 1
1 1 0
1 1 1
76 | P a g e
1b 9618 S21 P12
3 A logic expression is given:
S = (A AND B AND C) OR (B XOR C)
(a) Draw the logic circuit for the given expression. [4]

(b) Complete the truth table for the logic expression: [2]
S = (A AND B AND C) OR (B XOR C)
A B C Working space S
0 0 0
0 0 1
0 1 0
0 1 1
1 0 0
1 0 1
1 1 0
1 1 1

3a 9608/31 Jun 16 Q6 – SoW


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:

The output from the intruder detection system is a loud alarm.


77 | P a g e
(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
LDD <address> Direct addressing. Load the contents of the given address to 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 contents of
AND <address>
<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 compare
JPE <address>
was True
Following a compare instruction, jump to <address> if the content of
JGT <address>
ACC is greater than the number used in the compare instruction
END End the program and return to the operating system
78 | P a g e
(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
(i) Dry run the assembly language code. Start at LOOP and finish when EXIT is reached. [4]
BITREG COUNT VALUE ACC
B00001010 0 1
79 | P a g e

(ii) The operand for the instruction labeled TEST is missing.


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]

5a 9608/12 Jun 17 Q2 – SoW


2 (a) The first column of the following table gives features of different types of printer.
Put a tick (3) in the cells to show which features describe a laser and an inkjet printer. [2]
Type of printer
Laser Inkjet
Impact printer
Non-impact printer
Line printer
Page printer

(b) Two of the components of an inkjet printer are a stepper motor and a print head.(c) A student has
an old working laptop computer. It has a small capacity internal disk drive with almost all the storage
space taken up by the operating system and application programs. She needs to buy an external
storage device to store her data files.
(i) List two suitable devices.
Device 1 ............................................................................................................................
Device 2 ............................................................................................................................[2]
(ii) Describe one advantage of choosing one of the devices.
Advantage of choosing device 1 / 2 (circle)
...........................................................................................................................................
.......................................................................................................................................[1]
80 | P a g e
Describe how each component is used when printing a page.
(i) Print head ..........................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
.......................................................................................................................................[5]
(ii) Stepper motor
.................................................................................................................................................................
.................................................................................................................................................................
.................................................................................................................................................................
............................................................................................................................................................[2]

5b 9608/12 Jun 17 Q2 - SoW


2 (a) The first column of the following table gives features of different types of printer.
Put a tick (3) in the cells to show which features describe a laser and an inkjet printer. [2]
Type of printer
Laser Inkjet
Impact printer
Non-impact printer
Line printer
Page printer

(b) Two of the components of an inkjet printer are a stepper motor and a print head.(c) A student has
an old working laptop computer. It has a small capacity internal disk drive with almost all the storage
space taken up by the operating system and application programs. She needs to buy an external
storage device to store her data files.
(i) List two suitable devices.
Device 1 ............................................................................................................................
Device 2 ............................................................................................................................[2]
81 | P a g e
(ii) Describe one advantage of choosing one of the devices.
Advantage of choosing device 1 / 2 (circle)
...........................................................................................................................................
.......................................................................................................................................[1]
Describe how each component is used when printing a page.
(i) Print head ..........................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
.......................................................................................................................................[5]
(ii) Stepper motor
.................................................................................................................................................................
.................................................................................................................................................................
.................................................................................................................................................................
............................................................................................................................................................[2]
...........................................................................................................................................[4]
82 | P a g e
5c 9608/13 Jun 17 Q2- SoW
2(a) (i) The following sequence of steps (1 to 7) describe how a single page is printed on a laser
printer.
The statements A, B, C and D are used to complete the sequence.
The paper passes through a fuser, which heats up the paper. The toner melts and
A
forms a permanent image on the paper.
B The electrical charge is removed from the drum and the excess toner is collected.
C The image is converted on the drum into an electrostatic charge.
The oppositely-charged paper picks up the toner particles from the drum. After
D
picking up the toner, the paper is discharged to stop it clinging to the drum.
Complete the sequence by writing one of the letters A, B, C or D on the appropriate row.
1. A laser beam and a rotating mirror are used to draw an image of the page on the photosensitive
drum.
2. .........................
3. Electrostatic charge attracts toner.
4. The charged paper is rolled against the drum.
5. .........................
6. .........................
7. ......................... [3]

(ii) A computer user has a laser printer to print letters and documents. The user also prints digital
photographs taken using a digital camera.
State the most suitable type of printer for printing the photographs.
.......................................................................................................................................[1]
(b) The user is considering the purchase of a new laptop computer. She has read many product
reviews and knows that there are different types of internal secondary storage available.
List two options for internal secondary storage.
Option 1 ....................................................................................................................................
Option 2 ....................................................................................................................................
Describe one advantage of one of the options.
Advantage of choosing option 1 / 2 (circle)
...................................................................................................................................................
...............................................................................................................................................[3]
83 | P a g e
6a 9608/11 Nov 17 Q5 - SoW
5 A Personal Computer (PC) has a number of input and output devices.
(a) (i) Name three components of a speaker.
1 ........................................................................................................................................................
2 ........................................................................................................................................................
3 ................................................................................................................................................... [3]
(ii) Explain the basic internal operation of a speaker.
..........................................................................................................................................................................
..........................................................................................................................................................................
..........................................................................................................................................................................
..........................................................................................................................................................................
..........................................................................................................................................................................
..........................................................................................................................................................................
...................................................................................................................................................................... [4]
(b) (i) The user is considering the purchase of a removable device for secondary storage.
Name one suitable device. .......................................................................................................................... [1]
(ii) Describe two possible uses for this device on a home Personal Computer (PC).
1 ........................................................................................................................................................................
..........................................................................................................................................................................
2 .......................................................................................................................................................................
..................................................................................................................................................................... [2]
84 | P a g e
6b 9608/12 Nov 17 Q6 - SoW
6 (a) A personal computer (PC) is extensively used for a wide range of applications, including the
three shown in the following table.
Write in the table, a suitable input device, output device, or both needed for each application.
Do not give a monitor, keyboard or mouse in your answers. [3]
Input Output
Application
device device
Capture the text from a paper document, in order that the text can be
word processed
Producing a replica of a small plastic component from a washing machine
A museum has interactive information facilities throughout the building
(b) Explain the basic internal operation of a hard disk drive.
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...............................................................................................................................................[4]
85 | P a g e
7a 9608 S18 P11
4 (a) An alarm system (X) is enabled and disabled using either a switch (A) or a remote control (B).
There are two infra-red sensors (C, D) and one door pressure sensor (E).
Parameter Description ofparameter Binary value Condition
1 Switch enabled
A Switch
0 Switch disabled
1 Remote enabled
B Remote control
0 Remote disabled
1 Activated
C Infra-red sensor
0 Not activated
1 Activated
D Infra-red sensor
0 Not activated
Door pressure 1 Activated
E
sensor 0 Not activated
The alarm sounds (X = 1) if the alarm is enabled and any one or more of the sensors is
activated. Draw a logic circuit to represent the alarm system. [3]

(b) Complete the truth table for the logic expression: X = A OR (B XOR C) [4]
A B C Working space X
0 0 0
0 0 1
0 1 0
0 1 1
1 0 0
1 0 1
1 1 0
1 1 1
86 | P a g e
7 A student plays computer games on a games console.
(a) Identify two input devices and one output device used in a games console.
Input device 1 ...........................................................................................................................
Input device 2 ...........................................................................................................................
Output device ...........................................................................................................................[3]

(b) The games console has random access memory (RAM) and read only memory (ROM).
(i) State two differences between RAM and ROM.
Difference 1 .......................................................................................................................
...........................................................................................................................................
Difference 2 .......................................................................................................................
........................................................................................................................................... [2]

(ii) Give one use for RAM in the games console.


...........................................................................................................................................
.......................................................................................................................................[1]

(iii) Give one use for ROM in the games console.


...........................................................................................................................................
.......................................................................................................................................[1]
87 | P a g e
7b 9608 S18 P12
2 (a) A greenhouse control system has four input parameters (H, D, T, W) and two outputs (X, Y).
Parameter Description ofparameter Binary value Condition
0 Too low
H Humidity
1 Acceptable
0 Night
D Day
1 Day
0 Too high
T Temperature
1 Acceptable
0 Closed
W Windows
1 Open
The watering system turns on (X = 1) if:
either it is daytime and the temperature is too high
or the humidity is too low.
The fan turns on (Y = 1) if the temperature is too high and the windows are closed.
Draw a logic circuit to represent the greenhouse control system. [6]

(b) Complete the truth table for the logic expression: X = NOT A AND (B NAND C) [4]
A B C Working space X
0 0 0
0 0 1
0 1 0
0 1 1
1 0 0
1 0 1
1 1 0
1 1 1
88 | P a g e
8a 9608/11 Nov 18 Q1a - SoW
1 A student is creating a short video and needs to record music to play in the background.
(a) The student uses a microphone to capture the music.
Explain how the microphone captures the music.
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...............................................................................................................................................[3]
5a 9608/31 Jun 17 Q3a, b, 6 - SoW
3 Consider the following logic circuit, which contains a redundant logic gate.

(a) Write the Boolean algebraic expression corresponding to this logic circuit.
X = ........................................................................................................................................[3]
(b) Complete the truth table for this logic circuit. [2]
A B C Working space X
0 0 0
0 0 1
0 1 0
0 1 1
1 0 0
1 0 1
1 1 0
1 1 1
89 | P a g e
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.
90 | P a g e
(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 ............................................................................................................................
...........................................................................................................................................
Benefit 2 ............................................................................................................................
........................................................................................................................................... [2]
(v) The interrupt handler in step 3 has to test each bit of a 16-bit register to discover the source of the
interrupt.
The contents of the 16-bit register are loaded into the 16-bit accumulator:

An instruction is required to achieve the following:


• If bit 9 is zero, set the accumulator to zero.
• If bit 9 is one, set the accumulator to a non-zero value.
Write this instruction using an appropriate bitwise operation.
....................................................................................................................................... [2]
Page | 91
5b 9608/32 Jun 17 Q3a, b Q6 - SoW
3 A logic circuit is shown:

(a) Write the Boolean algebraic expression corresponding to this logic circuit:
S = ........................................................................................................................................[4]
(b) Complete the truth table for this logic circuit: [2]
Working space
P Q R S

0 0 0
0 0 1
0 1 0
0 1 1
1 0 0
1 0 1
1 1 0
1 1 1
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]
Page | 92
(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
04 FOR SensorCounter 1 TO ......................................................................
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]
Page | 93
(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.

(i) State the purpose of step 3.


...........................................................................................................................................
.......................................................................................................................................[1]
(ii) Explain what happens at step 4.
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
.................................................................................................................
Page | 94
6a 9608/31 Nov 17 Q5ai Q6a, b - SoW
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.
Page | 95
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
LDD <address> Direct addressing. Load the contents of the given address to ACC.
LDR #n Immediate addressing. Load the number n to IX.
Indexed addressing. Form the address from <address> + the contents of the
LDX <address>
index register. Copy the contents of this calculated address to 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 ACC.
OR <address> Bitwise OR operation of the contents of ACC with the contents of address.
CMP #n Compare the contents of ACC with number n.
CMP <address> Compare the contents of ACC with the contents of <address>.
JMP <address> Jump to the given address.
JPE <address> Following a compare instruction, jump to <address> if the compare was True.
Following a compare instruction, jump to <address> if the content of ACC is
JGE <address>
greater than or equal to the number used in the compare instruction.
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
Page | 96
(i) The code uses six memory locations to store the temperature readings. It stores readings for
sensors 1 to 6 at addresses 8000 to 8005.
At a particular time, the memory locations store the following data.
8000 8001 8002 8003 8004 8005
17 14 15 15 16 14
Dry run the assembly language code starting at START and finishing when the loop has been
processed twice. [4]

LOWTEMP LOWREG COUNTER ACC IX


15 B00000000 1

(ii) Explain why the operand of the instruction labelled Q1 has the value 32.
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...................................................................................................................................... [2]
Page | 97
(iii) The code beginning at the instruction labelled HEATON must make the system turn on the
heaters in those areas that are below the minimum temperature.
Describe what this code will have to do.
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...................................................................................................................................... [3]
6b 9608/32 Nov 17 -Q6 – SoW
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]
Page | 98
(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]
Page | 99
(ii) The following table shows part of the instruction set for a processor. The processor has one
general purpose register, the Accumulator (ACC).
Instruction
Explanation
Op code Operand
Direct addressing. Load the contents of the location at the given
LDD <address>
address to ACC.
AND #n Bitwise AND operation of the contents of ACC with the operand.
Bitwise AND operation of the contents of ACC with the contents of
AND <address>
<address>.
XOR #n Bitwise XOR operation of the contents of ACC with the operand.
Bitwise XOR operation of the contents of ACC with the contents of
XOR <address>
<address>.
OR #n Bitwise OR operation of the contents of ACC with the operand.
Bitwise OR operation of the contents of ACC with the contents of
<address>.
OR <address>
<address> can be an absolute address or a symbolic address.
Bits in ACC are shifted n places to the left. Zeros are introduced on the
LSL #n
right hand end.
Bits in ACC are shifted n places to the right. Zeros are introduced on the
LSR #n
left hand end.
The reading for Sensor 5 is used in a calculation. The calculation is carried out by two assembly
language instructions.
The first instruction loads the contents of the 16-bit location that contains the value for Sensor 5.
The second instruction moves the bits in Sensor 5 so that the 16-bit value is the value of Sensor 5.
Complete the two instructions in the following code. Use the instruction set provided.

LDD ............................ // load the contents of the 16-bit location containing the
value for Sensor 5 into the Accumulator
.................................... // move the bits in the Accumulator so that the
Accumulator stores the value of Sensor 5 as an
unsigned 16-bit binary integer [3]
Page | 100
7a 9608 P31 Q7
Q 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
Page | 101
(i) Analyse the data contained in the two bytes.
.................................................................................................................................................................
.................................................................................................................................................................
.................................................................................................................................................................
.................................................................................................................................................................
...........................................................................................................................................................[3]
(ii) The system receives a temperature reading of 238 from room number 4. [2]
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
7b 9608 S18 P32
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.[2]
Scenario System
Car speed display

Aero plane autopilot Control

Rollercoaster

Recording the rainfall at a Monitoring


weather station

Robot loading a part on to a


conveyor belt
Page | 102
(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.
Page | 103
(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. [2]
7 6 5 4 3 2 1 0

Byte 1 Byte 2
Page | 104
(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 changing any
other bits. Use the instruction set provided.
.................................................................................................................................................................
.................................................................................................................................................................
.................................................................................................................................................................
.................................................................................................................................................................
.................................................................................................................................................................
.............................................................................................................................................................[3]
Instruction set
Instruction Explanation
Op code Operand
Direct addressing. 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.
AND #n Bitwise AND operation of the contents of ACC with the operand.
Bitwise AND operation of the contents of ACC with the contents of
AND <address>
<address>.
XOR #n Bitwise XOR operation of the contents of ACC with the operand.
OR #n Bitwise OR operation of the contents of ACC with the operand.
Bitwise OR operation of the contents of ACC with the contents of
OR <address> <address>.
<address> can be an absolute address or a symbolic address.

Marking Schemes
3a 9608/31 Jun 16 Q6 – SoW
Page | 105
Page | 106
0 9618/1 Specimen paper Q4, 5 - SoW
Page | 107

5b 9608/32 Jun 17 Q3a, b, Q6a - SoW


Page | 108
5a 9608/11 Jun 17 Q2 – SoW
Page | 109

5c 9608/13 Jun 17 Q2- SoW


Page | 110
5b 9608/12 Jun 17 Q2 - SoW
Page | 111
6a 9608/11 Nov 17 Q5 - SoW
Page | 112
6b 9608/12 Nov 17 Q6 - SoW
Page | 113
7a 9608 S18 P11
Page | 114
Page | 115
7b 9608 S18 P12

8a 9608/11 Nov 18 Q1a - SoW


Page | 116

7b 9608 S18 P32


Page | 117

5a 9608/31 Jun 17 Q3a, b, 6 - SoW


Page | 118

5b 9608/32 Jun 17 Q3a, b Q6 - SoW


Page | 119
Page | 120
6a 9608/31 Nov 17 Q5ai Q6a, b - SoW
Page | 121
6b 9608/32 Nov 17 Q5a -Q6 – SoW
Page | 122

7a 9608 P31 Q7

You might also like