Past paper – A Level Computer Science (9618)

Cambridge International AS & A Level · 9618

Computer Science · Paper 32

May/June 2025 · 9618/32/M/J/25

Questions13
Marks75
TypeWritten

Answer on paper, open each mark scheme and give yourself marks, then open the Summary.

0 / 0Answer a question to start your score.
Saved 0
Advertisement
1
9618/32/M/J/25 · Question 1May/June 2025Paper 326 marks
Loading question…
Question text

1
Data types can be defined using pseudocode.
The composite record data type, Departure, is used to represent flights from Cambridge Airport
and is defined in pseudocode as:
TYPE Departure
DECLARE FlightNumber : STRING
DECLARE Destination : STRING
DECLARE FlightDate : DATE
DECLARE Gate : STRING
DECLARE Airline : STRING
ENDTYPE
A variable, Flight1, is declared in pseudocode as:
DECLARE Flight1 : Departure
(a) Write pseudocode to store the following details to Flight1:
Field
Data
FlightNumber
SB2789
Destination
Dublin
FlightDate
30/07/2025
Gate
N03
Airline
Cambridge Airways
…
…
…
…
…
… [3]
(b) The data type for Gate is changed to an enumerated data type, GateID.
(i)
Write a pseudocode statement to declare GateID to hold the identity codes for the
airport gates:
N01, N02, N03, W01, W02, W03, W04
…
… [2]
(ii)
Write the new pseudocode statement required to replace the declaration of Gate in
Departure.
… [1]
ĬÍĊ®Ġ´íÈõÏĪÅĊÞû·þ×

2
9618/32/M/J/25 · Question 2May/June 2025Paper 326 marks
Loading question…
Question text

2
Numbers are stored in a computer using binary floating-point representation with:
•
12 bits for the mantissa
•
4 bits for the exponent
•
two’s complement form for both the mantissa and the exponent.
(a) Calculate the normalised binary floating-point representation of +124.4375 in this system.
Show your working.
Mantissa
Exponent
Working …
…
…
…
…
…
[3]
(b) Calculate the denary value of the following normalised binary floating-point number.
Show your working.
Mantissa
Exponent
1
0
1
0
0
0
1
0
1
0
1
1
0
1
1
0
Working …
…
…
…
…
Denary value …
[3]
ĬÏĊ®Ġ´íÈõÏĪÅĊÞù·þ×

3
9618/32/M/J/25 · Question 3May/June 2025Paper 325 marks
Loading question…
Question text

3
(a) Identify two different layers of the TCP/IP protocol suite.
…
… [1]
(b) Describe how the TCP/IP protocol suite is applied when a message is sent through the
internet from one host to another. Do not describe the function of individual layers of the
TCP/IP protocol suite.
…
…
…
…
…
…
…
…
…
…
…
… [4]

Advertisement
4
9618/32/M/J/25 · Question 4May/June 2025Paper 324 marks
Loading question…
Question text

4
Circuit switching may be used as a method of data transmission.
State two benefits and two drawbacks of circuit switching.
Benefit 1 …
…
Benefit 2 …
…
Drawback 1 …
…
Drawback 2 …
…
[4]
ĬÍĊ®Ġ´íÈõÏĪÅĊàû·Ā×

5
9618/32/M/J/25 · Question 5May/June 2025Paper 327 marks
Loading question…
Question text

5
The management and scheduling of processes are tasks carried out by an operating system.
(a) Identify three process states.
1 …
2 …
3 …
[3]
(b) Describe the function of the shortest job first scheduling routine and give a benefit of this
routine.
Function …
…
…
…
…
…
Benefit …
…
[4]

6
9618/32/M/J/25 · Question 6May/June 2025Paper 326 marks
Loading question…
Question text

6
(a) Describe the structure of a graph as used in an Artificial Intelligence (AI) system.
…
…
…
… [2]
(b) Explain how supervised learning and unsupervised learning differ from each other.
…
…
…
…
…
…
…
… [4]
ĬÏĊ®Ġ´íÈõÏĪÅĊàù·Ā×

7
9618/32/M/J/25 · Question 7May/June 2025Paper 328 marks
Loading question…
Question text

7
The diagram shows a logic circuit.
A
Q
B
S
P
C
Z
R
D
(a) Complete the truth table for the given logic circuit.
Show your working.
Working space
A
B
C
D
P
Q
R
S
Z
0
0
0
0
0
0
0
1
0
0
1
0
0
0
1
1
0
1
0
0
0
1
0
1
0
1
1
0
0
1
1
1
1
0
0
0
1
0
0
1
1
0
1
0
1
0
1
1
1
1
0
0
1
1
0
1
1
1
1
0
1
1
1
1
[3]
ĬÑĊ®Ġ´íÈõÏĪÅĊÝù¶þ×
,
,
(b) Write the Boolean logic expression that corresponds to the given logic circuit as the
sum-of-products.
Z = …
… [1]
(c) Use Boolean algebra including De Morgan’s laws to simplify the following expression.
Show all working.
(A + B) . (A . B + B . C)
Working …
…
…
…
…
…
Simplified expression …
…
[4]

8
9618/32/M/J/25 · Question 8May/June 2025Paper 324 marks
Loading question…
Question text

