Computer Science (9618) · May/June 2025 · Question paper 32

Cambridge Computer Science (9618) question paper for paper 32, May/June 2025 — 9618/32/M/J/25, file 9618_s25_qp_32.pdf.

Advertisement
Loading the paper…
Text of this paper

* 0000800000001 *

,

,

Cambridge International AS & A Level
¬OŠ. 4mHuOªEŠ_y5€W
¬HpqMª–ix‹I†‰Q˜‚
¥ •uUeu• UE 5eueU

* 4 9 0 2 0 5 5 4 7 2 *

COMPUTER SCIENCE

9618/32

Paper 3 Advanced Theory

May/June 2025
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 (WW/FC) 342253/2
© UCLES 2025

[Turn over

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

DO NOT WRITE IN THIS MARGIN

1

,

DO NOT WRITE IN THIS MARGIN

2
,

DO NOT WRITE IN THIS MARGIN

* 0000800000002 *

[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:

DO NOT WRITE IN THIS MARGIN

[2]
(ii)

Write the new pseudocode statement required to replace the declaration of Gate in
Departure.
[1]

© UCLES 2025

ĬÍĊ®Ġ´íÈõÏĪÅĊÞû·þ×
ĬÈîòÐĞĒùÒĉíæ®ĥ¹ĩĐĂ
ĥÕĕĕµµĥĕåÅąąąõŵąÕ

9618/32/M/J/25

DO NOT WRITE IN THIS MARGIN

N01, N02, N03, W01, W02, W03, W04

DO NOT WRITE IN THIS MARGIN

* 0000800000003 *

3
,

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.

DO NOT WRITE IN THIS MARGIN

Mantissa

Exponent

Working

DO NOT WRITE IN THIS MARGIN

[3]
(b) Calculate the denary value of the following normalised binary floating-point number.
Show your working.
Mantissa
1

0

1

0

0

0

1

Exponent
0

1

0

1

1

0

1

1

0

DO NOT WRITE IN THIS MARGIN

DO NOT WRITE IN THIS MARGIN

Working

Denary value
[3]

© UCLES 2025

ĬÏĊ®Ġ´íÈõÏĪÅĊÞù·þ×
ĬÈíñØĬĎĉçïĄģĪčĝĩĠĂ
ĥÕĥÕõÕąõµµÕąąĕåõĕÕ

9618/32/M/J/25

[Turn over

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.

DO NOT WRITE IN THIS MARGIN

4
,

DO NOT WRITE IN THIS MARGIN

* 0000800000004 *

[4]
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

DO NOT WRITE IN THIS MARGIN

DO NOT WRITE IN THIS MARGIN

Drawback 2

[4]
© UCLES 2025

ĬÍĊ®Ġ´íÈõÏĪÅĊàû·Ā×
ĬÈíôØĢĠĀÔñċĬ̱¿ùĘĂ
ĥĥµÕµÕąÕÕĕåąÅĕąõąÕ

9618/32/M/J/25

DO NOT WRITE IN THIS MARGIN

Drawback 1

DO NOT WRITE IN THIS MARGIN

* 0000800000005 *

5
,

5

,

The management and scheduling of processes are tasks carried out by an operating system.
(a) Identify three process states.
1
2

DO NOT WRITE IN THIS MARGIN

3
[3]
(b) Describe the function of the shortest job first scheduling routine and give a benefit of this
routine.
Function

DO NOT WRITE IN THIS MARGIN

Benefit

[4]
6

(a) Describe the structure of a graph as used in an Artificial Intelligence (AI) system.

DO NOT WRITE IN THIS MARGIN

[2]
(b) Explain how supervised learning and unsupervised learning differ from each other.

DO NOT WRITE IN THIS MARGIN

[4]
ĬÏĊ®Ġ´íÈõÏĪÅĊàù·Ā×
ĬÈîóÐĨĤðåćöÝĐÉěùĨĂ
© UCLES 2025
9618/32/M/J/25
[Turn over
ĥĥÅĕõµĥµÅĥõąÅõĥµĕÕ

DO NOT WRITE IN THIS MARGIN

* 0000800000006 *

6
,

7

,

The diagram shows a logic circuit.
A

Q

S

P

C

DO NOT WRITE IN THIS MARGIN

B

Z

R
D

DO NOT WRITE IN THIS MARGIN

(a) Complete the truth table for the given logic circuit.
Show your working.
Working space
C

D

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

ĬÑĊ®Ġ´íÈõÏĪÅĊÝù¶þ×
ĬÈíóÓĞČöÝĄćØð±úÑĘĂ
ĥµĥĕõĕĥĕąąÕąąõÅõÅÕ

P

Q

R

S

Z

DO NOT WRITE IN THIS MARGIN

B

[3]
9618/32/M/J/25

DO NOT WRITE IN THIS MARGIN

© UCLES 2025

A

DO NOT WRITE IN THIS MARGIN

* 0000800000007 *

7
,

,

(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.

DO NOT WRITE IN THIS MARGIN

(A + B) . (A . B + B . C)
Working

DO NOT WRITE IN THIS MARGIN

Simplified expression

[4]
8

Explain what is meant by lexical analysis during program compilation.

DO NOT WRITE IN THIS MARGIN

DO NOT WRITE IN THIS MARGIN

[4]

© UCLES 2025

ĬÓĊ®Ġ´íÈõÏĪÅĊÝû¶þ×
ĬÈîôÛĬĈĆÜöúđìÉÞÑĨĂ
ĥµĕÕµõąõĕõąąąĕåµÕÕ

9618/32/M/J/25

[Turn over

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

© UCLES 2025

letter

digit

ĬÑĊ®Ġ´íÈõÏĪÅĊßù¶Ā×
ĬÈîñÛĢöăßüñĚĊĥĀÁĐĂ
ĥąÅÕõõąÕõÕõąÅĕąµÅÕ

^

9618/32/M/J/25

DO NOT WRITE IN THIS MARGIN

Several syntax diagrams are shown.

DO NOT WRITE IN THIS MARGIN

,

DO NOT WRITE IN THIS MARGIN

9



DO NOT WRITE IN THIS MARGIN

8
,

DO NOT WRITE IN THIS MARGIN

* 0000800000008 *

DO NOT WRITE IN THIS MARGIN

* 0000800000009 *

9
,



,

(a) State why 9K is not a valid variable for the given syntax diagrams.

[1]
(b) Complete the Backus-Naur Form (BNF) for <operator>.

DO NOT WRITE IN THIS MARGIN

<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.

DO NOT WRITE IN THIS MARGIN

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.

DO NOT WRITE IN THIS MARGIN

State one example of a valid variable.

[1]
10 Identify the two main protocols that form Transport Layer Security (TLS) and state the purpose of
each.
Protocol 1

DO NOT WRITE IN THIS MARGIN

Purpose

Protocol 2
Purpose

[4]
© UCLES 2025

ĬÓĊ®Ġ´íÈõÏĪÅĊßû¶Ā×
ĬÈíòÓĨúóÚþĀÏÎčÜÁĠĂ
ĥąµĕµĕĥµĥååąÅõĥõÕÕ

9618/32/M/J/25

[Turn over

10
,

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

DO NOT WRITE IN THIS MARGIN

* 0000800000010 *

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

DO NOT WRITE IN THIS MARGIN

Root pointer

Pp

Gg

Rr

Kk
DO NOT WRITE IN THIS MARGIN

0

DO NOT WRITE IN THIS MARGIN

The linked list will be organised as a binary tree.

© UCLES 2025

ĬÑĊ®Ġ´íÈõÏĪÅĊÞù¸þ×
ĬÈïñÒĤîĕáóú´ĦħĬùĨĂ
ĥÕåĕõõåÕÕĥõÅŵąµõÕ

9618/32/M/J/25

DO NOT WRITE IN THIS MARGIN

[4]

11
,

,

(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]

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

* 0000800000011 *

© UCLES 2025

ĬÓĊ®Ġ´íÈõÏĪÅĊÞû¸þ×
ĬÈðòÚĦòĥØąćõ²ď°ùĘĂ
ĥÕÕÕµĕŵÅĕåÅÅÕĥõĥÕ

9618/32/M/J/25

[Turn over

12
,

,

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.
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
DO NOT WRITE IN THIS MARGIN

Attribute

Treatment is prioritised with a numeric scale of 1 to 5.
Complete the class diagram for Patient, to include:

•
•
•
•

DO NOT WRITE IN THIS MARGIN

* 0000800000012 *

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.

PatientID

: STRING

Name

: STRING

DO NOT WRITE IN THIS MARGIN

Patient

:
:
DoctorID

: STRING

DO NOT WRITE IN THIS MARGIN

SetName(FullName : STRING)
SetDateOfBirth(DOB : DATE)

GetDoctorID()
[5]

© UCLES 2025

ĬÑĊ®Ġ´íÈõÏĪÅĊàù¸Ā×
ĬÈðóÚĠĄĤãċĀîĔ³ĎĩĠĂ
ĥĥąÕõĕÅĕåµÕÅąÕÅõõÕ

9618/32/M/J/25

DO NOT WRITE IN THIS MARGIN

GetName()

DO NOT WRITE IN THIS MARGIN

* 0000800000013 *

13
,

(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.

DO NOT WRITE IN THIS MARGIN

DO NOT WRITE IN THIS MARGIN

[2]
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

DO NOT WRITE IN THIS MARGIN

OPENFILE "StoredResults.dat" FOR RANDOM

SEEK "CurrentResults.dat", Position
GETRECORD "CurrentResults.dat", Grade
IF Grade.ExamGrade = "" THEN

DO NOT WRITE IN THIS MARGIN

ENDIF

NEXT Position
CLOSEFILE "CurrentResults.dat"
CLOSEFILE "StoredResults.dat"
© UCLES 2025

ĬÓĊ®Ġ´íÈõÏĪÅĊàû¸Ā×
ĬÈïôÒĪĀĔÖíñ»ÈËÊĩĐĂ
ĥĥõĕµõåõµÅąÅąµåµĥÕ

9618/32/M/J/25

[5]

DO NOT WRITE IN THIS MARGIN

DO NOT WRITE IN THIS MARGIN

DO NOT WRITE IN THIS MARGIN

,

© UCLES 2025

14

BLANK PAGE

ĬÍĊ®Ġ´íÈõÏĪÅĊßüµĂ×
ĬÈðòÓĨóĬèûöĘĬǾÙĘĂ
ĥÅõÕõĕĥÕÕÕąąÅõąõµÕ

9618/32/M/J/25

DO NOT WRITE IN THIS MARGIN

,

DO NOT WRITE IN THIS MARGIN

* 0000800000014 *

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 2025
,

15

BLANK PAGE

ĬÏĊ®Ġ´íÈõÏĪÅĊßúµĂ×
ĬÈïñÛĢïĜÑýċѰĪĚÙĨĂ
ĥÅąĕµõąµÅåÕąÅĕĥµåÕ

9618/32/M/J/25

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 2025

ĬÍĊ®Ġ´íÈõÏĪÅĊÝüµĄ×
ĬÈïôÛĬýčæăĄÚĎÆ¼ÉĐĂ
ĥõÕĕõõąĕåąåąąĕŵµÕ

9618/32/M/J/25

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

* 0000800000016 *

Advertisement