Question 6(c)(ii) 2017 · October-November · Paper 33 · 2 marks
Reveal official mark-scheme answer
Official answer for Question 6
Part (c)
(ii)
Question 2
Show text version of question
Question 6
Part (c)
(ii)
Question 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.
below the minimum temperature. 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. LDR #n Immediate addressing. Load the number n to IX. Indexed addressing. Form the address from <address> + LDX <address> the contents of the 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. Bitwise OR operation of the contents of ACC with the contents OR <address> 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. Following a compare instruction, jump to <address> if the JPE <address> compare was True. Following a compare instruction, jump to <address> if the JGE <address> content of ACC is greater than or equal to the number used in the compare instruction.
Question 13
Question 6(c) continues on the next page.
Question 14
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
Question 15
(ii)
Explain why the operand of the instruction labelled Q1 has the value 32.
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
......................................................................................................................................
Why this question appears here
98% assigned-topic match · Processor fundamentals › Assembly language
Topic-match percentages estimate how closely each question fits the selected syllabus topic. They are a guide for choosing stricter or broader practice.
Permanent source page: Educate A Change · From 9608_w17_qp_33.pdf
