A Level Computer Science 9618 Paper 32, May/June 2025

Question paper and mark scheme75 marks13 questions

Solve it on ExamPal

Practise

Untimed. Write on the paper and check as you go.

Start

Exam

Timed, with a clock you set, like sitting the real paper.

Start

Opens full screen.

Opening the question paper

Read as textThe questions and the mark scheme as plain text. Easier to read on a phone.

Question paper

9618/32 · May/June 2025

Download PDF
1

Data types can be defined using pseudocode. The composite record data type, Departure, is used to represent flights from Cambridge Airport and is defined in pseudocode as: TYPE Departure DECLARE FlightNumber : STRING DECLARE Destination : STRING DECLARE FlightDate : DATE DECLARE Gate : STRING DECLARE Airline : STRING ENDTYPE A variable, Flight1, is declared in pseudocode as: DECLARE Flight1 : Departure

a

Write pseudocode to store the following details to Flight1: Field Data FlightNumber SB2789 Destination Dublin FlightDate 30/07/2025 Gate N03 Airline Cambridge Airways

[3]
b(i)

The data type for Gate is changed to an enumerated data type, GateID. Write a pseudocode statement to declare GateID to hold the identity codes for the airport gates: N01, N02, N03, W01, W02, W03, W04

[2]
b(ii)

Write the new pseudocode statement required to replace the declaration of Gate in Departure.

[1]
2

Numbers are stored in a computer 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.

Figure 1 of 2 for question 2
Figure 2 of 2 for question 2
a

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

[3]
b

Calculate the denary value of the following normalised binary floating-point number. Show your working. Mantissa: 1 0 1 0 0 0 1 0 1 0 1 1 Exponent: 0 1 1 0

[3]
3
a

Identify two different layers of the TCP/IP protocol suite.

[1]
b

Describe how the TCP/IP protocol suite is applied when a message is sent through the internet from one host to another. Do not describe the function of individual layers of the TCP/IP protocol suite.

[4]
4

Circuit switching may be used as a method of data transmission. State two benefits and two drawbacks of circuit switching. Benefit 1 Benefit 2 Drawback 1 Drawback 2

[4]
5

The management and scheduling of processes are tasks carried out by an operating system.

a

Identify three process states. 1 2 3

[3]
b

Describe the function of the shortest job first scheduling routine and give a benefit of this routine. Function Benefit

[4]
6
a

Describe the structure of a graph as used in an Artificial Intelligence (AI) system.

[2]
b

Explain how supervised learning and unsupervised learning differ from each other.

[4]
7

The diagram shows a logic circuit.

Figure 1 of 1 for question 7
a

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

[3]
b

Write the Boolean logic expression that corresponds to the given logic circuit as the sum-of-products. Z =

[1]
c

Use Boolean algebra including De Morgan’s laws to simplify the following expression. Show all working. (A+B‾) . (A.B+B.C‾)

[4]
8

Explain what is meant by lexical analysis during program compilation.

[4]
Figure 1 of 1 for question 8
9

Several syntax diagrams are shown.

Figure 1 of 4 for question 9
Figure 2 of 4 for question 9
Figure 3 of 4 for question 9
Figure 4 of 4 for question 9
a

State why 9K is not a valid variable for the given syntax diagrams.

[1]
b

Complete the Backus-Naur Form (BNF) for <operator>. <operator> ::=

[1]
c

An expression is defined as follows: • A variable is assigned to a variable followed by an operator followed by another variable. • The operator and final variable stage can be repeated as many times as necessary. Complete the syntax diagram for an expression.

[3]
d

A character can be a letter or a digit. An additional constraint has been applied to the definition of variable. It must comply with the given syntax diagram, but it will only pass validation if it has at least four characters. State one example of a valid variable.

[1]
10

Identify the two main protocols that form Transport Layer Security (TLS) and state the purpose of each. Protocol 1 Purpose Protocol 2 Purpose

