Computer Science (9618) · Oct/Nov 2025 · Question paper 31

Cambridge Computer Science (9618) question paper for paper 31, Oct/Nov 2025 — 9618/31/O/N/25, file 9618_w25_qp_31.pdf.

Advertisement
Loading the paper…
Text of this paper

DFD

* 0000800000001 *

,

www.dynamicpapers.com

,

Cambridge International AS & A Level
¬Wz> 4mHuOªEŠ]{6€W
¬ 1{PŸŽŠe{†¢;2I‰Š‚
¥ ¥•uU¥5 E¥EE•E5UU

* 4 6 4 7 0 1 0 2 3 0 *

COMPUTER SCIENCE

9618/31

Paper 3 Advanced Theory

October/November 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 12 pages. Any blank pages are indicated.
DC (PB/JG) 346644/2
© UCLES 2025

[Turn over

1

,

The composite record data type, ClubMember, is defined in pseudocode as:
TYPE ClubMember
DECLARE Code : INTEGER
DECLARE LastName : STRING
DECLARE FirstName : STRING
DECLARE Telephone : STRING
DECLARE JoinDate : DATE
DECLARE Fees : REAL
DECLARE FeesPaid : BOOLEAN
ENDTYPE
(a) (i)

Write the pseudocode statement to set up a variable for one record of the composite
data type, ClubMember.

[1]

(ii)

Write the pseudocode statements to assign the following values to the variable set up in
part (a)(i):

•
•

984632 to Code
TRUE to FeesPaid

[2]

DO NOT WRITE IN THIS MARGIN

2

,

DO NOT WRITE IN THIS MARGIN

www.dynamicpapers.com

DO NOT WRITE IN THIS MARGIN

DFD

* 0000800000002 *

(i)

Write the pseudocode statement for the type declaration of Activity to hold the
names of the available activities:
Badminton, Football, Golf, Snooker, Swimming, Tennis.

DO NOT WRITE IN THIS MARGIN

(b) An enumerated data type, Activity, is required, so that a new field, Choice, can be added
to the composite data type, ClubMember, to allow members to choose an activity.

(ii)

Write the new pseudocode statement required to update the declaration of Choice in
the definition of ClubMember.

[1]

© UCLES 2025

ĬÕú¾Ġ´íÈõÏĪÅĊàù¸þ×
Ĭą³üÍīĚĠÎĆôýăÌù±ĂĂ
ĥÕõĕµµåÕµąµąÅÕåõõÕ

9618/31/O/N/25

DO NOT WRITE IN THIS MARGIN

[2]

DFD

www.dynamicpapers.com
3

,

2

,

Numbers are stored in a computer system 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) Write the normalised floating‑point representation of the following positive binary number
using this system.

0.00000001110101101

DO NOT WRITE IN THIS MARGIN

DO NOT WRITE IN THIS MARGIN

* 0000800000003 *

DO NOT WRITE IN THIS MARGIN

DO NOT WRITE IN THIS MARGIN

Mantissa

Exponent

[2]
(b) Calculate the normalised binary floating‑point representation of – 76.1875 in this system.
Show your working.
Mantissa

Exponent

Working

DO NOT WRITE IN THIS MARGIN

[4]

© UCLES 2025

Ĭ×ú¾Ġ´íÈõÏĪÅĊàû¸þ×
Ĭą´ûÕĝĖĐëôýÌ״ݱòĂ
ĥÕąÕõÕŵåõĥąÅµÅµĥÕ

9618/31/O/N/25

[Turn over

www.dynamicpapers.com
4

,

3

,

(a) Explain why protocols are essential for communication between computer systems.

DO NOT WRITE IN THIS MARGIN

DFD

* 0000800000004 *

(b) POP3 is an email communication protocol.
Identify and describe two other communication protocols that are used when sending or
receiving emails.
Protocol 1
Description

DO NOT WRITE IN THIS MARGIN

[2]

Description

[4]
(c) Describe two ways in which packet switching ensures a complete message is received when
passing messages across a network.
1

2

DO NOT WRITE IN THIS MARGIN

Protocol 2

DO NOT WRITE IN THIS MARGIN

[4]

© UCLES 2025

ĬÕú¾Ġ´íÈõÏĪÅĊÞù¸Ā×
Ĭą´úÕħĨęÐîĆÃõĐÿáĊĂ
ĥĥÕÕµÕÅĕÅÕĕąąµĥµõÕ

9618/31/O/N/25

DO NOT WRITE IN THIS MARGIN

DFD

www.dynamicpapers.com
5

,

4

,

(a) A scheduling routine determines how processes are managed by the operating system.
Identify two scheduling routines.
1
2
[2]
(b) Describe two ways in which the complexities of the computer hardware are hidden from the
user.

DO NOT WRITE IN THIS MARGIN

DO NOT WRITE IN THIS MARGIN

* 0000800000005 *

1

DO NOT WRITE IN THIS MARGIN

2

[4]
5

(a) Identify two items commonly found within a digital certificate.
1

DO NOT WRITE IN THIS MARGIN

2

[2]
(b) Explain why a digital certificate is required to validate a digital signature.

DO NOT WRITE IN THIS MARGIN

[3]

© UCLES 2025

Ĭ×ú¾Ġ´íÈõÏĪÅĊÞû¸Ā×
Ĭą³ùÍġĬĩéČûĆáĨÛáúĂ
ĥĥåĕõµåõÕåÅąąÕąõĥÕ

9618/31/O/N/25

[Turn over

DO NOT WRITE IN THIS MARGIN

www.dynamicpapers.com
6

(a) The diagram shows a logic circuit.
P

A

R

B

DO NOT WRITE IN THIS MARGIN

6

,

Z

S

Q

C

DO NOT WRITE IN THIS MARGIN

Complete the truth table for the given logic circuit.
Show your working.
Working space
A

B

C

0

0

0

0

0

1

0

1

0

0

1

1

1

0

0

1

0

1

1

1

0

1

1

1

P

Q

R

S

Z

[3]

© UCLES 2025

ĬÙú¾Ġ´íÈõÏĪÅĊßûµþ×
Ĭą´ùÒīĄģáÿĊïÁĐºĉĊĂ
ĥµąĕõĕåÕĕÅĥąÅÕåµµÕ

9618/31/O/N/25

DO NOT WRITE IN THIS MARGIN

,

DO NOT WRITE IN THIS MARGIN

DFD

* 0000800000006 *

DFD

DO NOT WRITE IN THIS MARGIN

* 0000800000007 *

7

,

(b) (i)

,

Complete the Karnaugh map (K‑map) for the Boolean expression:
A.B.C + A.B.C + A.B.C + A.B.C

BC
A

00

01

11

10

0

DO NOT WRITE IN THIS MARGIN
DO NOT WRITE IN THIS MARGIN

www.dynamicpapers.com

1
[2]
(ii)

Draw loop(s) around appropriate group(s) in the K‑map to produce an optimal
sum‑of‑products.
[2]

(iii)

Write the Boolean expression from your answer to part b(ii) as a simplified
sum‑of‑products. Do not carry out any further simplification.

[2]
7

(a) Identify one Artificial Intelligence (AI) algorithm to find the shortest distance between two
points on a graph.

DO NOT WRITE IN THIS MARGIN

[1]
(b) Describe Deep Learning.

DO NOT WRITE IN THIS MARGIN

[5]
© UCLES 2025

ĬÛú¾Ġ´íÈõÏĪÅĊßùµþ×
Ĭą³úÚĝĀēØù÷ºĕĨĞĉúĂ
ĥµõÕµõŵ൵ąÅµÅõåÕ

9618/31/O/N/25

[Turn over

www.dynamicpapers.com
8

,

8



,

(a) Outline the purpose of lexical analysis during the compilation of a program.

DO NOT WRITE IN THIS MARGIN

DFD

* 0000800000008 *

(b) Write the Reverse Polish Notation (RPN) for the given infix expression:
(2 – 6) * (13 + 7) / 5

DO NOT WRITE IN THIS MARGIN

[2]

[2]

is to be evaluated, where:
a = 6, b = 12, c = 15 and d = 5.
Show the changing contents of the stack as the RPN expression is evaluated.

[4]

© UCLES 2025

ĬÙú¾Ġ´íÈõÏĪÅĊÝûµĀ×
Ĭą³ûÚħîĖã÷ð±·ÌÀęĂĂ
ĥąåÕõõÅĕĥĕÅąąµĥõµÕ

9618/31/O/N/25

DO NOT WRITE IN THIS MARGIN

d a b + * c a ‑ /

DO NOT WRITE IN THIS MARGIN

DO NOT WRITE IN THIS MARGIN

(c) The RPN expression:

DFD

www.dynamicpapers.com
9

,

9



,

(a) A stack has been implemented using pseudocode to store a maximum of 100 string items
using the global variables in the following table:
Identifier

Data type

Description

Initialisation
value

Base

INTEGER

pointer for the bottom of the stack

0

Top

INTEGER

pointer for the top of the stack

‑1

StackArray

STRING

1D array to implement the stack

[0:99]

Max

INTEGER

maximum number of items in the stack

100

The value of Top is incremented each time a data item is added to the stack and decremented
every time a data item is removed.
(i)

Complete the pseudocode for the function to remove a data item from the stack.
FUNCTION Pop()
DECLARE DataItem : STRING
""
DataItem
IF THEN

DO NOT WRITE IN THIS MARGIN

DO NOT WRITE IN THIS MARGIN

DO NOT WRITE IN THIS MARGIN

* 0000800000009 *

DataItem

Top
ELSE
"You cannot remove data; the stack is empty"
DataItem
ENDIF

ENDFUNCTION

DO NOT WRITE IN THIS MARGIN

DO NOT WRITE IN THIS MARGIN

[5]
(ii)

Write the pseudocode to output the data item removed from the stack with an appropriate
message.

[1]

© UCLES 2025

ĬÛú¾Ġ´íÈõÏĪÅĊÝùµĀ×
Ĭą´üÒġòĦÖāāøģ´ĜęòĂ
ĥąÕĕµĕåõõĥĕąąÕąµåÕ

9618/31/O/N/25

[Turn over

www.dynamicpapers.com
10

,

,

(b) A stack is used to implement recursion.
State the three essential features of recursion.
1

DO NOT WRITE IN THIS MARGIN

DFD

* 0000800000010 *

3

[3]
10 Explain what is meant by exception handling.
Include an example of a possible cause of an exception in your answer.

DO NOT WRITE IN THIS MARGIN

2

© UCLES 2025

ĬÙú¾Ġ´íÈõÏĪÅĊàû·þ×
Ĭą²ûÓĥöĄÝð÷ěÛÊìáúĂ
ĥÕÅĕõõĥĕÅåÅÅąĕĥõąÕ

9618/31/O/N/25

DO NOT WRITE IN THIS MARGIN

DO NOT WRITE IN THIS MARGIN

Example
[3]

DO NOT WRITE IN THIS MARGIN

Explanation

DFD

DO NOT WRITE IN THIS MARGIN

* 0000800000011 *

11

,

11

,

The table shows assembly language instructions for a processor that has one register, the
Accumulator (ACC).
Instruction
Label

Opcode

Operand

LDM #n

DO NOT WRITE IN THIS MARGIN

LDD <address>
LDI <address>
ADD <address>
SUB <address>
STO <address>
<label>:
DO NOT WRITE IN THIS MARGIN

www.dynamicpapers.com

<data>

Explanation
Load the number n to ACC
Load the contents of the location at the given
address to the ACC
The address to be used is at the given address.
Load the contents of this second address to the
ACC
Add the contents of the given address to the
ACC
Subtract the contents of the given address from
the ACC
Store the contents of the ACC at the given
address
Gives a symbolic address <label> to the
memory location with contents <data>

# denotes a denary number, e.g. #123
<label> can be used in place of <address>
(a) Write assembly language code, using only the given instruction set to:

•
•
•

store the denary value 100 as a named constant
subtract the constant from the value contained in address 632
store the result in variable Answer.

Show the initialisation of the constant and Answer in the table provided.

DO NOT WRITE IN THIS MARGIN

DO NOT WRITE IN THIS MARGIN

Label

Contents

[6]
(b) The address 632 contains the value 45.
State the value of Answer after the code described in part (a) has executed.
[1]
© UCLES 2025

ĬÛú¾Ġ´íÈõÏĪÅĊàù·þ×
Ĭą±üÛģúôÜĊĊÎÿ²ðáĊĂ
ĥÕµÕµĕąõÕÕĕÅąõąµĕÕ

9618/31/O/N/25

www.dynamicpapers.com
12

,

,

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/31/O/N/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

DFD

* 0000800000012 *

Advertisement