Past-paper question · 2021 May-June · Paper 32 · Q8(d)(ii)

Question 8(d)(ii) 2021 · May-June · Paper 32 · 3 marks

Original past-paper question for 8(D)(II)
Original past-paper question for 8(D)(II)
Original past-paper question for 8(D)(II)
Original past-paper question for 8(D)(II)
Original past-paper question for 8(D)(II)
Reveal official mark-scheme answer Official mark-scheme answer for 8(D)(II)

Official answer for Question 8

Part (d)

(ii)

✓
One mark keeping instructions 1 and 4 the same

Question 3

✓
One mark AND &44 as second instruction
✓
One mark CMP &44 as third instruction
✓
LDD 700
✓
AND &44 // AND B01000100
✓
CMP &44 // CMP B01000100
✓
JPE ERROR

Mark scheme 9608_s21_ms_32.pdf →

Show text version of question

Question 8

Part (d)

(ii)

Question 8

Four greenhouses are used to grow tomatoes. The temperature inside each greenhouse should

be kept between 10 and 20 degrees Celsius inclusive. Each greenhouse has a temperature sensor.

A
computer system is programmed to control each greenhouse’s temperature by:
  • turning on the heater and closing the ventilation when the temperature falls below 10 degrees
  • turning off the heater and opening the ventilation when the temperature rises above

20 degrees. The table shows assembly language instructions for the greenhouse computer system that has one general purpose register, the accumulator (ACC).

Instruction Explanation Label Op code Operand LDM &n Load the hexadecimal number n to ACC

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

Bitwise AND operation of the contents of ACC with the AND &n hexadecimal number n Bits in ACC are shifted denary number n places to the LSL #n left. Zeros are introduced at the right hand end Compare the contents of ACC with the hexadecimal CMP &n number n Following a compare instruction, jump to <address> JPE <address> or <label> if the compare was True <label>: <op code> <operand> Labels an instruction

Question 13

If the bit for a greenhouse’s heater and the bit for the same greenhouse’s ventilation are both set to 1, a routine at label ERROR is executed. This routine has not been provided.

(ii)

Write the assembly language instructions to check for an error in the greenhouse 2

system.

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

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

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

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

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

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

[3]

Question 14

Question 15

Question 16

reasonable effort has been made by the publisher (UCLES) to trace copyright holders, but if any items requiring clearance have unwittingly been included, the publisher will be pleased to make amends at the earliest possible opportunity.

To avoid the issue of disclosure of answer-related information to candidates, all copyright acknowledgements are reproduced online in the Cambridge Assessment International Education Copyright Acknowledgements Booklet. This is produced for each series of examinations and is freely available to download at www.cambridgeinternational.org after the live examination series.

Cambridge Assessment International Education is part of the Cambridge Assessment Group. Cambridge Assessment is the brand name of the University of Cambridge Local Examinations Syndicate (UCLES), which itself is a department of the University of Cambridge.

Topic relevance

Why this question appears here

76% 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_s21_qp_32.pdf

Keep practising this topic