Skip to content

Learn Extracted exam questions A-Level Computer Science 9618 Computer Science June 2025 Question Paper 32

9618 Computer Science June 2025 Question Paper 32

Source PDF on the left, extracted YAML on the right. Compare numbering, marks, options and text.

1 short_answer p. 2

Data types can be defined using pseudocode.

The composite record data type, \texttt{Departure}, is used to represent flights from Cambridge Airport and is defined in pseudocode as:

\begin{alltt} TYPE Departure DECLARE FlightNumber : STRING DECLARE Destination : STRING DECLARE FlightDate : DATE DECLARE Gate : STRING DECLARE Airline : STRING ENDTYPE \end{alltt}

A variable, \texttt{Flight1}, is declared in pseudocode as:

\begin{alltt} DECLARE Flight1 : Departure \end{alltt}

1a 3 marks short_answer p. 2 10.1

Write \textbf{pseudocode} to store the following details to \texttt{Flight1}:

\begin{tabular}{|l|l|} \hline \textbf{Field} & \textbf{Data} \ \hline \texttt{FlightNumber} & SB2789 \ \hline \texttt{Destination} & Dublin \ \hline \texttt{FlightDate} & 30/07/2025 \ \hline \texttt{Gate} & N03 \ \hline \texttt{Airline} & Cambridge Airways \ \hline \end{tabular}

1b short_answer p. 2

The data type for \texttt{Gate} is changed to an enumerated data type, \texttt{GateID}.

1bi 2 marks short_answer p. 2 13.1

Write a \textbf{pseudocode} statement to declare \texttt{GateID} to hold the identity codes for the airport gates:

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

1bii 1 mark short_answer p. 2 13.1

Write the new \textbf{pseudocode} statement required to replace the declaration of \texttt{Gate} in \texttt{Departure}.

2 short_answer p. 3

Numbers are stored in a computer using binary floating-point representation with:

\begin{itemize} \item 12 bits for the mantissa \item 4 bits for the exponent \item two's complement form for both the mantissa and the exponent. \end{itemize}

2a 3 marks calculation p. 3 13.3

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

\textbf{Mantissa} \qquad\qquad\qquad\qquad\qquad\qquad\qquad \textbf{Exponent}

\framebox{$\square\,\square\,\square\,\square\,\square\,\square\,\square\,\square\,\square\,\square\,\square\,\square$} \qquad \framebox{$\square\,\square\,\square\,\square$}

2b 3 marks calculation p. 3 13.3

Calculate the denary value of the following normalised binary floating-point number. Show your working.

\textbf{Mantissa} \qquad\qquad\qquad\qquad\qquad\qquad\qquad \textbf{Exponent}

\begin{tabular}{|c|c|c|c|c|c|c|c|c|c|c|c|} \hline 1 & 0 & 1 & 0 & 0 & 0 & 1 & 0 & 1 & 0 & 1 & 1 \ \hline \end{tabular} \qquad \begin{tabular}{|c|c|c|c|} \hline 0 & 1 & 1 & 0 \ \hline \end{tabular}

Denary value \hrulefill

3 short_answer p. 4
(no root text)
3a 1 mark short_answer p. 4 14.1

Identify \textbf{two} different layers of the TCP/IP protocol suite.

3b 4 marks long_answer p. 4 14.1

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

4 4 marks short_answer p. 4 14.2

Circuit switching may be used as a method of data transmission.

State \textbf{two} benefits and \textbf{two} drawbacks of circuit switching.

Benefit 1 \hrulefill

Benefit 2 \hrulefill

Drawback 1 \hrulefill

Drawback 2 \hrulefill

5 short_answer p. 5

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

5a 3 marks short_answer p. 5 16.1

Identify \textbf{three} process states.

  1. \hrulefill
  2. \hrulefill
  3. \hrulefill
5b 4 marks long_answer p. 5 16.1

Describe the function of the shortest job first scheduling routine \textbf{and} give a benefit of this routine.

Function

Benefit

6 short_answer p. 5
6a 2 marks short_answer p. 5 18.1

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

6b 4 marks long_answer p. 5 18.1

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

7 short_answer p. 6

The diagram shows a logic circuit.

7a 3 marks short_answer p. 6 3.2

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

\begin{tabular}{|c|c|c|c|c|c|c|c|c|} \hline \multicolumn{4}{|c|}{} & \multicolumn{4}{c|}{Working space} & \ \hline \textbf{A} & \textbf{B} & \textbf{C} & \textbf{D} & \textbf{P} & \textbf{Q} & \textbf{R} & \textbf{S} & \textbf{Z} \ \hline 0 & 0 & 0 & 0 & & & & & \ \hline 0 & 0 & 0 & 1 & & & & & \ \hline 0 & 0 & 1 & 0 & & & & & \ \hline 0 & 0 & 1 & 1 & & & & & \ \hline 0 & 1 & 0 & 0 & & & & & \ \hline 0 & 1 & 0 & 1 & & & & & \ \hline 0 & 1 & 1 & 0 & & & & & \ \hline 0 & 1 & 1 & 1 & & & & & \ \hline 1 & 0 & 0 & 0 & & & & & \ \hline 1 & 0 & 0 & 1 & & & & & \ \hline 1 & 0 & 1 & 0 & & & & & \ \hline 1 & 0 & 1 & 1 & & & & & \ \hline 1 & 1 & 0 & 0 & & & & & \ \hline 1 & 1 & 0 & 1 & & & & & \ \hline 1 & 1 & 1 & 0 & & & & & \ \hline 1 & 1 & 1 & 1 & & & & & \ \hline \end{tabular}

