Past-paper question · 2015 October-November · Paper 42 · Q8(a)(ii)

Question 8(a)(ii) 2015 · October-November · Paper 42 · 12 marks

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

The answer for this question is in the official mark scheme: open the mark scheme.

Mark scheme 9608_w15_ms_42.pdf →

Show text version of question

Question 8

Part (a)

(ii)

Question 8

: : 1999 2000

[2]

(ii)

Another procedure call is made: Add("Drive", "Laufwerk")

Explain the problem that occurs when this key-value pair is saved.

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

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

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

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

[2]

Question 10

(iii)

Describe a method to handle the problem identified in part (b)(ii).

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

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

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

.......................................................................................................................................[2]

(iv)

Write pseudocode to implement the method you described in part

Part (b)

(iii)

. Choose line

numbers to indicate where your pseudocode should be inserted in the given pseudocode.

10 PROCEDURE Add(NewKey : STRING, NewValue : STRING)

20 Index ← Hash(NewKey)

30 Dictionary[Index, 1] ← NewKey // store the key

40 Dictionary[Index, 2] ← NewValue // store the value

50 ENDPROCEDURE

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

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

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

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

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

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

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

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

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

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

[4]

Question 11

Question 5 begins on page 12.

Question 12

5 The table shows assembly language instructions for a processor which has one general purpose register – the Accumulator (ACC).

Instruction Explanation Op Code Operand LDM #n Immediate addressing. Load the number n to ACC LDD <address> Direct addressing. Load the contents of the given address to ACC STO <address> Store the contents of ACC at the given address ADD <address> Add the contents of the given address to the ACC INC <register> Add 1 to the contents of the register CMP <address> Compare the contents of ACC with the contents of <address> JPN <address> Following a compare instruction, jump to <address> if the compare was False END Return control to the operating system

(ii)

Explain the role address 511 has in this assembly language program.

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

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

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

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

[2]
Topic relevance

Why this question appears here

88% 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_w15_qp_42.pdf

Keep practising this topic