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

Question 6(c)(ii) 2017 · October-November · Paper 33 · 2 marks

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

Official answer for Question 6

Part (c)

(ii)

✓
•
✓
COUNTER has an initial value of 1

Question 2

✓
•
✓
Test for final value is before COUNTER updated
✓
•
✓
COUNTER is doubled in value each time around loop
✓
•
✓
six sensors values/bits to check
✓
•
✓
COUNTER is doubled in value 6 times // 2 5
✓
•
✓
Values of COUNTER at test will therefore be 1 – 2 – 4 – 8 – 16 – 32
✓
1 mark for valid point, max 2
✓
9608/33
✓
Cambridge International AS/A Level – Mark Scheme
✓
October/November
✓
PUBLISHED
✓
2017
✓
Question
✓
Answer
✓
Marks

Mark scheme 9608_w17_ms_33.pdf →

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.

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

(ii)

Explain why the operand of the instruction labelled Q1 has the value 32.

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

......................................................................................................................................

[2]
Topic relevance

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

Keep practising this topic