Past paper – A Level Computer Science (9618)
Cambridge International AS & A Level · 9618
Computer Science · Paper 31
Oct/Nov 2025 · 9618/31/O/N/25
Answer on paper, open each mark scheme and give yourself marks, then open the Summary.
Question text
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]
(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.
(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.
…
…
…
… [2]
(ii)
Write the new pseudocode statement required to update the declaration of Choice in
the definition of ClubMember.
…
… [1]
ĬÕú¾Ġ´íÈõÏĪÅĊàù¸þ×
Question text
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
Mantissa
Exponent
[2]
(b) Calculate the normalised binary floating‑point representation of – 76.1875 in this system.
Show your working.
Mantissa
Exponent
Working …
…
…
…
…
…
…
…
[4]
Ĭ×ú¾Ġ´íÈõÏĪÅĊàû¸þ×
Question text
3
(a) Explain why protocols are essential for communication between computer systems.
…
…
…
… [2]
(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 …
…
…
Protocol 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 …
…
…
…
[4]
ĬÕú¾Ġ´íÈõÏĪÅĊÞù¸Ā×
Question text
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.
1 …
…
…
…
2 …
…
…
…
[4]
Question text
5
(a) Identify two items commonly found within a digital certificate.
1 …
…
2 …
…
[2]
(b) Explain why a digital certificate is required to validate a digital signature.
…
…
…
…
…
… [3]
Ĭ×ú¾Ġ´íÈõÏĪÅĊÞû¸Ā×
Question text
6
(a) The diagram shows a logic circuit.
P
A
R
B
Z
S
Q
C
Complete the truth table for the given logic circuit.
Show your working.
Working space
A
B
C
P
Q
R
S
Z
0
0
0
0
0
1
0
1
0
0
1
1
1
0
0
1
0
1
1
1
0
1
1
1
[3]
ĬÙú¾Ġ´íÈõÏĪÅĊßûµþ×
,
,
(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
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]
Question text
7
(a) Identify one Artificial Intelligence (AI) algorithm to find the shortest distance between two
points on a graph.
…
… [1]
(b) Describe Deep Learning.
…
…
…
…
…
…
…
…
…
… [5]
ĬÛú¾Ġ´íÈõÏĪÅĊßùµþ×
Question text
8
(a) Outline the purpose of lexical analysis during the compilation of a program.
…
…
…
… [2]
(b) Write the Reverse Polish Notation (RPN) for the given infix expression:
(2 – 6) * (13 + 7) / 5
…
…
…
… [2]
(c) The RPN expression:
d a b + * c a ‑ /
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]
ĬÙú¾Ġ´íÈõÏĪÅĊÝûµĀ×
Question text
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:
Initialisation
Identifier
Data type
Description
value
Base
INTEGER
0
pointer for the bottom of the stack
Top
INTEGER
‑1
pointer for the top of the stack
StackArray
STRING
[0:99]
1D array to implement the stack
Max
INTEGER
100
maximum number of items in the stack
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
…
DataItem
…
Top
ELSE
"You cannot remove data; the stack is empty"
DataItem
ENDIF
…
ENDFUNCTION
[5]
(ii)
Write the pseudocode to output the data item removed from the stack with an appropriate
message.
…
… [1]
ĬÛú¾Ġ´íÈõÏĪÅĊÝùµĀ×
,
,
(b) A stack is used to implement recursion.
State the three essential features of recursion.
1 …
…
2 …
…
3 …
…
[3]
Question text
10 Explain what is meant by exception handling.
Include an example of a possible cause of an exception in your answer.
Explanation …
…
…
…
Example …
[3]
ĬÙú¾Ġ´íÈõÏĪÅĊàû·þ×
Question text
11
The table shows assembly language instructions for a processor that has one register, the
Accumulator (ACC).
Instruction
Label
Opcode
Operand
Explanation
LDM #n
Load the number n to ACC
Load the contents of the location at the given
LDD <address>
address to the ACC
The address to be used is at the given address.
LDI <address>
Load the contents of this second address to the
ACC
Add the contents of the given address to the
ADD <address>
ACC
Subtract the contents of the given address from
SUB <address>
the ACC
Store the contents of the ACC at the given
STO <address>
address
Gives a symbolic address <label> to the
<label>:
<data>
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.
…
…
…
…
…
…
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]
ĬÛú¾Ġ´íÈõÏĪÅĊàù·þ×
,
,
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
ĬÙú¾Ġ´íÈõÏĪÅĊÞû·Ā×