Computer Science (9618) · Oct/Nov 2024 · Question paper 31
Cambridge Computer Science (9618) question paper for paper 31, Oct/Nov 2024 — 9618/31/O/N/24, file 9618_w24_qp_31.pdf.
Text of this paper
www.dynamicpapers.com
* 0000800000001 *
,
,
Cambridge International AS & A Level
¬O. 4mHuOªE_z6W
¬a/|P¤x^pw~w-2s
¥5EU55euUU¥E uEuuU
* 7 6 0 6 8 7 7 1 6 1 *
COMPUTER SCIENCE
9618/31
Paper 3 Advanced Theory
October/November 2024
1 hour 30 minutes
You must answer on the question paper.
No additional materials are needed.
INSTRUCTIONS
●
Answer all questions.
●
Use a black or dark blue pen.
●
Write your name, centre number and candidate number in the boxes at the top of the page.
●
Write your answer to each question in the space provided.
●
Do not use an erasable pen or correction fluid.
●
Do not write on any bar codes.
●
You may use an HB pencil for any diagrams, graphs or rough working.
●
Calculators must not be used in this paper.
INFORMATION
●
The total mark for this paper is 75.
●
The number of marks for each question or part question is shown in brackets [ ].
●
No marks will be awarded for using brand names of software packages or hardware.
This document has 16 pages. Any blank pages are indicated.
DC (JP/SG) 336461/5
© UCLES 2024
[Turn over
2
,
1
,
Numbers are stored in a computer using binary floating-point representation with:
•
•
•
10 bits for the mantissa
6 bits for the exponent
two’s complement form for both the mantissa and the exponent.
(a) Calculate the normalised binary floating-point representation of +201.125 in this system.
DO NOT WRITE IN THIS MARGIN
www.dynamicpapers.com
* 0000800000002 *
Mantissa
Exponent
Working
DO NOT WRITE IN THIS MARGIN
Show your working.
[3]
(b) Calculate the denary value of the given normalised binary floating-point number.
Show your working.
1
0
1
0
1
1
Exponent
0
0
1
1
0
0
0
1
0
1
Working
DO NOT WRITE IN THIS MARGIN
Mantissa
DO NOT WRITE IN THIS MARGIN
Answer
[3]
© UCLES 2024
ĬÍĊ®Ġ´íÈõÏĪÅĊÞü¸þ×
ĬáûÍĨôĝÕāāġ¿ÇĂËďĂ
ĥĥÕÕõÕĥĕĥĕµąąµåµÕÕ
9618/31/O/N/24
DO NOT WRITE IN THIS MARGIN
www.dynamicpapers.com
DO NOT WRITE IN THIS MARGIN
* 0000800000003 *
3
,
2
,
Reduced Instruction Set Computers (RISC) is a type of processor.
Identify four features of a RISC processor.
1
2
DO NOT WRITE IN THIS MARGIN
3
4
[4]
DO NOT WRITE IN THIS MARGIN
3
(a) Describe circuit switching as a method of data transmission.
DO NOT WRITE IN THIS MARGIN
DO NOT WRITE IN THIS MARGIN
[3]
(b) State one benefit and one drawback of circuit switching as a method of data transmission.
Benefit
Drawback
[2]
© UCLES 2024
ĬÏĊ®Ġ´íÈõÏĪÅĊÞú¸þ×
Ĭá®üÕĢðčä÷ðèě¯ÖËğĂ
ĥĥåĕµµąõõĥĥąąÕÅõÅÕ
9618/31/O/N/24
[Turn over
4
,
4
,
The TCP/IP protocol may be viewed as a stack that contains four layers: Application, Transport,
Internet, Link.
Describe how the layers of the TCP/IP protocol stack interact with each other.
DO NOT WRITE IN THIS MARGIN
www.dynamicpapers.com
* 0000800000004 *
[4]
(a) Explain what is meant by a hashing algorithm in the context of file access.
DO NOT WRITE IN THIS MARGIN
5
DO NOT WRITE IN THIS MARGIN
(b) The use of a hashing algorithm can result in the same storage location being identified for
more than one record.
Outline two methods of overcoming this issue.
1
2
DO NOT WRITE IN THIS MARGIN
[3]
© UCLES 2024
ĬÍĊ®Ġ´íÈõÏĪÅĊàü¸Ā×
Ĭá®ùÕĬþĜ×ù÷ß¹ēøÛėĂ
ĥÕõĕõµąÕĕÅĕąÅÕĥõÕÕ
9618/31/O/N/24
DO NOT WRITE IN THIS MARGIN
[2]
www.dynamicpapers.com
DO NOT WRITE IN THIS MARGIN
* 0000800000005 *
5
,
6
,
(a) Describe the user-defined data type set.
DO NOT WRITE IN THIS MARGIN
[3]
(b) Write pseudocode statements to declare the set data type, SymbolSet, to hold the following
set of mathematical operators, using the variable Operators.
+
–
*
/
^
DO NOT WRITE IN THIS MARGIN
DO NOT WRITE IN THIS MARGIN
DO NOT WRITE IN THIS MARGIN
[4]
© UCLES 2024
ĬÏĊ®Ġ´íÈõÏĪÅĊàú¸Ā×
ĬáúÍĞĂĬâÿĊĪĝīäÛħĂ
ĥÕąÕµÕĥµąµÅąÅµąµÅÕ
9618/31/O/N/24
[Turn over
OUTPUT
A
B
C
D
T
0
0
0
0
0
0
0
0
1
1
0
0
1
0
0
0
0
1
1
1
0
1
0
0
0
0
1
0
1
0
0
1
1
0
0
0
1
1
1
0
1
0
0
0
0
1
0
0
1
1
1
0
1
0
0
1
0
1
1
1
1
1
0
0
0
1
1
0
1
1
1
1
1
0
0
1
1
1
1
1
(a) Write the Boolean logic expression that corresponds to the given truth table as the
sum-of-products.
T =
[3]
© UCLES 2024
ĬÑĊ®Ġ´íÈõÏĪÅĊÝúµþ×
Ĭá®úÒĨĪĢêČûēýēÁóėĂ
ĥąåÕµõĥĕÅÕĥąąµåõĕÕ
9618/31/O/N/24
DO NOT WRITE IN THIS MARGIN
INPUT
DO NOT WRITE IN THIS MARGIN
The truth table for a logic circuit is shown.
DO NOT WRITE IN THIS MARGIN
7
,
DO NOT WRITE IN THIS MARGIN
6
,
DO NOT WRITE IN THIS MARGIN
www.dynamicpapers.com
* 0000800000006 *
www.dynamicpapers.com
DO NOT WRITE IN THIS MARGIN
* 0000800000007 *
7
,
,
(b) Complete the Karnaugh map (K-map) for the given truth table.
AB
CD
00
01
11
10
00
DO NOT WRITE IN THIS MARGIN
01
11
10
[2]
(c) Draw loop(s) around appropriate group(s) in the K-map to produce an optimal sum-of-products.
[2]
Write the Boolean logic expression from your answer to part (c) as the simplified
sum-of-products.
T =
[2]
(ii)
Use Boolean algebra to write your answer to part (d)(i) in its simplest form.
T = [1]
DO NOT WRITE IN THIS MARGIN
DO NOT WRITE IN THIS MARGIN
DO NOT WRITE IN THIS MARGIN
(d) (i)
© UCLES 2024
ĬÓĊ®Ġ´íÈõÏĪÅĊÝüµþ×
ĬáùÚĢĦĒÏîĆÖÙīĕóħĂ
ĥąÕĕõĕąõÕåµąąÕŵąÕ
9618/31/O/N/24
[Turn over
8
,
8
,
(a) Describe the process of segmentation for memory management.
DO NOT WRITE IN THIS MARGIN
www.dynamicpapers.com
* 0000800000008 *
[4]
(b) Explain what is meant by disk thrashing.
DO NOT WRITE IN THIS MARGIN
© UCLES 2024
ĬÑĊ®Ġ´íÈõÏĪÅĊßúµĀ×
ĬáüÚĬĘėìôýÍûÇ·ģďĂ
ĥµąĕµĕąÕµąÅąÅÕĥµĕÕ
9618/31/O/N/24
DO NOT WRITE IN THIS MARGIN
DO NOT WRITE IN THIS MARGIN
[3]
DO NOT WRITE IN THIS MARGIN
www.dynamicpapers.com
DO NOT WRITE IN THIS MARGIN
DO NOT WRITE IN THIS MARGIN
DO NOT WRITE IN THIS MARGIN
DO NOT WRITE IN THIS MARGIN
* 0000800000009 *
9
,
9
,
A veterinary surgery wants to create a class for individual pets.
Some of the attributes required in the class are listed in the table.
Attribute
Data type
Description
PetID
STRING
unique ID assigned at registration
PetType
STRING
type of pet assigned at registration
OwnerTelephone
STRING
telephone number of owner assigned at
registration
DateRegistered
DATE
date of registration
(a) State one reason why the attributes would be declared as PRIVATE.
[1]
(b) Complete the class diagram for Pet, to include:
•
•
•
•
•
•
•
an attribute and data type for the name of the pet
an attribute and data type for the name of the owner
a method to create a Pet object and set attributes at the time of registration
a method to assign a pet ID
a method to assign the date of registration
a method to return the pet name
a method to return the owner’s telephone number.
Pet
PetID
: STRING
PetType
: STRING
OwnerTelephone
: STRING
DateRegistered
: DATE
:
:
DO NOT WRITE IN THIS MARGIN
[5]
© UCLES 2024
ĬÓĊ®Ġ´íÈõÏĪÅĊßüµĀ×
Ĭá®ûÒĞĜħÍĆôĜ߯ģģğĂ
ĥµõÕõõĥµåõĕąÅµąõąÕ
9618/31/O/N/24
[Turn over
operator
A
+
E
–
I
*
O
/
digit
U
0
Y
symbol
1
#
2
$
3
?
4
&
5
@
6
7
8
9
label
equation
© UCLES 2024
digit
letter
label
=
ĬÑĊ®Ġ´íÈõÏĪÅĊÞú·þ×
Ĭá°üÓĪĐāæûĆ÷ėÅÓÛħĂ
ĥĥĥÕµĕåÕĕµÅÅÅõĥµåÕ
label
9618/31/O/N/24
digit
operator
label
DO NOT WRITE IN THIS MARGIN
letter
DO NOT WRITE IN THIS MARGIN
10 Several syntax diagrams are shown.
DO NOT WRITE IN THIS MARGIN
,
DO NOT WRITE IN THIS MARGIN
10
,
DO NOT WRITE IN THIS MARGIN
www.dynamicpapers.com
* 0000800000010 *
www.dynamicpapers.com
DO NOT WRITE IN THIS MARGIN
* 0000800000011 *
11
,
,
(a) Complete the Backus-Naur Form (BNF) for the given syntax diagrams.
<operator> ::=
<label> ::=
<equation> ::=
[4]
(b) A new syntax rule, password, is required. It must begin with a letter or a symbol, followed by
a digit and end with one or two symbols.
(i)
Draw a syntax diagram for password.
DO NOT WRITE IN THIS MARGIN
DO NOT WRITE IN THIS MARGIN
[3]
DO NOT WRITE IN THIS MARGIN
DO NOT WRITE IN THIS MARGIN
(ii)
Write the BNF for password.
[2]
© UCLES 2024
ĬÓĊ®Ġ´íÈõÏĪÅĊÞü·þ×
Ĭá¯ûÛĠĔñÓýû²ÃćÛėĂ
ĥĥĕĕõõŵąÅĕÅÅĕąõµÕ
9618/31/O/N/24
[Turn over
12
,
11
,
The following diagram shows an ordered binary tree.
Red
Green
Blue
Yellow
Orange
Violet
Indigo
(a) A linked list of nodes is used to store the data. Each node consists of a left pointer, the data
and a right pointer.
DO NOT WRITE IN THIS MARGIN
DO NOT WRITE IN THIS MARGIN
www.dynamicpapers.com
* 0000800000012 *
DO NOT WRITE IN THIS MARGIN
–1 is used to represent a null pointer.
Complete this linked list to represent the given binary tree.
RootPtr
LeftPtr
Data
RightPtr
Red
Blue
–1
[4]
© UCLES 2024
ĬÑĊ®Ġ´íÈõÏĪÅĊàú·Ā×
Ĭá¯úÛĦĢøèăô¹ġđåËğĂ
ĥÕÅĕµõÅĕĥĥĥÅąĕåõåÕ
9618/31/O/N/24
DO NOT WRITE IN THIS MARGIN
–1
DO NOT WRITE IN THIS MARGIN
Green
www.dynamicpapers.com
DO NOT WRITE IN THIS MARGIN
DO NOT WRITE IN THIS MARGIN
DO NOT WRITE IN THIS MARGIN
* 0000800000013 *
13
,
,
(b) A user-defined record structure is used to store the nodes of the linked list in part (a).
Complete the diagram, using your answer for part (a).
RootPtr
Index
0
0
Red
1
Green
2
Yellow
3
Blue
4
Orange
5
Indigo
6
Violet
FreePtr
LeftPtr
Data
RightPtr
7
[4]
(c) The linked list in part (a) is implemented using a 1D array of records. Each record contains a
left pointer, data and a right pointer.
The following pseudocode represents a function that searches for an element in the array of
records BinTree. It returns the index of the record if the element is found, or it returns a null
pointer if the element is not found.
Complete the pseudocode for the function.
FUNCTION SearchTree(Item : STRING)
NowPtr
DO NOT WRITE IN THIS MARGIN
WHILE NowPtr <> -1
IF THEN
NowPtr
BinTree[NowPtr].LeftPtr
ELSE
IF BinTree[NowPtr].Data < Item THEN
ELSE
DO NOT WRITE IN THIS MARGIN
RETURN NowPtr
ENDIF
ENDIF
ENDWHILE
RETURN NowPtr
ENDFUNCTION
© UCLES 2024
[4]
ĬÓĊ®Ġ´íÈõÏĪÅĊàü·Ā×
Ĭá°ùÓĤĞĈÑõýðµĩñËďĂ
ĥÕµÕõĕåõõĕµÅąõŵµÕ
9618/31/O/N/24
14
,
,
© UCLES 2024
ĬÍĊ®Ġ´íÈõÏĪÅĊßû¶Ă×
Ĭá¯ûÒĞđðãóĊÓę´õûėĂ
ĥõµĕµõĥÕĕąµąÅµĥõĥÕ
9618/31/O/N/24
DO NOT WRITE IN THIS MARGIN
DO NOT WRITE IN THIS MARGIN
DO NOT WRITE IN THIS MARGIN
DO NOT WRITE IN THIS MARGIN
BLANK PAGE
DO NOT WRITE IN THIS MARGIN
www.dynamicpapers.com
* 0000800000014 *
www.dynamicpapers.com
15
,
,
BLANK PAGE
DO NOT WRITE IN THIS MARGIN
DO NOT WRITE IN THIS MARGIN
DO NOT WRITE IN THIS MARGIN
DO NOT WRITE IN THIS MARGIN
DO NOT WRITE IN THIS MARGIN
* 0000800000015 *
© UCLES 2024
ĬÏĊ®Ġ´íÈõÏĪÅĊßù¶Ă×
Ĭá°üÚĬčĀÖą÷˽ÌáûħĂ
ĥõÅÕõĕąµąõĥąÅÕąµõÕ
9618/31/O/N/24
16
,
,
Permission to reproduce items where third-party owned material protected by copyright is included has been sought and cleared where possible. Every
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 Cambridge Assessment. Cambridge Assessment is the brand name of the University of Cambridge
Local Examinations Syndicate (UCLES), which is a department of the University of Cambridge.
© UCLES 2024
ĬÍĊ®Ġ´íÈõÏĪÅĊÝû¶Ą×
Ĭá°ùÚĢğĉáċðčğĨăīďĂ
ĥÅĕÕµĕąĕĥÕĕąąÕåµĥÕ
9618/31/O/N/24
DO NOT WRITE IN THIS MARGIN
DO NOT WRITE IN THIS MARGIN
DO NOT WRITE IN THIS MARGIN
DO NOT WRITE IN THIS MARGIN
BLANK PAGE
DO NOT WRITE IN THIS MARGIN
www.dynamicpapers.com
* 0000800000016 *