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

Question paper and mark scheme75 marks12 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/31 · May/June 2025

Download PDF
1

A programmer is writing a program to manage bookings for a small taxi company. The programmer requires some user-defined data types.

a

Write a pseudocode statement to declare the enumerated data type, Vehicle, to hold the identity code of each of the company’s taxis: M100, M230, T101, T102, T120, T150

[2]
b

Write pseudocode statements to declare the composite data type, Booking, to hold data about taxi bookings. The data required includes: • booking number (any combination of letters and numbers) • destination • client name • client telephone number • date of departure • address for pick-up • the identity code of the taxi used. Use the most appropriate data type in each case, including the enumerated data type from part (a).

[4]
2

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

Write the normalised floating-point representation of the following binary number using this system. 0.00000011010111

[2]
b

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

[4]
3
a

The Application Layer and Transport Layer are two layers of the TCP/IP protocol suite. Describe the purpose of the Application Layer and the purpose of the Transport Layer. Purpose of Application Layer Purpose of Transport Layer

[5]
b

Describe packet switching as a method of transmitting messages across the internet.

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

A linked list of nodes is used to store an ordered list of integers. Each node consists of the data, a left pointer and a right pointer, for example: Left pointer Data Right pointer 20 The linked list will be organised as a binary tree. −1 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 integers have been added: 6, 15, 41, 66

[4]
b

Describe what is meant by recursion.

[2]
c

A binary tree is a suitable Abstract Data Type (ADT) that a designer can implement using recursive algorithms. Identify one other ADT that a designer can implement using recursive algorithms.

[1]
5

This truth table represents a logic circuit.

Figure 1 of 1 for question 5
a

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

[2]
b(i)

Complete the Karnaugh map (K-map) for the given truth table.

[2]
b(ii)

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

[2]
b(iii)

Write the Boolean logic expression from your answer to part (b)(ii) as the simplified sum-of-products. Z =

[2]
6

Describe the process of executing a program using an interpreter.

[4]
Figure 1 of 1 for question 6
7

Several syntax diagrams are shown.

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

State why each passcode is invalid for the given syntax diagrams. #Jd7 Reason C%6A Reason

[2]
b

Complete the Backus-Naur Form (BNF) for <uppercase> and <passcode>. <uppercase> ::= <passcode> ::=

[4]
8
a

Describe what is meant by multi-tasking and how it benefits process management.

[2]
b

Explain the function of the shortest remaining time scheduling routine and give a benefit of this routine. Function Benefit

[4]
9

Secure Socket Layer (SSL) and Transport Layer Security (TLS) are two protocols.

a

State two functions of SSL/TLS. 1 2

[2]
b

Give two examples of situations where the use of SSL/TLS would be appropriate. 1 2

[2]
10
a

Describe the purpose of a graph when used in an Artificial Intelligence (AI) system.

[2]
b

Explain the use of artificial neural networks in Deep Learning.

[4]
11

A medical centre uses objects of the class Appointment to record treatments given and medication prescribed during each doctor’s appointment. Some of the attributes required in the class are listed in the table. Attribute Data type Description DateSeen DATE date of treatment Treatments STRING treatments given Medications STRING medications prescribed Patients are identified by a unique 8-digit number, beginning with the patient’s year of birth, for example, 20108989. Doctors are identified by their name, for example, A N Other.

a

Complete the class diagram for Appointment, to include: • attribute and data type for the identification of the patient • attribute and data type for the identification of the doctor • methods to assign date seen, treatments given and medications prescribed • method to return the date seen and the attributes for the patient and the doctor.

[5]
b(i)

Identify the object-oriented programming (OOP) feature whose function includes restricting external access to the data.

[1]
b(ii)

Describe what is meant by the OOP feature inheritance.

[2]
12

The pseudocode algorithm checks whether a location in a stock file StockList.dat is empty or not. The location is given by the user. If the location is empty, a suitable message is displayed, otherwise the item stored at that location is displayed. Complete this file-handling pseudocode algorithm. DECLARE Location : INTEGER DECLARE Item : STRING DECLARE Continue : BOOLEAN DECLARE Answer : CHAR Continue TRUE OPENFILE ....................................................................................................................................... WHILE Continue OUTPUT "Enter a location between 1 and 500: " INPUT Location .................................................................................................................................................... GETRECORD .............................................................................................................................. IF Item = "" THEN OUTPUT "This record is missing." ELSE OUTPUT "The item in stock is ", ........................................................................ ENDIF OUTPUT "Another location (Y or N)?" INPUT Answer IF Answer <> 'Y' THEN Continue FALSE ENDIF ENDWHILE .......................................................................................................................................................... OUTPUT "End of program"

