9618/33 · May/June 2025
Download PDFA programmer is writing a program to manage a video library. They require a user-defined data type.
Write pseudocode statements to declare the composite data type VideoLibrary to hold data about each video in the collection. This data includes: • identity code (any combination of letters and numbers) • title • year released • date purchased • format (for example DVD, Blu-ray, 4K, MP4) • running time (minutes) Use the most appropriate data type in each case.
Identify one field in VideoLibrary that could be an efficient enumerated data type and give a reason for your choice. Field .......................................................................................................................................... ................................................................................................................................................... Reason ..................................................................................................................................... ...................................................................................................................................................
Numbers are stored in a computer using binary floating-point representation with: • 8 bits for the mantissa • 8 bits for the exponent • two’s complement form for both the mantissa and the exponent.
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. Mantissa Exponent Denary ......................................................................................................................................
Calculate the normalised binary floating-point representation of –3.59375 in this system. Show your working. Mantissa Exponent Working .....................................................................................................................................
This truth table represents a logic circuit.

Write the Boolean logic expression that corresponds to the given truth table as the sum-of-products. Z = ............................................................................................................................................ .............................................................................................................................................
Complete the Karnaugh map (K-map) for the given truth table.
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 (b)(ii) as the simplified sum-of-products. Z = ..................................................................................................................................... .....................................................................................................................................
The Internet layer and Link layer are two layers of the TCP/IP protocol suite. Describe the purpose of the Internet layer and the purpose of the Link layer. Purpose of Internet layer .......................................................................................................... ................................................................................................................................................... ................................................................................................................................................... ................................................................................................................................................... ................................................................................................................................................... Purpose of Link layer ................................................................................................................ ................................................................................................................................................... ................................................................................................................................................... ................................................................................................................................................... ...................................................................................................................................................
Describe the function of a router in packet switching.
Complete the table by filling in the missing object-oriented programming (OOP) terms and descriptions.
The management and scheduling of processes are tasks carried out by an operating system.
Describe one reason why scheduling is necessary in process management.
Explain the function of the round robin scheduling routine and give a benefit of this routine. Function .................................................................................................................................... ................................................................................................................................................... ................................................................................................................................................... ................................................................................................................................................... ................................................................................................................................................... ................................................................................................................................................... Benefit ...................................................................................................................................... ...................................................................................................................................................
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 syntax analysis during program compilation.
Several syntax diagrams are shown.







State why JJ90 is not a valid passcode for the given syntax diagrams.
Complete the Backus-Naur Form (BNF) for <upper> and <passcode>. <upper> ::= .......................................................................................................................... ................................................................................................................................................... <passcode> ::= ................................................................................................................... ................................................................................................................................................... ................................................................................................................................................... ...................................................................................................................................................
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. DECLARE Location : INTEGER DECLARE NewStock : STRING DECLARE CurrentStock : STRING DECLARE Stored : BOOLEAN DECLARE Max : INTEGER Max ← 100000 Stored ← FALSE Location ← 1 .......................................................................................................................................................... OUTPUT "Enter the new item you wish to store: " INPUT NewStock WHILE NOT Stored AND Location <= Max .................................................................................................................................................... GETRECORD "StockList.dat", .......................................................................................... IF CurrentStock = "" THEN ...................................................................................... "StockList.dat", NewStock Stored ← TRUE ELSE Location ← Location + 1 ENDIF ENDWHILE ................................................................................................................................................ THEN OUTPUT "The new item has not been stored as the file was full." ENDIF CLOSEFILE "StockList.dat"
An array is an Abstract Data Type (ADT). Identify two other ADTs. 1 ................................................................................................................................................ 2 ................................................................................................................................................
A 1D array DataArray holds up to 1000 elements of type integer and needs to be sorted in ascending order. Write the pseudocode for an insertion sort to sort the array into ascending order. Use the identifiers from the table in your algorithm. You do not need to declare any arrays or variables for this algorithm. You may assume this has already been done. Identifier Data type Description Index INTEGER counter for outer loop Position INTEGER counter for inner loop – insertion position DataArray INTEGER 1D array to store up to 1000 integers Value INTEGER value to insert The first line has been written for you. FOR Index ← 2 to 1000
Describe two ways in which the performance of a sort routine is affected by the data to be sorted. 1 ................................................................................................................................................ ................................................................................................................................................... 2 ................................................................................................................................................ ...................................................................................................................................................
The recursive procedure Delete() is defined as follows: 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 An array 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: Numbers [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] 2 3 7 11 15 17 19 23 0 0 Complete the trace table for the algorithm for the procedure call: CALL Delete(1, 15)






