9618/31

Computer Science 9618/31October/November 2025

Cambridge A-Level · Advanced Theory · worked solutions for every part, with the mark scheme

11
questions
75
marks
90
minutes

Topics Data Representation · System Software · Further Programming · Communication and Internet Technologies · Security · Hardware and Virtual Machines · +2 more

Q1Medium-EasyData Representation

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)
3M
(i)

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

...........................................................................................................................................

.....................................................................................................................................

1M
(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

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

.....................................................................................................................................

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

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

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

.....................................................................................................................................

2M
(ii)

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

...........................................................................................................................................

.....................................................................................................................................

1M
Q2MediumData Representation

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

2M
(b)

Calculate the normalised binary floating-point representation of –76.1875 in this system. Show your working.

Working .....................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

4M
Q3MediumCommunication and Internet Technologies
(a)

Explain why protocols are essential for communication between computer systems.

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

.............................................................................................................................................

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

...................................................................................................................................................

...................................................................................................................................................

4M
(c)

Describe two ways in which packet switching ensures a complete message is received when passing messages across a network.

1 ................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

2 ................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

4M
Q4Medium-EasySystem Software
(a)

A scheduling routine determines how processes are managed by the operating system.

Identify two scheduling routines.

1 ................................................................................................................................................

2 ................................................................................................................................................

2M
(b)

Describe two ways in which the complexities of the computer hardware are hidden from the user.

1 ................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

2 ................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

4M
Q5Medium-EasySecurity
(a)

Identify two items commonly found within a digital certificate.

1 ................................................................................................................................................

...................................................................................................................................................

2 ................................................................................................................................................

...................................................................................................................................................

2M
(b)

Explain why a digital certificate is required to validate a digital signature.

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

.............................................................................................................................................

3M
Q6MediumHardware and Virtual Machines
(a)

The diagram shows a logic circuit.

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

Working space
ABCPQRSZ
000
001
010
011
100
101
110
111
3M
(b)
6M
(i)

Complete the Karnaugh map (K-map) for the Boolean expression:

ABC+ABC+ABC+ABC\overline{A} \cdot B \cdot C + \overline{A} \cdot B \cdot \overline{C} + A \cdot \overline{B} \cdot C + A \cdot B \cdot \overline{C}

2M
(ii)

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

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

...................................................................................................................................................

.............................................................................................................................................

2M
Q7Medium-EasyArtificial Intelligence (AI)
(a)

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

...................................................................................................................................................

.............................................................................................................................................

1M
(b)

Describe Deep Learning.

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

.............................................................................................................................................

5M
Q8MediumSystem Software
(a)

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

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

.............................................................................................................................................

2M
(b)

Write the Reverse Polish Notation (RPN) for the given infix expression:

(2 – 6) * (13 + 7) / 5

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

.............................................................................................................................................

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

4M
Q9MediumComputational Thinking and Problem-solving
(a)

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

IdentifierData typeDescriptionInitialisation value
BaseINTEGERpointer for the bottom of the stack0
TopINTEGERpointer for the top of the stack-1
StackArraySTRING1D array to implement the stack[0:99]
MaxINTEGERmaximum number of items in the stack100

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.

6M
(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
    DataItem ← "You cannot remove data; the stack is empty"
  ENDIF
  ......................................................................................................................................
ENDFUNCTION
5M
(ii)

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

...........................................................................................................................................

.....................................................................................................................................

1M
(b)

A stack is used to implement recursion.

State the three essential features of recursion.

1 ................................................................................................................................................

...................................................................................................................................................

2 ................................................................................................................................................

...................................................................................................................................................

3 ................................................................................................................................................

...................................................................................................................................................

3M
Q103MMedium-EasyFurther Programming

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

Explanation .......................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

Example ...........................................................................................................................................

Similar questions
Q11Medium-EasyFurther Programming

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

Instruction
LabelOpcodeOperandExplanation
LDM#nLoad the number n to ACC
LDD<address>Load the contents of the location at the given address to the ACC
LDI<address>The address to be used is at the given address. Load the contents of this second address to the ACC
ADD<address>Add the contents of the given address to the ACC
SUB<address>Subtract the contents of the given address from the ACC
STO<address>Store the contents of the ACC at the given address
<label>:<data>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.

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

LabelContents
6M
(b)

The address 632 contains the value 45.

State the value of Answer after the code described in part (a) has executed.

.............................................................................................................................................

1M