Computer Science (9618) · May/June 2026 · Question paper · Paper 31

Cambridge International AS & A Level Computer Science question paper for Paper 31, May/June 2026 — 9618/31/M/J/26, file 9618 Computer Science June 2026 Question Paper 31.pdf.

Advertisement
Loading the paper…
Text of this paper

DFD

* 0000800000001 *

,

,

Cambridge International AS & A Level
¬PŠ. 4mHuOªEŠ]y6€W
¬ETyR¬€kw‡}‰3iY/‚
¥¥e•5u¥• 55E u uUU

* 4 9 4 0 8 1 6 3 5 9 *

COMPUTER SCIENCE

9618/31

Paper 3 Advanced Theory

May/June 2026
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. Do not use correction fluid or tape.
●
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/TC) 363144/5
© Cambridge University Press & Assessment 2026

[Turn over

1

,

(a) A record data type is a type of composite user‑defined data type.
Identify two other types of composite user‑defined data types.
1
2
[2]
(b) (i)

A pointer data type is a non‑composite user‑defined data type.
State the purpose of a pointer user‑defined data type.

[1]

(ii)

Write the pseudocode statement to declare a pointer data type called Word to be used
with STRING data.

DO NOT WRITE IN THIS MARGIN

2
,

DO NOT WRITE IN THIS MARGIN

DFD

* 0000800000002 *

© Cambridge University Press & Assessment 2026
ĬÎĊ®Ġ´íÈõÏĪÅĊàû¸þ×
ĬÅÒúÓĠČúÔĊṉ̃Éęġ·Ă
ĥµµĕõĕåõµõĥąąµĥµõÕ

9618/31/M/J/26

DO NOT WRITE IN THIS MARGIN

DO NOT WRITE IN THIS MARGIN

[2]

DO NOT WRITE IN THIS MARGIN

DFD

DO NOT WRITE IN THIS MARGIN

* 0000800000003 *

3
,

2

,

(a) Random file organisation can be used with a database management system.
State one other example of where random file organisation could be used.

[1]

DO NOT WRITE IN THIS MARGIN

(b) Describe how records are organised in random files.

[2]

[3]

DO NOT WRITE IN THIS MARGIN

DO NOT WRITE IN THIS MARGIN

DO NOT WRITE IN THIS MARGIN

(c) Outline the process that would be used to find a record in a random file.

© Cambridge University Press & Assessment 2026
ĬÐĊ®Ġ´íÈõÏĪÅĊàù¸þ×
ĬÅÑùÛĪĈĊåðĀçĥ±½ġÇĂ
ĥµÅÕµõÅĕåąµąąÕąõĥÕ

9618/31/M/J/26

[Turn over

4
,

3

,

Numbers are stored in a computer system 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 –10.8125 in this system.

DO NOT WRITE IN THIS MARGIN

DFD

* 0000800000004 *

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

0

0

exponent
0

1

1

1

0

0

0

1

1

1

working

DO NOT WRITE IN THIS MARGIN

mantissa

DO NOT WRITE IN THIS MARGIN

denary value
[3]

© Cambridge University Press & Assessment 2026
ĬÎĊ®Ġ´íÈõÏĪÅĊÞû¸Ā×
ĬÅÑüÛĤöÿÒòćàÇčğñ¯Ă
ĥąĕÕõõŵÅåÅąÅÕåõõÕ

9618/31/M/J/26

DO NOT WRITE IN THIS MARGIN

DFD

DO NOT WRITE IN THIS MARGIN

* 0000800000005 *

5
,

4

,

Draw one line to connect each TCP/IP layer to its most appropriate description.
TCP/IP layer

description
ensures packets arrive in sequence
without errors

Application
DO NOT WRITE IN THIS MARGIN

provides remote access to files on a
host server to access and manage files
stored in a remote location
Transport
interconnects nodes or hosts in a
network, encapsulates IP packets into
frames and ensures correct protocols
are followed

Internet

DO NOT WRITE IN THIS MARGIN

identifies the intended network and host
Link
contains all the programs that exchange
data and includes protocols: HTTP, FTP
and POP3
[4]

DO NOT WRITE IN THIS MARGIN

5

A virtual machine may be used to emulate computer hardware using software.
Outline two benefits and two limitations of using a virtual machine.
benefit 1

benefit 2

limitation 1

DO NOT WRITE IN THIS MARGIN

limitation 2

[4]

© Cambridge University Press & Assessment 2026
ĬÐĊ®Ġ´íÈõÏĪÅĊÞù¸Ā×
ĬÅÒûÓĦúïçĈúĩēĥ»ñ¿Ă
ĥąĥĕµĕåÕÕÕĕąÅµÅµĥÕ

9618/31/M/J/26

[Turn over

DO NOT WRITE IN THIS MARGIN

DFD

6
(a) The diagram shows a logic circuit.
P

A

R

Q

B

Z

DO NOT WRITE IN THIS MARGIN

6

,

S
C
Complete the truth table for the given logic circuit.
Show your working.

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

DO NOT WRITE IN THIS MARGIN

working space
Z

[3]

© Cambridge University Press & Assessment 2026
ĬÒĊ®Ġ´íÈõÏĪÅĊßùµþ×
ĬÅÑûÐĠĒõßăċĔóčÚÙ¯Ă
ĥÕÅĕµµåõĕµµąąµĥõµÕ

9618/31/M/J/26

DO NOT WRITE IN THIS MARGIN

,

DO NOT WRITE IN THIS MARGIN

* 0000800000006 *

DFD

DO NOT WRITE IN THIS MARGIN

* 0000800000007 *

7
,

,

(b) Describe one benefit of using a Karnaugh map (K‑map) for solving logic problems.

[1]
(c) The Karnaugh map (K‑map) represents a logic circuit with four inputs.

CD

00

01

11

10

00

0

0

1

0

01

0

1

1

0

11

1

1

1

1

10

0

0

1

0

(i)

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

(ii)

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

[3]

[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

AB

© Cambridge University Press & Assessment 2026
ĬÔĊ®Ġ´íÈõÏĪÅĊßûµþ×
ĬÅÒüØĪĎąÚõöÕçĥþÙ¿Ă
ĥÕµÕõÕÅĕąÅĥąąÕąµåÕ

9618/31/M/J/26

[Turn over

8
,

7



,

(a) Write this infix expression in Reverse Polish Notation (RPN).
21 * (15 – 3 + 8) / 7

DO NOT WRITE IN THIS MARGIN

DFD

* 0000800000008 *

[2]
(b) Write this RPN expression in infix form.
c d + a b – a c - * /

DO NOT WRITE IN THIS MARGIN

15

9 – 24

3 / * 18

6 + /

is to be evaluated.
Show the changing contents of the stack as the RPN expression is evaluated.

[4]

© Cambridge University Press & Assessment 2026
ĬÒĊ®Ġ´íÈõÏĪÅĊÝùµĀ×
ĬÅÒùØĤĠĄÝûíÎąÉàÉ·Ă
ĥĥĥÕµÕŵĥĥĕąÅÕåµµÕ

9618/31/M/J/26

DO NOT WRITE IN THIS MARGIN

(c) The RPN expression

DO NOT WRITE IN THIS MARGIN

[3]

DO NOT WRITE IN THIS MARGIN

DFD

DO NOT WRITE IN THIS MARGIN

* 0000800000009 *

9
,

8

,

(a) Define the following asymmetric key encryption terms:
(i)

cipher text

[1]

(ii)
DO NOT WRITE IN THIS MARGIN



public key.

[1]

(b) Outline the process that would allow an individual to use asymmetric key encryption to send
a private message to an organisation.

DO NOT WRITE IN THIS MARGIN

DO NOT WRITE IN THIS MARGIN

DO NOT WRITE IN THIS MARGIN

[4]

© Cambridge University Press & Assessment 2026
ĬÔĊ®Ġ´íÈõÏĪÅĊÝûµĀ×
ĬÅÑúÐĦĤôÜýĄěѱüÉÇĂ
ĥĥĕĕõµåÕõĕÅąÅµÅõåÕ

9618/31/M/J/26

[Turn over

10
,

9

,

(a) Explain how supervised learning and unsupervised learning are trained.

DO NOT WRITE IN THIS MARGIN

DFD

* 0000800000010 *

© Cambridge University Press & Assessment 2026
ĬÒĊ®Ġ´íÈõÏĪÅĊàù·þ×
ĬÅÓùÍĢĨĖãôöøĩËÌñ¿Ă
ĥµąĕµÕĥµÅÕĕÅÅõåµąÕ

9618/31/M/J/26

DO NOT WRITE IN THIS MARGIN

DO NOT WRITE IN THIS MARGIN

DO NOT WRITE IN THIS MARGIN

[4]

DO NOT WRITE IN THIS MARGIN

DFD

11
,

DO NOT WRITE IN THIS MARGIN

,

(b) Calculate the best path between the Begin node and each of the nodes in the diagram using
Dijkstra’s algorithm.
Show your working and write your answers in the table provided.
S

5
Q

DO NOT WRITE IN THIS MARGIN

DO NOT WRITE IN THIS MARGIN

* 0000800000011 *

8
R

5
2

3
P

6
6

9

21

Begin

T

4
U

working

DO NOT WRITE IN THIS MARGIN

DO NOT WRITE IN THIS MARGIN

answers:
P

Q

R

S

T

U

[5]
© Cambridge University Press & Assessment 2026
ĬÔĊ®Ġ´íÈõÏĪÅĊàû·þ×
ĬÅÔúÕĨĬĦÖĆċ±­³Đñ¯Ă
ĥµõÕõµąÕÕåÅÅÅĕÅõĕÕ

9618/31/M/J/26

[Turn over

12
,

,

10 (a) An insertion sort algorithm is used to sort the unique ID numbers of club members into
ascending order. These unique ID numbers are kept in a 1D array MemberID. The
corresponding names of the members are stored in a 1D array Names.
The arrays are declared as:
DECLARE MemberID : ARRAY[0:499] OF INTEGER
DECLARE Names : ARRAY[0:499] OF STRING

DO NOT WRITE IN THIS MARGIN

DFD

* 0000800000012 *

data type

description

Count

integer

main loop counter to iterate through the whole array

Temp1

integer

temporary holding location for current member ID

Temp2

string

temporary holding location for current member name

Insert

integer

counter to show current insertion position

Write the pseudocode for an insertion sort to arrange the unique ID numbers into ascending
order. Make sure that the data in both arrays is swapped as required so that data with the
same index continues to apply to the same person.
Use the given identifiers. Assume all variables have been declared.

DO NOT WRITE IN THIS MARGIN

identifier

DO NOT WRITE IN THIS MARGIN

The following table defines the variables to be used in this algorithm.

DO NOT WRITE IN THIS MARGIN

[5]

© Cambridge University Press & Assessment 2026
ĬÒĊ®Ġ´íÈõÏĪÅĊÞù·Ā×
ĬÅÔûÕĞĚģáČĄºďď®ġÇĂ
ĥąåÕµµąõµąµÅąĕĥõąÕ

9618/31/M/J/26

DO NOT WRITE IN THIS MARGIN

DFD

DO NOT WRITE IN THIS MARGIN

* 0000800000013 *

13
,

,

(b) Describe the factors, other than changing the algorithm, that affect the time efficiency of the
insertion sort algorithm.

[3]
(c) State the Big O notation for the worst‑case time complexity of the insertion sort.
[1]

DO NOT WRITE IN THIS MARGIN

DO NOT WRITE IN THIS MARGIN

DO NOT WRITE IN THIS MARGIN

DO NOT WRITE IN THIS MARGIN

© Cambridge University Press & Assessment 2026
ĬÔĊ®Ġ´íÈõÏĪÅĊÞû·Ā×
ĬÅÓüÍĬĖēØîíïËħĪġ·Ă
ĥąÕĕõÕĥĕåõĥÅąõąµĕÕ

9618/31/M/J/26

[Turn over

device(projector).
device(large_tv).
device(medium_tv).
device(bluray_player).
device(amplifier).
device(media_player).
device(main_speakers).
device(centre_speaker).
device(surround_speakers).
customer(petrov).
customer(margaret).
customer(steffan).
customer(susan).
customer(allan).
customer(sammy).
owns(projector, petrov).
owns(media_player, petrov).
owns(projector, susan).
owns(projector, sammy).
owns(media_player, allan).
owns(bluray_player, steffan).
wants(main_speakers, margaret).
wants(surround_speakers, susan).
wants(medium_tv, steffan).

These facts (clauses) have the meanings:
fact

meaning

01

A projector is a device.

10

Petrov is a customer.

16

Petrov owns a projector.

22

Margaret wants main speakers.

(a) Betty is a customer who owns a large TV and wants a Blu‑ray player.
Write additional facts to represent this information.
25
26
27
[3]

© Cambridge University Press & Assessment 2026
ĬÎĊ®Ġ´íÈõÏĪÅĊÝü¶Ă×
ĬÅÔúÐĦĩīæüúÔħ®ĞѯĂ
ĥåÕÕµµåµÅĥĥąÅµåõÅÕ

9618/31/M/J/26

DO NOT WRITE IN THIS MARGIN

01
02
03
04
05
06
07
08
09
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24

DO NOT WRITE IN THIS MARGIN

A declarative programming language is used to show which home cinema devices customers
already have and which devices they want.

DO NOT WRITE IN THIS MARGIN

11

,

DO NOT WRITE IN THIS MARGIN

14
,

DO NOT WRITE IN THIS MARGIN

DFD

* 0000800000014 *

DFD

DO NOT WRITE IN THIS MARGIN

* 0000800000015 *

15
,

,

(b) Using the variable Owner, the goal:
owns(media_player, Owner)
returns
Owner = petrov, allan

DO NOT WRITE IN THIS MARGIN

Write the result of using the goal:
owns(projector, Owner)
Owner = [1]
(c) D may be available for A to buy if D is a device and A is a customer and A does not own
that device.
Write this as a rule:

IF

[4]

DO NOT WRITE IN THIS MARGIN

DO NOT WRITE IN THIS MARGIN

DO NOT WRITE IN THIS MARGIN

may_buy_device(D, A)

© Cambridge University Press & Assessment 2026
ĬÐĊ®Ġ´íÈõÏĪÅĊÝú¶Ă×
ĬÅÓùØĤĥěÓþćĕ³ÆºÑ¿Ă
ĥååĕõÕÅÕÕĕµąÅÕŵÕÕ

9618/31/M/J/26

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 (Cambridge University Press & Assessment) 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 our 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 International Education is the name of our awarding body and a part of Cambridge University Press & Assessment, which is a department of the
University of Cambridge.

© Cambridge University Press & Assessment 2026
ĬÎĊ®Ġ´íÈõÏĪÅĊßü¶Ą×
ĬÅÓüØĪėĎèĄĀĎđĪĜÁ·Ă
ĥĕõĕµÕÅõµµÅąąÕĥµÅÕ

9618/31/M/J/26

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

* 0000800000016 *

Advertisement