8
Explain what is meant by lexical analysis during program compilation.
…
…
…
…
…
…
…
… [4]
ĬÓĊ®Ġ´íÈõÏĪÅĊÝû¶þ×

Advertisement
9
9618/32/M/J/25 · Question 9May/June 2025Paper 326 marks
Loading question…
Question text

9
Several syntax diagrams are shown.
letter
digit
A
0
B
1
C
2
D
3
E
4
F
5
G
6
H
7
J
8
K
9
operator
+
–
*
/
letter
variable
letter
digit
^
ĬÑĊ®Ġ´íÈõÏĪÅĊßù¶Ā×
,
,
(a) State why 9K is not a valid variable for the given syntax diagrams.
…
… [1]
(b) Complete the Backus-Naur Form (BNF) for <operator>.
<operator> ::= …
… [1]
(c) An expression is defined as follows:
•
A variable is assigned to a variable followed by an operator followed by another variable.
•
The operator and final variable stage can be repeated as many times as necessary.
Complete the syntax diagram for an expression.
expression
=
variable
[3]
(d) A character can be a letter or a digit.
An additional constraint has been applied to the definition of variable. It must comply with the
given syntax diagram, but it will only pass validation if it has at least four characters.
State one example of a valid variable.
…
… [1]

10
9618/32/M/J/25 · Question 10May/June 2025Paper 324 marks
Loading question…
Question text

10 Identify the two main protocols that form Transport Layer Security (TLS) and state the purpose of
each.
Protocol 1 …
Purpose …
…
Protocol 2 …
Purpose …
…
[4]
ĬÓĊ®Ġ´íÈõÏĪÅĊßû¶Ā×

11
9618/32/M/J/25 · Question 11May/June 2025Paper 326 marks
Loading question…
Question text

11
(a) A linked list of nodes is used to store an ordered list of strings. Each node consists of the
data, a left pointer and a right pointer.
Left pointer Data Right pointer
Pp
The linked list will be organised as a binary tree.
0 is used to represent a null pointer.
Complete the binary tree, including null pointers, to show how the data will be organised after
the following strings have been added:
Aa, Mm, Ss, Xx
Root pointer
Pp
Gg
Rr
0
Kk
[4]
ĬÑĊ®Ġ´íÈõÏĪÅĊÞù¸þ×
,
,
(b) A binary tree can be used to implement recursion.
Identify one feature of an algorithm that makes it beneficial to use recursion.
Give one example of an application that could use a recursive algorithm.
Feature …
…
Example …
[2]
ĬÓĊ®Ġ´íÈõÏĪÅĊÞû¸þ×

12
9618/32/M/J/25 · Question 12May/June 2025Paper 328 marks
Loading question…
Question text

12 (a) A medical clinic uses objects of the class Patient to assign a priority and a doctor to a
patient. Some of the attributes required in the class are listed in the table.
Attribute
Data type
Description
PatientID
STRING
Unique identifier of the patient
Name
STRING
Patient’s full name, surname first
DoctorID
STRING
ID of doctor administering treatment
Treatment is prioritised with a numeric scale of 1 to 5.
Complete the class diagram for Patient, to include:
•
attribute and data type for the date of birth
•
attribute and data type for the priority
•
methods to assign the patient ID, priority and doctor ID
•
methods to return the patient ID, patient date of birth and the priority.
Patient
PatientID
: STRING
Name
: STRING
… : …
… : …
DoctorID
: STRING
…
SetName(FullName : STRING)
SetDateOfBirth(DOB : DATE)
…
…
…
GetName()
…
…
GetDoctorID()
[5]
ĬÑĊ®Ġ´íÈõÏĪÅĊàù¸Ā×
,
,
(b) (i)
Identify the object-oriented programming (OOP) term described as ‘an occurrence of an
object’.
… [1]
(ii)
Describe what is meant by the OOP term polymorphism.
…
…
…
… [2]

13
9618/32/M/J/25 · Question 13May/June 2025Paper 325 marks
Loading question…
Question text

13 The pseudocode algorithm below uses random file access to copy 50 records from a live file
CurrentResults.dat to a stored file StoredResults.dat one record at a time. It uses the
user-defined type StudentResult.
TYPE StudentResult
DECLARE LastName : STRING
DECLARE FirstName : STRING
DECLARE ExamGrade : STRING
ENDTYPE
If any grades are missing in CurrentResults.dat, the text "Missing grade" is added to the
ExamGrade field in StoredResults.dat
Complete this file handling pseudocode algorithm.
DECLARE Grade : StudentResult
DECLARE Position : INTEGER
…
OPENFILE "StoredResults.dat" FOR RANDOM
…
SEEK "CurrentResults.dat", Position
GETRECORD "CurrentResults.dat", Grade
IF Grade.ExamGrade = "" THEN
…
ENDIF
…
…
NEXT Position
CLOSEFILE "CurrentResults.dat"
CLOSEFILE "StoredResults.dat"
[5]
ĬÓĊ®Ġ´íÈõÏĪÅĊàû¸Ā×
,
,
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
ĬÍĊ®Ġ´íÈõÏĪÅĊÝüµĄ×

Advertisement