Past-paper question · 2021 May-June · Paper 31 · Q7(d)(i)

Question 7(d)(i) 2021 · May-June · Paper 31 · 4 marks

Original past-paper question for 7(D)(I)
Original past-paper question for 7(D)(I)
Original past-paper question for 7(D)(I)
Original past-paper question for 7(D)(I)
Reveal official mark-scheme answer Official mark-scheme answer for 7(D)(I)

Official answer for Question 7

Part (d)

(i)

✓
One mark per point

Question 4

  • Load the accumulator with status of heaters and air conditioning units
✓
// Load the accumulator with the contents of address 300 /
  • Mask out the bits for container 1
✓
// Mask out 4th and 8th bit
  • See whether both heater is on and the air conditioning is on
✓
// Compare the contents of the accumulator/previous result with
✓
B10001000 / (&88)
  • IF the heater is on and the air conditioning is on / jump to ERROR
✓
routine
✓
// jump to ERROR routine if bit patterns are equal
✓
9608/31
✓
Cambridge International AS & A Level – Mark Scheme
✓
May/June 2021
✓
PUBLISHED
✓
Question
✓
Answer
✓
Marks

Mark scheme 9608_s21_ms_31.pdf →

Show text version of question

Question 7

Part (d)

(i)

Question 7

Four shipping containers are used to store goods on the dockside at a port. The temperature

inside each container should be kept between 5 and 8 degrees Celsius inclusive. Each container has a temperature sensor.

A
computer system is programmed to control each container’s temperature by:
  • turning on the heater and turning off the air conditioning unit when the temperature falls below
  • 5 degrees

  • turning off the heater and turning on the air conditioning unit when the temperature rises

above 8 degrees. The following table shows assembly language instructions for the container 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 LDD <address> address to ACC Store the contents of ACC at the given STO <address> address Bitwise AND operation of the contents of ACC AND &n with the hexadecimal number n Bits in ACC are shifted denary number n LSL #n places to the left. Zeros are introduced at the right hand end Compare the contents of ACC with the CMP &n hexadecimal number n Following a compare instruction, jump to JPE <address> <address> or <label> if the compare was True <label>: <op code> <operand> Labels an instruction

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

(i)

These assembly language instructions check for an error in the container 1 system.

LDD 300 AND &88 CMP &88 JPE ERROR

Explain the purpose of each instruction.

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

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

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

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

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

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

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

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

[4]

Question 15

Topic relevance

Why this question appears here

99% 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_31.pdf

Keep practising this topic