Past paper – A Level Computer Science (9618)
Cambridge International AS & A Level · 9618
Computer Science · Paper 33
Oct/Nov 2024 · 9618/33/O/N/24
Answer on paper, open each mark scheme and give yourself marks, then open the Summary.
Question text
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.
Show your working.
Mantissa
Exponent
Working …
…
…
…
…
…
[3]
(b) Calculate the denary value of the given normalised binary floating-point number.
Show your working.
Mantissa
Exponent
1
0
1
0
1
1
0
0
1
1
0
0
0
1
0
1
Working …
…
…
…
…
…
Answer …
[3]
ĬÍĊ®Ġ´íÈõÏĪÅĊÝù¸þ×
Question text
2
Reduced Instruction Set Computers (RISC) is a type of processor.
Identify four features of a RISC processor.
1 …
…
2 …
…
3 …
…
4 …
…
[4]
Question text
3
(a) Describe circuit switching as a method of data transmission.
…
…
…
…
…
… [3]
(b) State one benefit and one drawback of circuit switching as a method of data transmission.
Benefit …
…
Drawback …
…
[2]
ĬÏĊ®Ġ´íÈõÏĪÅĊÝû¸þ×
Question text
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.
…
…
…
…
…
…
…
… [4]
Question text
5
(a) Explain what is meant by a hashing algorithm in the context of file access.
…
…
…
…
…
… [3]
(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 …
…
[2]
ĬÍĊ®Ġ´íÈõÏĪÅĊßù¸Ā×
Question text
6
(a) Describe the user-defined data type set.
…
…
…
…
…
… [3]
(b) Write pseudocode statements to declare the set data type, SymbolSet, to hold the following
set of mathematical operators, using the variable Operators.
+
–
*
/
^
…
…
…
…
…
…
…
… [4]
ĬÏĊ®Ġ´íÈõÏĪÅĊßû¸Ā×
Question text
7
The truth table for a logic circuit is shown.
INPUT
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]
ĬÑĊ®Ġ´íÈõÏĪÅĊÞûµþ×
,
,
(b) Complete the Karnaugh map (K-map) for the given truth table.
AB
CD
00
01
11
10
00
01
11
10
[2]
(c) Draw loop(s) around appropriate group(s) in the K-map to produce an optimal sum-of-products.
[2]
(d) (i)
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]
ĬÓĊ®Ġ´íÈõÏĪÅĊÞùµþ×
Question text
8
(a) Describe the process of segmentation for memory management.
…
…
…
…
…
…
…
… [4]
(b) Explain what is meant by disk thrashing.
…
…
…
…
…
… [3]
ĬÑĊ®Ġ´íÈõÏĪÅĊàûµĀ×
Question text
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
telephone number of owner assigned at
OwnerTelephone
STRING
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
… : …
… : …
…
…
…
…
…
[5]
ĬÓĊ®Ġ´íÈõÏĪÅĊàùµĀ×
Question text
10 Several syntax diagrams are shown.
letter
operator
A
+
E
–
I
*
O
/
digit
U
0
Y
1
symbol
2
#
3
$
4
?
5
&
6
@
7
8
9
label
digit
digit
letter
equation
label
operator
label
label
=
ĬÑĊ®Ġ´íÈõÏĪÅĊÝû·þ×
,
,
(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.
[3]
(ii)
Write the BNF for password.
…
…
…
… [2]
ĬÓĊ®Ġ´íÈõÏĪÅĊÝù·þ×
Question text
11
The following diagram shows an ordered binary tree.
Red
Green
Yellow
Blue
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.
–1 is used to represent a null pointer.
Complete this linked list to represent the given binary tree.
RootPtr
LeftPtr
Data
RightPtr
Red
Green
–1
Blue
–1
[4]
ĬÑĊ®Ġ´íÈõÏĪÅĊßû·Ā×
,
,
(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
LeftPtr
Data
RightPtr
0
Red
0
Green
1
Yellow
2
Blue
3
Orange
4
Indigo
5
Violet
FreePtr
6
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
WHILE NowPtr <> -1
IF … THEN
NowPtr
BinTree[NowPtr].LeftPtr
ELSE
IF BinTree[NowPtr].Data < Item THEN
…
ELSE
RETURN NowPtr
ENDIF
ENDIF
ENDWHILE
RETURN NowPtr
ENDFUNCTION
[4]
ĬÓĊ®Ġ´íÈõÏĪÅĊßù·Ā×
,
,
Permission to reproduce items where third-party owned material protected by copyright is included has been sought and cleared where possible. Every
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
ĬÍĊ®Ġ´íÈõÏĪÅĊÞú¶Ą×