[4]
11
Figure 1 of 1 for question 11
a

A linked list of nodes is used to store an ordered list of strings. Each node consists of the data, a left pointer and a right pointer. The linked list will be organised as a binary tree. 0 is used to represent a null pointer. Complete the binary tree, including null pointers, to show how the data will be organised after the following strings have been added: Aa, Mm, Ss, Xx

[4]
b

A binary tree can be used to implement recursion. Identify one feature of an algorithm that makes it beneficial to use recursion. Give one example of an application that could use a recursive algorithm. Feature Example

[2]
12
a

A medical clinic uses objects of the class Patient to assign a priority and a doctor to a patient. Some of the attributes required in the class are listed in the table. Attribute Data type Description PatientID STRING Unique identifier of the patient Name STRING Patient’s full name, surname first DoctorID STRING ID of doctor administering treatment Treatment is prioritised with a numeric scale of 1 to 5. Complete the class diagram for Patient, to include: • attribute and data type for the date of birth • attribute and data type for the priority • methods to assign the patient ID, priority and doctor ID • methods to return the patient ID, patient date of birth and the priority.

[5]
b(i)

Identify the object-oriented programming (OOP) term described as ‘an occurrence of an object’.

[1]
b(ii)

Describe what is meant by the OOP term polymorphism.

[2]
13

The pseudocode algorithm below uses random file access to copy 50 records from a live file CurrentResults.dat to a stored file StoredResults.dat one record at a time. It uses the user-defined type StudentResult. TYPE StudentResult DECLARE LastName : STRING DECLARE FirstName : STRING DECLARE ExamGrade : STRING ENDTYPE If any grades are missing in CurrentResults.dat, the text "Missing grade" is added to the ExamGrade field in StoredResults.dat Complete this file handling pseudocode algorithm. DECLARE Grade : StudentResult DECLARE Position : INTEGER .......................................................................................................................................................... OPENFILE "StoredResults.dat" FOR RANDOM .......................................................................................................................................................... SEEK "CurrentResults.dat", Position GETRECORD "CurrentResults.dat", Grade IF Grade.ExamGrade = "" THEN ............................................................................................................................................. ENDIF .................................................................................................................................................... .................................................................................................................................................... NEXT Position CLOSEFILE "CurrentResults.dat" CLOSEFILE "StoredResults.dat"

[5]

Mark scheme

9618/32 · May/June 2025

Download PDF

1a · 3 marks

  • 1 mark

    Use of correct Flight1 variable with given field names

  • 1 mark

    Correct assignments of four string data values

  • 1 mark

    Correct assignment of date data value

1b(i) · 2 marks

  • 1 mark

    TYPE GateID =

  • 1 mark

    (N01, N02, N03, W01, W02, W03, W04)

1b(ii) · 1 mark

  • 1 mark

    DECLARE Gate : GateID

2a · 3 marks

  • 1 mark

    number converted to binary (0)1111100.0111

  • 1 mark

    use of exponent = 7 // Moving binary point the correct number (7) of places

  • 1 mark

    Correct answer: Mantissa 011111000111, Exponent 0111

2b · 3 marks

  • 1 mark

    correct use of exponent seen

  • 1 mark

    correct conversion method from binary to denary

  • 1 mark

    −46.65625 // −4621/32

3a · 1 mark

  • 1 mark

    Two from: Application Layer / Transport Layer / Internet Layer / Link Layer

3b · 4 marks

  • 1 mark

    The TCP/IP suite can be viewed as layers within a stack

  • 1 mark

    Each layer can only accept input from the next higher or the next lower layer/adjacent layer

  • 1 mark

    The user/sender/computer interfaces with the top layer/application layer to send/receive a message

  • 1 mark

    The message when sent passes from the top layer/application layer to the bottom layer/link layer

  • 1 mark

    The message when received passes from bottom layer/link layer to the top layer/application layer

  • 1 mark

    The link layer interfaces directly with the network and sends/receives the message.

