Learn Extracted exam questions A-Level Computer Science 9618 Computer Science June 2025 Question Paper 33
9618 Computer Science June 2025 Question Paper 33
Source PDF on the left, extracted YAML on the right. Compare numbering, marks, options and text.
A programmer is writing a program to manage a video library. They require a user-defined data type.
Write \textbf{pseudocode} statements to declare the composite data type \texttt{VideoLibrary} to hold data about each video in the collection. This data includes:
\begin{itemize} \item identity code (any combination of letters and numbers) \item title \item year released \item date purchased \item format (for example DVD, Blu-ray, 4K, MP4) \item running time (minutes) \end{itemize}
Use the most appropriate data type in each case.
Identify \textbf{one} field in \texttt{VideoLibrary} that could be an efficient enumerated data type and give a reason for your choice.
Field \hrulefill
Reason \hrulefill
Numbers are stored in a computer using binary floating-point representation with:
\begin{itemize} \item 8 bits for the mantissa \item 8 bits for the exponent \item two's complement form for both the mantissa and the exponent. \end{itemize}
Give the largest normalised positive two's complement binary number that can be stored in this system and state its denary equivalent.
The denary answer should be expressed in terms of powers of 2.
\textbf{Mantissa} \hfill \textbf{Exponent}
\framebox{$\square\,\square\,\square\,\square\,\square\,\square\,\square\,\square$} \hfill \framebox{$\square\,\square\,\square\,\square\,\square\,\square\,\square\,\square$}
Denary \hrulefill
Calculate the normalised binary floating-point representation of $-3.59375$ in this system. Show your working.
\textbf{Mantissa} \hfill \textbf{Exponent}
\framebox{$\square\,\square\,\square\,\square\,\square\,\square\,\square\,\square$} \hfill \framebox{$\square\,\square\,\square\,\square\,\square\,\square\,\square\,\square$}
This truth table represents a logic circuit.
\begin{tabular}{|c|c|c|c|c|} \hline \multicolumn{4}{|c|}{\textbf{INPUT}} & \textbf{OUTPUT} \ \hline \textbf{A} & \textbf{B} & \textbf{C} & \textbf{D} & \textbf{Z} \ \hline 0 & 0 & 0 & 0 & 0 \ \hline 0 & 0 & 0 & 1 & 0 \ \hline 0 & 0 & 1 & 0 & 1 \ \hline 0 & 0 & 1 & 1 & 1 \ \hline 0 & 1 & 0 & 0 & 1 \ \hline 0 & 1 & 0 & 1 & 0 \ \hline 0 & 1 & 1 & 0 & 0 \ \hline 0 & 1 & 1 & 1 & 0 \ \hline 1 & 0 & 0 & 0 & 0 \ \hline 1 & 0 & 0 & 1 & 0 \ \hline 1 & 0 & 1 & 0 & 1 \ \hline 1 & 0 & 1 & 1 & 1 \ \hline 1 & 1 & 0 & 0 & 1 \ \hline 1 & 1 & 0 & 1 & 0 \ \hline 1 & 1 & 1 & 0 & 0 \ \hline 1 & 1 & 1 & 1 & 0 \ \hline \end{tabular}
Write the Boolean logic expression that corresponds to the given truth table as the sum-of-products.
\textbf{Z} = \hrulefill
Complete the Karnaugh map (K-map) for the given truth table.
\begin{tabular}{r|c|c|c|c|} \multicolumn{1}{r}{\textbf{CD} \quad \textbf{AB}} & \multicolumn{1}{c}{\textbf{00}} & \multicolumn{1}{c}{\textbf{01}} & \multicolumn{1}{c}{\textbf{11}} & \multicolumn{1}{c}{\textbf{10}} \ \cline{2-5} \textbf{00} & & & & \ \cline{2-5} \textbf{01} & & & & \ \cline{2-5} \textbf{11} & & & & \ \cline{2-5} \textbf{10} & & & & \ \cline{2-5} \end{tabular}
Draw loop(s) around appropriate group(s) in the K-map to produce an optimal sum-of-products.
Write the Boolean logic expression from your answer to part \textbf{(b)(ii)} as the simplified sum-of-products.
\textbf{Z} = \hrulefill
The Internet layer and Link layer are two layers of the TCP/IP protocol suite.
Describe the purpose of the Internet layer \textbf{and} the purpose of the Link layer.
Purpose of Internet layer \hrulefill
Purpose of Link layer \hrulefill
Describe the function of a router in packet switching.
Complete the table by filling in the missing object-oriented programming (OOP) terms and descriptions.
\begin{tabular}{|p{4cm}|p{10cm}|} \hline \multicolumn{1}{|c|}{\textbf{OOP term}} & \multicolumn{1}{c|}{\textbf{Description}} \ \hline \hrulefill & A method that accesses the value of a property. \ \hline \hrulefill & A method that changes the value of a property. \ \hline \multicolumn{1}{|c|}{Object} & \newline\newline\newline \ \hline \multicolumn{1}{|c|}{Method} & \newline\newline\newline \ \hline \end{tabular}
The management and scheduling of processes are tasks carried out by an operating system.
Describe \textbf{one} reason why scheduling is necessary in process management.
Explain the function of the round robin scheduling routine \textbf{and} give a benefit of this routine.
Function \hrulefill
Benefit \hrulefill
Secure Socket Layer (SSL) and Transport Layer Security (TLS) are two protocols.
Explain how SSL/TLS is used when client-server communication is initiated.
Explain the process of \textbf{syntax analysis} during program compilation.
Several syntax diagrams are shown.
State why \texttt{JJ90} is not a valid passcode for the given syntax diagrams.
Complete the Backus-Naur Form (BNF) for \texttt{
\texttt{
\texttt{
A character can be an upper, a lower or a digit.
The rules for passcode have been changed so that the third character may also be selected from upper and the final character may be repeated one or more times.
Complete the syntax diagram for passcode to show these changes.
State the purpose of the A* and Dijkstra's algorithms.
Outline the difference between the A* and Dijkstra's algorithms.
Explain how unsupervised learning takes place in machine learning.
The pseudocode algorithm below allows a user to input a new stock item. The random file is searched for the next empty location in the file and the new item is inserted there. A suitable message is displayed if the file is full.
Complete this pseudocode.
\begin{alltt} DECLARE Location : INTEGER DECLARE NewStock : STRING DECLARE CurrentStock : STRING DECLARE Stored : BOOLEAN DECLARE Max : INTEGER Max <- 100000 Stored <- FALSE Location <- 1 \hrulefill OUTPUT "Enter the new item you wish to store: " INPUT NewStock WHILE NOT Stored AND Location <= Max \hrulefill GETRECORD "StockList.dat", \hrulefill IF CurrentStock = "" THEN \hrulefill "StockList.dat", NewStock Stored <- TRUE ELSE Location <- Location + 1 ENDIF ENDWHILE \hrulefill THEN OUTPUT "The new item has not been stored as the file was full." ENDIF CLOSEFILE "StockList.dat" \end{alltt}
An array is an Abstract Data Type (ADT).
Identify \textbf{two} other ADTs.
- \hrulefill
- \hrulefill
A 1D array \texttt{DataArray} holds up to 1000 elements of type integer and needs to be sorted in ascending order.
Write the \textbf{pseudocode} for an insertion sort to sort the array into ascending order.
Use the identifiers from the table in your algorithm.
You do \textbf{not} need to declare any arrays or variables for this algorithm. You may assume this has already been done.
\begin{tabular}{|c|c|l|} \hline \textbf{Identifier} & \textbf{Data type} & \textbf{Description} \ \hline \texttt{Index} & \texttt{INTEGER} & counter for outer loop \ \hline \texttt{Position} & \texttt{INTEGER} & counter for inner loop – insertion position \ \hline \texttt{DataArray} & \texttt{INTEGER} & 1D array to store up to 1000 integers \ \hline \texttt{Value} & \texttt{INTEGER} & value to insert \ \hline \end{tabular}
The first line has been written for you.
\texttt{FOR Index <- 2 to 1000}
Describe \textbf{two} ways in which the performance of a sort routine is affected by the data to be sorted.
- \hrulefill
- \hrulefill
The recursive procedure \texttt{Delete()} is defined as follows:
\begin{alltt} PROCEDURE Delete(Index, Target) IF Numbers[Index] > 0 THEN IF Numbers[Index] >= Target THEN Numbers[Index] <- Numbers[Index + 1] ENDIF Index <- Index + 1 CALL Delete(Index, Target) ENDIF ENDPROCEDURE \end{alltt}
An array \texttt{Numbers} is used to store a sorted data set of non-zero positive integers. Unused cells contain zero.
The contents of the array at the start of the algorithm are:
\begin{tabular}{|c|c|c|c|c|c|c|c|c|c|} \hline \multicolumn{10}{|c|}{\textbf{Numbers}} \ \hline \textbf{} & \textbf{} & \textbf{} & \textbf{} & \textbf{} & \textbf{} & \textbf{} & \textbf{} & \textbf{} & \textbf{} \ \hline 2 & 3 & 7 & 11 & 15 & 17 & 19 & 23 & 0 & 0 \ \hline \end{tabular}
Complete the trace table for the algorithm for the procedure call:
\begin{alltt} CALL Delete(1, 15) \end{alltt}
\begin{tabular}{|c|c|c|c|c|c|c|c|c|c|c|c|} \hline & & \multicolumn{10}{c|}{\textbf{Numbers}} \ \hline \textbf{Index} & \textbf{Target} & \textbf{} & \textbf{} & \textbf{} & \textbf{} & \textbf{} & \textbf{} & \textbf{} & \textbf{} & \textbf{} & \textbf{} \ \hline & & 2 & 3 & 7 & 11 & 15 & 17 & 19 & 23 & 0 & 0 \ \hline & & & & & & & & & & & \ \hline & & & & & & & & & & & \ \hline & & & & & & & & & & & \ \hline & & & & & & & & & & & \ \hline & & & & & & & & & & & \ \hline & & & & & & & & & & & \ \hline & & & & & & & & & & & \ \hline & & & & & & & & & & & \ \hline & & & & & & & & & & & \ \hline & & & & & & & & & & & \ \hline \end{tabular}