[5]

Mark scheme

9618/31 · May/June 2025

Download PDF

1a · 2 marks

  • 1 mark

    TYPE Vehicle =

  • 1 mark

    (M100, M230, T101, T102, T120, T150)

1b · 4 marks

  • 1 mark

    TYPE Booking and ENDTYPE correct

  • 1 mark

    Declare used correctly for every field in the response

  • 1 mark

    Any four fields correct

  • 1 mark

    Remaining fields correct

2a · 2 marks

  • 1 mark

    Correct mantissa: 0 1 1 0 1 0 1 1 1 0

  • 1 mark

    Correct exponent: 1 1 1 0 1 0

2b · 4 marks

  • 1 mark

    number converted to binary e.g., positive binary version of 25.3125 = (0)11001.0101

  • 1 mark

    two's complement version bits flipped and 1 added = 100110.1011

  • 1 mark

    -32 + 4 + 2 + 0.5 + 0.125 + 0.0625 // -32 + 4 + 2 + 1/2 + 1/8 + 1/16

  • 1 mark

    movement of binary point seen (5 places)

  • 1 mark

    correct mantissa: 1 0 0 1 1 0 1 0 1 1

  • 1 mark

    correct exponent: 0 0 0 1 0 1

3a · 5 marks

  • 1 mark

    To provide services / interface with the user // access to applications, for example login, file transfer, network file access, email, etc

  • 1 mark

    To provide mechanisms for securing communication e.g. encryption/authentication

  • 1 mark

    To define/provide protocols used to allow the exchange of data/communication // to contain programs that exchange data

  • 1 mark

    Error detection and recovery mechanisms to handle application specific errors

  • 1 mark

    To provide logical communication between applications running on different hosts // To ensure that data is delivered to the correct application process on the destination machine

  • 1 mark

    To ensure error-free, end-to-end delivery of data between a source and a destination, in sequence // to provide error recovery techniques such as error detection codes and automatic repeat request

  • 1 mark

    To break data into segments when sent and to reconstruct when received // To reassemble segments at destination

  • 1 mark

    To regulate network connections // to provide flow control mechanisms to prevent data loss.

3b · 4 marks

  • 1 mark

    Data are broken into equal sized packets

  • 1 mark

    Data packets have headers containing information such as the IP addresses of the sender and receiver

  • 1 mark

    Each packet of data is sent independently to the destination // Packets don't necessarily follow the same route

  • 1 mark

    Each packet is sent via the most optimum path available

  • 1 mark

    Packets don't necessarily arrive in the order they were sent // Packets are reconstructed at the destination in the correct order

  • 1 mark

    Missing / damaged packets are re-sent

4a · 4 marks

  • 1 mark

    Any two nodes added correctly with correct data (6, 15, 41, 66) and arrows

  • 1 mark

    Remaining two nodes added with correct data (6, 15, 41, 66) and all nodes with connecting arrows starting from pointer boxes

  • 1 mark

    Correct null pointers (-1) added throughout

  • 1 mark

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

4b · 2 marks

  • 1 mark

    A technique used to solve problems using a function/procedure/subroutine that calls itself (general case)

  • 1 mark

    … until the terminating condition / base case is achieved, when no further recursive calls are made

4c · 1 mark

  • 1 mark

    Stack

5a · 2 marks

  • 2 marks

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

5b(i) · 2 marks

  • 2 marks

    Correct Karnaugh map entries (1s at 00,00; 10,00; 01,01; 11,01; 01,11; 11,11; 0s elsewhere)

5b(ii) · 2 marks

  • 1 mark

    Correct loop for group of four 1s in columns 01 and 11, rows 01 and 11 (B.D)

  • 1 mark

    Correct loop for group of two 1s wrapped around row 00, columns 00 and 10 (B̄.C̄.D̄)

5b(iii) · 2 marks

  • 1 mark

    One correct Boolean term

  • 1 mark

    Boolean terms and operator correct and no other terms present: Z = B.D + B̄.C̄.D̄ // B̄.C̄.D̄ + B.D

6 · 4 marks

  • 1 mark

    The interpreter translates the source code one line at a time

  • 1 mark

    If the line is syntax error free it is executed

  • 1 mark

    It is not stored in executable format

  • 1 mark

    If an error is found, the program halts with an error message

  • 1 mark

    Each line must be translated every time it is run, including lines running multiple times for example in loops