4 · 4 marks

  • 1 mark

    Suitable for long continuous transmission once the connection is made, it is available until the end of the transmission

  • 1 mark

    No time lost in resending/rearranging packets as no loss of packets or out of order packets

  • 1 mark

    Steady/high rate of transmission because the whole of the bandwidth is available

  • 1 mark

    Data loss unlikely as all data follows the same path

  • 1 mark

    Delays due to dedicated connection required to be set up/established before transmission can begin

  • 1 mark

    The dedicated connection cannot be used to transmit any other data

  • 1 mark

    System resources may be underutilised/inefficient/not very flexible because the bandwidth can’t be shared/high bandwidth is required // Bandwidth may be wasted // May send empty frames // the circuit is always there whether or not used

  • 1 mark

    There are no alternative routes if there is a failure or fault on the line

  • 1 mark

    Reduced security due to use of single path

  • 1 mark

    Scalability is difficult

5a · 3 marks

  • 1 mark

    Running state

  • 1 mark

    Ready state

  • 1 mark

    Blocked state

5b · 4 marks

  • 1 mark

    The processes are queued as they arrive

  • 1 mark

    The process with the shortest time to complete/burst time is selected first and executed

  • 1 mark

    The process will continue until complete or put in a waiting state once execution has begun // it is non-pre-emptive

  • 1 mark

    The scheduler will continue to choose shorter processes over longer processes if they continue to be added to the queue can cause starvation for longer jobs

  • 1 mark

    Shorter jobs don’t have to wait for longer jobs to complete before processing // Significantly reduces the average overall waiting time for processes // Ensures starvation doesn’t occur for process with shorter burst times

  • 1 mark

    Higher throughput of processes

6a · 2 marks

  • 1 mark

    A graph uses vertices/nodes to identify/represent entities such as destinations, people, etc

  • 1 mark

    Edges are used to connect nodes and can represent possible paths between them // a path is the list of nodes connected by edges between two given nodes

  • 1 mark

    Nodes/edges can be labelled/weighted, and this is a weighting that can be applied and used in the context of the application

  • 1 mark

    A cycle is a list of nodes that return to the same node.

6b · 4 marks

  • 1 mark

    Supervised learning uses labelled data // Unsupervised learning makes use of unlabelled data.

  • 1 mark

    Labelled data means that known outcomes are applied to specific inputs to help the AI predict outcomes.

  • 1 mark

    Supervised learning requires initial human input/training // Unsupervised learning does not require human input/training.

  • 1 mark

    With unlabelled data in unsupervised learning, outcomes are not known

  • 1 mark

    … the AI has to search for hidden patterns/structures/clusters

  • 1 mark

    … within the data in order to predict outcomes.

7a · 3 marks

  • 1 mark

    working, (all four columns P, Q, R and S)

  • 1 mark

    first eight rows of column Z (Shaded)

  • 1 mark

    second eight rows of column Z (Unshaded)

7b · 1 mark

  • 1 mark

    Z = Ā.B.C.D̄ + A.B̄.C.D̄ + A.B̄.C.D + A.B.C.D̄

7c · 4 marks

  • 1 mark

    Correct application of De Morgan’s laws

  • 1 mark

    Correct application of Idempotent, Distributive or Absorption laws

  • 1 mark

    Correct application of Idempotent, Distributive or Absorption laws

  • 1 mark

    Correct final answer: Ā.B̄ // A + B

8 · 4 marks

  • 1 mark

    It is the first stage of compilation

  • 1 mark

    White space and comments are removed

  • 1 mark

    It takes modified source code and breaks it into a series of tokens

  • 1 mark

    Each token is categorised and assigned types

  • 1 mark

    Identifiers are stored in a symbol table

  • 1 mark

    If the lexical analyser finds invalid tokens, it generates an error

  • 1 mark

    Acceptable data from the lexical analyser passes to the syntax analyser

