9618/32

Computer Science 9618/32October/November 2025

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

12
questions
75
marks
90
minutes

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

Q1Medium-EasyData Representation

The composite data type, Car, is defined in pseudocode as:

TYPE Car
  DECLARE RegNumber : STRING
  DECLARE Make : STRING
  DECLARE Model : STRING
  DECLARE BodyStyle : STRING
  DECLARE Colour : STRING
  DECLARE IntoStock : DATE
  DECLARE Price : REAL
ENDTYPE
(a)
3M
(i)

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

1M
(ii)

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

  • "Blue" to Colour
  • 21/10/2025 to IntoStock
2M
(b)

The data type for BodyStyle is changed to an enumerated type, Body.

3M
(i)

Write the pseudocode statement for the type declaration of Body to hold the names of the available choices:

Convertible, Hatchback, Saloon, SUV

2M
(ii)

Write the new pseudocode statement required to update the declaration of BodyStyle in the definition of Car.

1M
Q2Medium-EasyData Representation

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 denary value of the given normalised binary floating-point number.
Show your working.

3M
(b)

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

3M
Q3Medium-EasyCommunication and Internet Technologies
(a)

HTTP and IMAP are examples of protocols used in the Application Layer of the TCP/IP protocol suite.

State the purpose of the HTTP and IMAP protocols.

HTTP ........................................................................................................................................

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

IMAP .........................................................................................................................................

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

2M
(b)

Describe how files are shared using the BitTorrent protocol.

4M
Q4Medium-EasyCommunication and Internet Technologies
(a)

Identify one benefit of circuit switching and one benefit of packet switching.

Circuit switching ........................................................................................................................

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

Packet switching .......................................................................................................................

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

2M
(b)

Identify two differences between circuit switching and packet switching.

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

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

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

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

2M
Q5Medium-EasySystem SoftwareHardware and Virtual Machines
(a)

Describe how interrupt handling is used in low-level scheduling.

2M
(b)

In process management, a process can be in one of three process states: running, ready or blocked.

Complete the table to identify one reason why a process could be in each of the three states.

Process stateReason
running
ready
blocked
3M
Q6MediumHardware and Virtual Machines
(a)

The diagram shows a logic circuit.

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

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 \overline{B} \cdot C + \overline{A} \cdot B \cdot 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-EasySecurity
(a)

Asymmetric encryption is a type of cryptography.

Identify one other type of cryptography.

1M
(b)

An organisation holds two asymmetric encryption keys, which they intend to use to receive secure transmissions.

Explain how the organisation makes use of the two keys to receive a secure transmission.

4M
Q8MediumSystem Software
(a)

State the purpose of the optimisation stage in the compilation of a program.

1M
(b)

Convert this Reverse Polish Notation (RPN) back to its original infix form:

a b - c + c a - * d /

3M
(c)

The RPN expression:

c a / b d – * b +

is to be evaluated, where:

a = 3, b = 16, c = 9 and d = 6.

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

4M
Q9Medium-EasyArtificial Intelligence (AI)

Deep Learning is a form of Machine Learning.

(a)
2M
(i)

State one example where Deep Learning is used.

1M
(ii)

Identify how Deep Learning can be made more effective.

1M
(b)

Describe the back propagation of errors method in Machine Learning.

4M
Q10Medium-EasyFurther Programming

An exception is an error that may cause a program to halt unexpectedly.

(a)

Describe how program termination due to an exception can be avoided.

2M
(b)

Identify two possible causes of exceptions.

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

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

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

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

2M
Q117MMediumFurther Programming

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

LabelOpcodeOperandExplanation
LDM#nLoad the number n to the ACC
LDD<address>Load the contents of the location at the given address to 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 the contents <data>

denotes a denary number, e.g. #123

<label> can be used in place of <address>

The current contents of memory are:

AddressContents
15026
30086
420150

Write assembly language code, using only the given instruction set to:

  • store the contents of location 300 as labelled variable A
  • store the contents of location 420 as labelled variable B
  • add the value stored in the address contained in variable B to the value contained in variable A
  • store the result in variable Answer.

Show the initialisation and values of the variables A, B and Answer in the table provided.

LabelContent
Similar questions
Q12Medium-EasyComputational 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 each time a data item is removed. If the stack is full, an appropriate error message is output.

6M
(i)

Complete the pseudocode for the procedure to add a data item onto the stack.

PROCEDURE Push(.........................................................................................)
  IF Top < Max – 1 THEN
    Top ← ...............................................................................................
    ...................................................................................... ← NewData
  ELSE
    OUTPUT ...............................................................................................
  ENDIF
ENDPROCEDURE
4M
(ii)

Write pseudocode to input a new data item and add it to the stack using Push().

2M
(b)

Explain the reasons why a stack is used when a recursive algorithm is executed.

3M