Past-paper question · 2014 May-June · Paper 33 · Q7(d)(i)

Question 7(d)(i) 2014 · May-June · Paper 33 · 12 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)
Original past-paper question for 7(D)(I)
Original past-paper question for 7(D)(I)
Reveal official mark-scheme answer

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

Mark scheme 9691_s14_ms_33.pdf →

Show text version of question

Question 7

Part (d)

(i)

Question 7

2000

[4]

Question 11

Part (d)

An algorithm is designed in pseudocode to search the binary tree for a particular sport.

The algorithm uses the variables below:

Variable Data type Description

SearchSport STRING Sport to search for

Current INTEGER Array subscript for the item currently considered

IsFound BOOLEAN Flag set to TRUE when SearchSport is found

//binary tree search INPUT SearchSport IsFound ← FALSE Current ← RootPtr REPEAT IF SearchSport = Data[Current] THEN OUTPUT 'found' IsFound ← TRUE ELSE IF SearchSport > Data[Current] THEN OUTPUT 'Moving right' Current ← RightPtr[Current] ELSE OUTPUT 'Moving left' Current ← LeftPtr[Current] ENDIF ENDIF UNTIL IsFound = TRUE OR Current = 0

IF Current = 0 THEN OUTPUT SearchSport ' not found' ENDIF

Question 12

The algorithm is tested using this new dataset.

RootPtr 1

LeftPtr Data RightPtr

1 2 KARATE 3

2 0 ARCHERY 4

3 6 ROWING 5

4 0 HANDBALL 0

5 0 RUGBY 7

6 0 LACROSSE 0

7 0 SHOOTING 0

2000

Complete the trace table below to search for LACROSSE.

SearchSport IsFound Current OUTPUT

LACROSSE FALSE 1

[5]

Question 13

Many computer systems need to store and process real numbers.

A
computer uses two bytes to store a real number. The first (Byte 7) stores the mantissa and

the second (Byte 8) the exponent. Both mantissa and exponent use two’s complement.

(i)

What denary number is represented by Byte 7 and Byte 8?

Byte 7 Byte 8

Show your working.

[3]
Topic relevance

Why this question appears here

91% assigned-topic match · Data types and structures › Data types and records

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 9691_s14_qp_33.pdf

Keep practising this topic