7b 1 mark short_answer p. 7 3.2

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

Z = \hrulefill

7c 4 marks calculation p. 7 15.2

Use Boolean algebra including De Morgan's laws to simplify the following expression. Show all working.

$$(\overline{A + B}) \cdot (\overline{A \cdot B + B \cdot C})$$

Simplified expression \hrulefill

8 4 marks long_answer p. 7 16.2

Explain what is meant by \textbf{lexical analysis} during program compilation.

9 short_answer p. 8

Several syntax diagrams are shown.

9a 1 mark short_answer p. 9 16.2

State why \texttt{9K} is not a valid variable for the given syntax diagrams.

9b 1 mark short_answer p. 9 16.2

Complete the Backus-Naur Form (BNF) for \texttt{}.

\texttt{ ::= } \hrulefill

9c 3 marks short_answer p. 9 16.2

An expression is defined as follows:

\begin{itemize} \item A variable is assigned to a variable followed by an operator followed by another variable. \item The operator and final variable stage can be repeated as many times as necessary. \end{itemize}

Complete the syntax diagram for an expression.

9d 1 mark short_answer p. 9 16.2

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 \textbf{four} characters.

State \textbf{one} example of a valid variable.

10 4 marks short_answer p. 9 17.1

Identify the \textbf{two} main protocols that form Transport Layer Security (TLS) \textbf{and} state the purpose of each.

Protocol 1 \hrulefill Purpose \hrulefill

Protocol 2 \hrulefill Purpose \hrulefill

11 short_answer p. 10

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.

11a 4 marks short_answer p. 10 10.4

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

11b 2 marks short_answer p. 11 19.2

A binary tree can be used to implement recursion.

Identify \textbf{one} feature of an algorithm that makes it beneficial to use recursion. Give \textbf{one} example of an application that could use a recursive algorithm.

Feature \hrulefill

Example \hrulefill

12 short_answer p. 12
(no root text)
12a 5 marks short_answer p. 12 13.1

A medical clinic uses objects of the class \texttt{Patient} to assign a priority and a doctor to a patient. Some of the attributes required in the class are listed in the table.

\begin{tabular}{|l|l|l|} \hline \textbf{Attribute} & \textbf{Data type} & \textbf{Description} \ \hline \texttt{PatientID} & \texttt{STRING} & Unique identifier of the patient \ \hline \texttt{Name} & \texttt{STRING} & Patient's full name, surname first \ \hline \texttt{DoctorID} & \texttt{STRING} & ID of doctor administering treatment \ \hline \end{tabular}

\newline Treatment is prioritised with a numeric scale of 1 to 5.

Complete the class diagram for \texttt{Patient}, to include: \begin{itemize} \item attribute and data type for the date of birth \item attribute and data type for the priority \item methods to assign the patient ID, priority and doctor ID \item methods to return the patient ID, patient date of birth and the priority. \end{itemize}

\begin{alltt} Patient

PatientID : STRING

Name : STRING

....................................................... : ....................................................................

....................................................... : ....................................................................

DoctorID : STRING

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

SetName(FullName : STRING)

SetDateOfBirth(DOB : DATE)

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

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

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

GetName()

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

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

GetDoctorID() \end{alltt}

12b short_answer p. 13
12bi 1 mark short_answer p. 13 20.1

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

12bii 2 marks short_answer p. 13 20.1

Describe what is meant by the OOP term \textbf{polymorphism}.

13 5 marks short_answer p. 13 13.2

The pseudocode algorithm below uses random file access to copy 50 records from a live file \texttt{CurrentResults.dat} to a stored file \texttt{StoredResults.dat} one record at a time. It uses the user-defined type \texttt{StudentResult}.

\begin{alltt} TYPE StudentResult DECLARE LastName : STRING DECLARE FirstName : STRING DECLARE ExamGrade : STRING ENDTYPE \end{alltt}

If any grades are missing in \texttt{CurrentResults.dat}, the text \texttt{"Missing grade"} is added to the \texttt{ExamGrade} field in \texttt{StoredResults.dat}

Complete this file handling pseudocode algorithm.

\begin{alltt} DECLARE Grade : StudentResult DECLARE Position : INTEGER

\hrulefill

OPENFILE "StoredResults.dat" FOR RANDOM

\hrulefill

SEEK "CurrentResults.dat", Position GETRECORD "CurrentResults.dat", Grade IF Grade.ExamGrade = "" THEN

\hrulefill

ENDIF

\hrulefill

\hrulefill

NEXT Position CLOSEFILE "CurrentResults.dat" CLOSEFILE "StoredResults.dat" \end{alltt}

Log in or create account

IGCSE & A-Level