Past-paper question · 2017 October-November · Paper 33 · Q6(c)(i)

Question 6(c)(i) 2017 · October-November · Paper 33 · 4 marks

Original past-paper question for 6(C)(I)
Original past-paper question for 6(C)(I)
Original past-paper question for 6(C)(I)
Original past-paper question for 6(C)(I)
Original past-paper question for 6(C)(I)
Reveal official mark-scheme answer Official mark-scheme answer for 6(C)(I)

Official answer for Question 6

Part (c)

(i)

✓
One mark per column excluding LOWTEMP

Question 4

✓
LOWTEMP
✓
LOWREG
✓
COUNTER
✓
ACC
✓
IX

Question 15

✓
B00000000

Question 1

✓
0

Question 17

Question 1

Question 2

Question 2

Question 1

Question 14

✓
B00000000
✓
B00000010
✓
B00000010

Question 2

Question 4

Question 4

Question 2

Mark scheme 9608_w17_ms_33.pdf →

Show text version of question

Question 6

Part (c)

(i)

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.

A
computer system is programmed to turn on appropriate heaters when one of the sensors is

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

(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.

Dry run the assembly language code starting at START and finishing when the loop has been processed twice.

LOWTEMP LOWREG COUNTER ACC IX

15 B00000000 1

[4]

Question 16

Topic relevance

Why this question appears here

86% 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

Keep practising this topic