7a · 2 marks

  • 1 mark

    #Jd7 – must begin with a member of the group uppercase // cannot begin with a symbol

  • 1 mark

    C%6A – the fourth character cannot be a member of the group uppercase // the fourth character must be either a symbol, digit or lowercase

7b · 4 marks

  • 1 mark

    <uppercase> ::= A | C | E | G | J

  • 1 mark

    <passcode> ::= <uppercase><code>

  • 1 mark

    <code> ::= <lowercase>|<symbol>|<digit>

  • 1 mark

    |<lowercase><code>|<symbol><code>|<digit><code>

8a · 2 marks

  • 1 mark

    Running multiple processes concurrently

  • 1 mark

    … which benefits process management by allowing more tasks to complete than would be the case if they had to run one task after another.

8b · 4 marks

  • 1 mark

    The processes are queued as they arrive

  • 1 mark

    Processes with the shortest burst time are executed first

  • 1 mark

    It is a pre-emptive scheduling function // When a process with a shorter burst time arrives the existing process is replaced by the shorter process.

  • 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

    Processes with a short burst time are processed very quickly

  • 1 mark

    Waiting time is minimised

9a · 2 marks

  • 1 mark

    Ensure security/privacy when using the internet

  • 1 mark

    Data encryption

  • 1 mark

    Identification / authentication of client and server

9b · 2 marks

  • 1 mark

    When transmitting authentication data e.g. passwords, session cookies

  • 1 mark

    When transmitting data that must be protected from modification on its way to or from a server e.g. user input, or results from the server

  • 1 mark

    When transmitting data classified as non-public.

10a · 2 marks

  • 1 mark

    A graph is used in AI to record relationships between entities

  • 1 mark

    … using vertices / nodes and edges

  • 1 mark

    for example, to represent places on a map and the distances between them, in order to find the shortest route.

10b · 4 marks

  • 1 mark

    Artificial neural networks are designed to work in the same way as the human brain

  • 1 mark

    ANNs provide the architecture and algorithms for learning from the data

  • 1 mark

    They have a large number of connected processing units / nodes

  • 1 mark

    … that are arranged in layers / interconnected and work together to process data

  • 1 mark

    Deep learning models learn from data by adjusting the weights/biases of the connections between neurons

  • 1 mark

    They use multiple hidden layers to extract complex features and to make predictions

11a · 5 marks

  • 1 mark

    Two correct attributes (PatientID : INTEGER and Doctor : STRING)

  • 1 mark

    SetTreatments(…) and SetMedications(…) seen

  • 1 mark

    … and appropriate parameters, with string data types

  • 1 mark

    GetPatientID() and GetDoctor() seen

  • 1 mark

    SetDateSeen(…) and GetDateSeen fully correct with appropriate parameter and correct data type in setter.

11b(i) · 1 mark

  • 1 mark

    Encapsulation

11b(ii) · 2 marks

  • 1 mark

    Inheritance is where a derived class takes properties / behaviours attributes / methods

  • 1 mark

    … of a parent / super class / base class

  • 1 mark

    The attributes / methods / properties taken from the parent / super class / base class can also be extended / copied / used / changed / overwritten / overridden in the subclass.

12 · 5 marks

  • 1 mark

    DECLARE Continue : BOOLEAN

  • 1 mark

    OUTPUT "Enter a location between 1 and 500: "

  • 1 mark

    GETRECORD "StockList.dat", Item

  • 1 mark

    ELSE

  • 1 mark

    OUTPUT "Another location (Y or N)?"

  • 1 mark

    IF Answer <> 'Y' THEN

Questions

  1. 1
    Question 16 marks
    Mark scheme ›
  2. 2
    Question 26 marks
    Mark scheme ›
  3. 3
    Question 39 marks
    Mark scheme ›
  4. 4
    Question 47 marks
    Mark scheme ›
  5. 5
    Question 58 marks
    Mark scheme ›
  6. 6
    Question 64 marks
    Mark scheme ›
  7. 7
    Question 76 marks
    Mark scheme ›
  8. 8
    Question 86 marks
    Mark scheme ›
  9. 9
    Question 94 marks
    Mark scheme ›
  10. 10
    Question 106 marks
    Mark scheme ›
  11. 11
    Question 118 marks
    Mark scheme ›
  12. 12
    Question 125 marks
    Mark scheme ›

More 9618 papers

Other papers from May/June 2025

Solve it on ExamPalStart