Data representation: user-defined types, files and floating point – A Level Computer Science (9618)
31 questions · page 1 of 3 · Clear filters
Question text
1
(a) A record data type is a type of composite user‑defined data type.
Identify two other types of composite user‑defined data types.
1 …
2 …
[2]
(b) (i)
A pointer data type is a non‑composite user‑defined data type.
State the purpose of a pointer user‑defined data type.
…
… [1]
(ii)
Write the pseudocode statement to declare a pointer data type called Word to be used
with STRING data.
…
…
…
… [2]
© Cambridge University Press & Assessment 2026
Question text
2
(a) Random file organisation can be used with a database management system.
State one other example of where random file organisation could be used.
…
… [1]
(b) Describe how records are organised in random files.
…
…
…
… [2]
(c) Outline the process that would be used to find a record in a random file.
…
…
…
…
…
… [3]
© Cambridge University Press & Assessment 2026
Question text
3
Numbers are stored in a computer system 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) Calculate the normalised binary floating‑point representation of –10.8125 in this system.
Show your working.
mantissa
exponent
working …
…
…
…
…
…
[3]
(b) Calculate the denary value of the given normalised binary floating‑point number.
Show your working.
mantissa
exponent
1
0
1
0
0
0
0
1
1
1
0
0
0
1
1
1
working …
…
…
…
…
denary value …
[3]
© Cambridge University Press & Assessment 2026
Question text
1
A user-defined data type is required to store the types of animals in a children’s zoo.
(a) Write the pseudocode statement to declare a non-composite data type, Animals, that holds
the following data:
Alpaca, Chicken, Donkey, Duck, Goat, Pony, Sheep
…
…
…
… [2]
(b) (i)
State the type of user-defined non-composite data type created in 1(a).
… [1]
(ii)
Give two features that would apply to any list used in the data type in 1(a).
1 …
…
2 …
…
[2]
Question text
3
Numbers are stored in a computer system using binary floating-point representation with:
•
12 bits for the mantissa
•
4 bits for the exponent
•
two’s complement form for both the mantissa and the exponent.
(a) Calculate the denary value of the given normalised binary floating-point number.
Show your working.
mantissa
exponent
1
0
1
1
0
1
0
0
0
1
1
0
0
1
1
0
working …
…
…
…
…
denary value …
[3]
(b) Describe one example of a situation that could cause underflow to occur and the
consequences of this underflow.
…
…
…
… [2]
© Cambridge University Press & Assessment 2026
Question text
4
(a) State one example of where sequential file organisation could be used.
…
… [1]
(b) Describe how records are organised in sequential files.
…
…
…
… [2]
(c) Outline the process of sequential file access to find a record in a sequential file.
…
…
…
…
…
… [3]
Question text
1
(a) User‑defined data types may be created by programmers when writing software.
Explain the reasons why user‑defined data types are needed.
…
…
…
…
…
… [3]
(b) Write the pseudocode statement to declare a non‑composite data type, Fibonacci, that
holds the following numbers:
0, 1, 2, 3, 5, 8, 13, 21
…
…
…
… [2]
Question text
3
(a) State one example of where serial file organisation could be used.
…
… [1]
(b) Describe how records are organised in serial files.
…
…
…
… [2]
(c) Outline the process that is used to find a record in a serial file.
…
…
…
…
…
… [3]
© Cambridge University Press & Assessment 2026
Question text
5
Numbers are stored in a computer system using binary floating‑point representation with:
•
12 bits for the mantissa
•
4 bits for the exponent
•
two’s complement form for both the mantissa and the exponent.
(a) Calculate the normalised binary floating‑point representation of –18.5625 in this system.
Show your working.
mantissa
exponent
working …
…
…
…
…
…
[4]
(b) Explain the problem that would occur if the two binary floating‑point numbers representing
the denary numbers 91.5 and 123.25 were added together and the result stored in the
given system.
…
…
…
…
…
… [3]
© Cambridge University Press & Assessment 2026
Question text
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]
ĬÍĊ®Ġ´íÈõÏĪÅĊàù·þ×
Question text
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
Mantissa
Exponent
[2]
(b) Calculate the normalised binary floating-point representation of –25.3125 in this system.
Show your working.
Mantissa
Exponent
Working …
…
…
…
…
…
…
…
[4]
ĬÏĊ®Ġ´íÈõÏĪÅĊàû·þ×
Question text
1
Data types can be defined using pseudocode.
The composite record data type, Departure, is used to represent flights from Cambridge Airport
and is defined in pseudocode as:
TYPE Departure
DECLARE FlightNumber : STRING
DECLARE Destination : STRING
DECLARE FlightDate : DATE
DECLARE Gate : STRING
DECLARE Airline : STRING
ENDTYPE
A variable, Flight1, is declared in pseudocode as:
DECLARE Flight1 : Departure
(a) Write pseudocode to store the following details to Flight1:
Field
Data
FlightNumber
SB2789
Destination
Dublin
FlightDate
30/07/2025
Gate
N03
Airline
Cambridge Airways
…
…
…
…
…
… [3]
(b) The data type for Gate is changed to an enumerated data type, GateID.
(i)
Write a pseudocode statement to declare GateID to hold the identity codes for the
airport gates:
N01, N02, N03, W01, W02, W03, W04
…
… [2]
(ii)
Write the new pseudocode statement required to replace the declaration of Gate in
Departure.
… [1]
ĬÍĊ®Ġ´íÈõÏĪÅĊÞû·þ×
Question text
2
Numbers are stored in a computer using binary floating-point representation with:
•
12 bits for the mantissa
•
4 bits for the exponent
•
two’s complement form for both the mantissa and the exponent.
(a) Calculate the normalised binary floating-point representation of +124.4375 in this system.
Show your working.
Mantissa
Exponent
Working …
…
…
…
…
…
[3]
(b) Calculate the denary value of the following normalised binary floating-point number.
Show your working.
Mantissa
Exponent
1
0
1
0
0
0
1
0
1
0
1
1
0
1
1
0
Working …
…
…
…
…
Denary value …
[3]
ĬÏĊ®Ġ´íÈõÏĪÅĊÞù·þ×
Question text
1
A programmer is writing a program to manage a video library. They require a user-defined data
type.
(a) 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.
…
…
…
…
…
…
…
… [4]
(b) Identify one field in VideoLibrary that could be an efficient enumerated data type and give
a reason for your choice.
Field …
…
Reason …
…
[2]
ĬÍĊ®Ġ´íÈõÏĪÅĊÝú·þ×
Question text
2
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.
(a) 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 …
[2]
(b) Calculate the normalised binary floating-point representation of –3.59375 in this system.
Show your working.
Mantissa
Exponent
Working …
…
…
…
…
…
…
…
[4]
ĬÏĊ®Ġ´íÈõÏĪÅĊÝü·þ×