9a · 1 mark

  • 1 mark

    Variables must begin with a letter / not a digit

9b · 1 mark

  • 1 mark

    <operator> ::= + | - | * | / | ^

9c · 3 marks

  • 1 mark

    Two variable boxes added to diagram

  • 1 mark

    One operator box added to diagram and all boxes in correct order

  • 1 mark

    Connections, arrows and return loop correctly added and no additional boxes or connections

9d · 1 mark

  • 1 mark

    Answer must begin with a valid letter. It can then be followed by any number of valid digits and/or letters, as long as it is at least four characters in length. (Example: AC768)

10 · 4 marks

  • 1 mark

    Handshake protocol

  • 1 mark

    To establish a secure and reliable connection between two devices, systems or networks // Permits the web server and client to authenticate each other to make use of encryption algorithms

  • 1 mark

    Record protocol

  • 1 mark

    Provides a secure and reliable way to send and receive data over a network // To exchange records between the client and server // Responsible for securing application data end ensuring its integrity and authenticity during transmission // Encrypts and authenticates data exchanged between a client and a server // Deals with the format for data transmission.

11a · 4 marks

  • 1 mark

    Any two nodes added correctly with correct data (Aa, Mm, Ss, Xx)

  • 1 mark

    Remaining two nodes added with correct data (Aa, Mm, Ss, Xx) and all nodes with connecting arrows starting from correct pointer boxes

  • 1 mark

    Correct null pointers (0) added throughout

  • 1 mark

    … with no entries in other pointer boxes and all nodes correctly positioned and connected.

11b · 2 marks

  • 1 mark

    Recursion is beneficial for algorithms when a problem naturally breaks down into smaller versions of itself.

  • 1 mark

    … such as calculating a factorial / mathematical series / Fibonacci / compound interest / tree traversal / evaluation of RPN expressions.

12a · 5 marks

  • 1 mark

    Two correct attributes (DateOfBirth : Date) and priority with a sensible name and integer data type

  • 1 mark

    SetPatientID(…) and SetDoctorID(…) seen

  • 1 mark

    … and appropriate parameters, with string data types

  • 1 mark

    GetPatientID() and GetDateOfBirth() seen

  • 1 mark

    Priority setter and getter fully correct with name matching Priority attribute, with appropriate parameter and correct data type.

12b(i) · 1 mark

  • 1 mark

    Instance // instantiation

12b(ii) · 2 marks

  • 1 mark

    Polymorphism is when methods with the same name are redefined / behave differently …

  • 1 mark

    … in derived / inherited classes / subclasses

13 · 5 marks

  • 1 mark

    DECLARE Grade : StudentResult and/or other declarations / file open statements correct

  • 1 mark

    OPENFILE statements correctly completed for RANDOM

  • 1 mark

    SEEK and GETRECORD from CurrentResults.dat

  • 1 mark

    IF Grade.ExamGrade = "" THEN Grade.ExamGrade  "Missing grade" ENDIF

  • 1 mark

    SEEK and PUTRECORD to StoredResults.dat

Questions

  1. 1
    Question 16 marks
    Mark scheme ›
  2. 2
    Question 26 marks
    Mark scheme ›
  3. 3
    Question 35 marks
    Mark scheme ›
  4. 4
    Question 44 marks
    Mark scheme ›
  5. 5
    Question 57 marks
    Mark scheme ›
  6. 6
    Question 66 marks
    Mark scheme ›
  7. 7
    Question 78 marks
    Mark scheme ›
  8. 8
    Question 84 marks
    Mark scheme ›
  9. 9
    Question 96 marks
    Mark scheme ›
  10. 10
    Question 104 marks
    Mark scheme ›
  11. 11
    Question 116 marks
    Mark scheme ›
  12. 12
    Question 128 marks
    Mark scheme ›
  13. 13
    Question 135 marks
    Mark scheme ›

More 9618 papers

Other papers from May/June 2025

Solve it on ExamPalStart