1 Data types can be defined using pseudocode. The data type, LibraryRecord, is defined in pseudocode as: TYPE LibraryRecord DECLARE Title : STRING DECLARE Fiction : BOOLEAN DECLARE Author : STRING DECLARE NumberOfCopies : INTEGER ENDTYPE A variable, LibraryBook, is declared in pseudocode as: DECLARE LibraryBook : LibraryRecord (a) Write pseudocode statements to assign: A Level Computer Science to Title of LibraryBook; FALSE to Fiction of LibraryBook. [2] (b) The type definition for LibraryRecord is changed. (i) The value for NumberOfCopies must be between 1 and 10 inclusive. Write the updated line of pseudocode from the type definition of LibraryRecord to implement the change. [1] (ii) Every copy of every book is now uniquely identified by an accession number, AccessionNumber, as it is added to the library. Each library record will include one or more accession numbers. Each accession number is an integer. Write the extra line of pseudocode needed in the type definition of LibraryRecord. [2] (c) A record is a user-defined composite data type. Explain what is meant by a user-defined composite data type. Include an example of another user-defined composite data type in your answer. [3]
A Level Computer Science 9618 · Paper practice
Paper 3 past paper questions
Every archived Computer Science 9618 Paper 3 question in one place. Practise them by topic, then sit a full paper under timed conditions.
Most-tested topicsData Representation 56System Software (A Level) 40Hardware and Virtual Machines 38Further Programming 37Communication and internet technologies 28Computational thinking and Problem-solving 26
You’re practising 2021–2022 papers. The 2023–2026 papers, including 2026, need a plan.
Unlock from $6/mo1 Data types can be defined using pseudocode. The data type, BuildingRecord, is defined in pseudocode as: TYPE BuildingRecord DECLARE BuildingID : INTEGER DECLARE BuildingGroup : STRING DECLARE OwnerName : STRING DECLARE BuildingAddress : STRING DECLARE DateLastSold : DATE DECLARE PriceLastSold : REAL ENDTYPE A variable, BuildingRegister, is declared in pseudocode as: DECLARE BuildingRegister : BuildingRecord (a) Write pseudocode statements to assign: 1067 to the BuildingID of BuildingRegister; house to the BuildingGroup of BuildingRegister. [2] (b) The type definition for BuildingRecord is changed. The data type for BuildingGroup is changed to an enumerated type, BuildingType, with values of house, bungalow, apartment and farm. (i) Write the type declaration for BuildingType in pseudocode. [2] (ii) Write the new declaration for BuildingGroup in pseudocode. [1] (iii) Write the new pseudocode statement to assign house to BuildingGroup of BuildingRegister. [1] (c) The program is to be rewritten using Object-Oriented Programming (OOP). The data type BuildingRecord is to be changed to a class, BuildingClass. The properties for BuildingClass are BuildingID, BuildingGroup, OwnerName, BuildingAddress, DateLastSold and PriceLastSold. All the properties are set to PRIVATE, for example: PRIVATE PriceLastSold : REAL (i) Write the declaration in pseudocode for OwnerName as PRIVATE. [1] (ii) Explain why the properties have been set to PRIVATE. [2]
1 Real numbers are stored in a computer system using floating-point representation with: 8 bits for the mantissa; 8 bits for the exponent; two's complement form for both mantissa and exponent. (a) Write the normalised floating-point representation of +202 in this system. Show your working. [diagram: Mantissa 8 empty boxes, Exponent 8 empty boxes] Working [3] (b) Write the normalised floating-point representation of -202 in this system. Show your working. [diagram: Mantissa 8 empty boxes, Exponent 8 empty boxes] Working [3] (c) A binary number is stored in the computer system. Mantissa 0 0 0 1 1 1 1 0 Exponent 0 0 0 1 1 0 0 0 (i) State why the number is not normalised. [1] (ii) Write the normalised floating-point representation of the number. Mantissa [8 empty boxes] Exponent [8 empty boxes] [2]
1 Normalised floating-point numbers are stored in a computer system using two's complement for both the mantissa and the exponent with: 11 bits for the mantissa; 5 bits for the exponent. (a) Write the largest positive two's complement binary number that can be stored in this system. [Mantissa: 11 empty boxes. Exponent: 5 empty boxes.] [1] (b) Calculate the denary value of the given binary floating-point number. Show your working. Mantissa: 1 0 1 1 0 0 1 0 0 1 1 | Exponent: 0 1 0 0 1. Working ... Answer ... [3] (c) State when underflow occurs in a binary floating-point system. [2]
2 A declarative language is used to represent the following facts about cats. 01 type(leopard, wild). 02 type(lion, wild). 03 type(cheetah, wild). 04 type(savannah, hybrid). 05 type(persian, domestic). 06 07 hair(leopard, medium). 08 hair(lion, short). 09 hair(cheetah, medium). 10 hair(savannah, medium). 11 hair(persian, long). 12 13 spots(leopard, yes). 14 spots(lion, no). 15 spots(cheetah, yes). 16 spots(savannah, yes). 17 spots(persian, no). These clauses have the following meaning: Clause | Meaning 01 | A leopard is a type of wild cat. 08 | A lion has short hair. 16 | A savannah has spots. (a) More facts are to be included. A caracal is a wild cat with short hair. Write the additional clauses to record these facts. 18 … 19 … [2] (b) Using the variable Cat, the goal: hair(Cat, medium) returns Cat = leopard, cheetah, savannah. Write the result returned by the goal: hair(Cat, long) Cat = … [1] (c) (i) Write the goal, using the variable Pet, to find all the domestic cats. [1] (ii) Write the goal, using the variable WildSpotty, to find all the wild cats with spots. [2]
2 A declarative language is used to represent the following facts about a school. 01 teaches(alan, mathematics). 02 teaches(ioana, geography). 03 teaches(nina, history). 04 teaches(alan, statistics). 05 06 studies(ahmed, history). 07 studies(freya, history). 08 studies(kim, history). 09 studies(freya, geography). 10 studies(hua, mathematics). 11 studies(hua, statistics). 12 studies(hua, geography). 13 14 tutors(alan, kim). 15 tutors(alan, hua). 16 tutors(alan, freya). 17 tutors(nina, ahmed). These clauses have the following meaning: Clause | Meaning 01 | Alan teaches mathematics. 06 | Ahmed studies history. 14 | Alan is Kim's tutor. (a) More facts are to be included. Sam studies history and Nina is his tutor. Write the additional clauses to record these facts. 18 … 19 … [2] (b) Using the variable Student, the goal: studies(Student, history) returns Student = freya, ahmed, kim. Write the result returned by the goal: studies(Student, geography) Student = … [1] (c) Write the goal, using the variable X, to find all the students who have a tutor that teaches them. For example, Hua has Alan for a tutor and is also taught mathematics by Alan. [4]
2 Outline the functions of the Transport and Internet layers of the TCP/IP protocol suite. Transport layer ... Internet layer ... [5]
2 Lexical analysis and syntax analysis are stages in the compilation of a program. (a) Identify two other stages that take place during the compilation of a program. 1 ... 2 ... [2] (b) Outline the purpose of syntax analysis. [2]
3 Data can be sent over networks using either circuit switching or packet switching. Describe both methods of data transmission. Include a different advantage and disadvantage for each method. Circuit switching … Advantage … Disadvantage … Packet switching … Advantage … Disadvantage … [8]
3 The TCP/IP protocol suite has four layers. The application layer provides user services. (a) Identify two protocols used by this layer. Describe the use of each protocol. Protocol 1 … Description … Protocol 2 … Description … [4] (b) Identify two other layers of the TCP/IP protocol suite. Describe the function of each layer. Layer 1 … Description … Layer 2 … Description … [4]
3 (a) State what is meant by the term enumerated data type. [1] (b) State what is meant by the term pointer data type. [1] (c) The months of the year are: January, February, March, April, May, June, July, August, September, October, November and December. Write the pseudocode statement to define the data type Quarter1, to hold the names of the first three months of a year. [2] (d) The composite data type Pet is used to store data about the various pets of a group of students. It uses these fields: Field name | Data type. PetName | String. AnimalType | String. PetAge | Integer. PetGender | Char. OwnerName | String. (i) Write the pseudocode statement to set up a variable for one record of the composite data type Pet. [1] (ii) Write pseudocode to store the details of the following pet, in the variable you set up in part (d)(i). PetName | AnimalType | PetAge | PetGender | OwnerName. Tibbles | Cat | 8 | M | Jasmine Smith [3]
3 (a) Explain why a protocol is used in communication between computers. [2] (b) The TCP/IP protocol implementation can be viewed as a stack. Complete the diagram for the TCP/IP protocol stack. [A stack of four boxes from top to bottom: '' (empty) | Transport | '' (empty) | Link.] [2] (c) Describe the purpose of the IMAP protocol. [2]
4 Reduced Instruction Set Computers (RISC) and Complex Instruction Set Computers (CISC) are two types of processor. (a) Describe what is meant by RISC and CISC processors. RISC ... CISC ... [4] (b) Identify two differences between RISC and CISC processors. 1 ... 2 ... [2]
4 The following syntax diagrams show the syntax of: a variable; an unsigned integer; a letter; a digit; an operator; an assignment statement. [Syntax diagrams. variable: letter then unsigned integer. unsigned integer: digit, then an optional repeat loop of digit. letter: a choice of the circles X, Y or Z. digit: a choice of the circles 1, 2 or 3. operator: a choice of the circles +, − or *. assignment statement: variable, then the circle =, then variable, then operator, then variable.] (a) The following assignment statements are invalid. State the reason in each case. X1 = Y2 - 12 Reason … Z = Y12 + Z1 Reason … [2] (b) Complete the Backus-Naur Form (BNF) for the syntax diagrams shown. <letter> has been completed for you. <variable> ::= … <unsigned_integer> ::= … <letter> ::= X | Y | Z <digit> ::= … <operator> ::= … <assignment_statement> ::= … [5] (c) The syntax of an assignment statement is changed to allow each of the variables on the right-hand side of the '=' symbol to be either a variable or an unsigned integer. (i) Draw a syntax diagram for the new syntax of the assignment statement. [3] (ii) Write the Backus-Naur Form (BNF) for your syntax diagram. [3]
4 Draw one line to connect each stage of compilation to its most appropriate description. [diagram: left column Stage of compilation boxes: Lexical analysis, Syntax analysis, Code generation, Optimisation; right column Description boxes in order: minimising a program's execution time and memory requirement; converting an intermediate representation of source code into an executable form; converting a sequence of characters into a sequence of tokens; directly executing instructions written in a scripting language; using parsing algorithms to interpret the meaning of a sequence of tokens] [4]
4 A program to manage regular flight details at an airport requires some user-defined data types. (a) Write pseudocode statements to declare the enumerated data type Aircraft to hold data about the types of aircraft used for a flight. These types of aircraft are: C300, C350, D242, E757, X380. [2] (b) Write pseudocode statements to declare the composite data type Flight to hold data about flights to a specific destination. These include: flight number, which could be any combination of letters and numbers; destination; date of departure; type of aircraft used. Use the enumerated data type you created in part (a). [4] (c) (i) Write the pseudocode statement to set up a variable for one record of the composite data type Flight. [1] (ii) Write pseudocode to store the details of the following flight in the variable you set up in part (c)(i). Field | Data; flight number | XA782; destination | Cambridge; date of departure | 12/12/2022; type of aircraft used | C350. Use the field names you created in part (b). [3]
5 Part of a program's calculations uses the integer variables j, k, m, n and p. j = 3 k = 2 m = 10 n = (j + k) / (j - k) p = m * (m - j * k) (a) Write the Reverse Polish Notation (RPN) for the expression: (j + k) / (j - k) … [2] (b) (i) Show the changing contents of the stack as the value for p is calculated from its RPN expression: m m j k * - * [Seven empty stacks drawn side by side, each with four cells.] [4] (ii) Describe the main steps in the evaluation of this RPN expression using a stack. [4] (c) State two other uses of a stack. 1 … 2 … [2]
5 There are four basic categories of computer architecture. Single Instruction Single Data (SISD) is one architecture. Identify the three other categories of computer architecture. Describe each category that you identify. Architecture 1 … Description … Architecture 2 … Description … Architecture 3 … Description … [6]
5 (a) Write the infix expression in Reverse Polish Notation (RPN). a * b + b - d + 15 [1] (b) (i) Write the RPN expression in infix form. a b - c d + * a / [1] (ii) Evaluate your infix expression from part (b)(i) when a = 5, b = 10, c = 27 and d = 12. [1]
5 Describe what is meant by a virtual machine. Include in your answer two benefits and two drawbacks of using a virtual machine. Description ... Benefit 1 ... Benefit 2 ... Drawback 1 ... Drawback 2 ... [6]
Paper 3: quick facts
Which topics come up most in A Level Computer Science 9618 Paper 3?
The most-tagged topics in A Level Computer Science 9618 Paper 3 are Data Representation (56), System Software (A Level) (40) and Hardware and Virtual Machines (38), out of 258 past-paper questions from 2021-2026. These are archive counts, not a prediction, and a question can carry more than one topic.
Are the A Level Computer Science 9618 Paper 3 questions free?
60 of the 258 A Level Computer Science 9618 Paper 3 questions are free to practise. The other 198 need a plan for A Level Computer Science 9618, from $6 a month.
Do the A Level Computer Science 9618 Paper 3 questions have answers?
Yes. Each A Level Computer Science 9618 Paper 3 question shows the official mark scheme answer.