Data representation: user-defined types, files and floating point – A Level Computer Science (9618)

60 questions · page 1 of 4

0 / 0Answer a question to start your score.
Quick quiz (10)Saved 0
Advertisement
1
9618/31/M/J/26 · Question 1May/June 2026Paper 315 marks
Loading question…
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

2
9618/31/M/J/26 · Question 2May/June 2026Paper 316 marks
Loading question…
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

3
9618/31/M/J/26 · Question 3May/June 2026Paper 316 marks
Loading question…
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

Advertisement
4
9618/32/M/J/26 · Question 1May/June 2026Paper 325 marks
Loading question…
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]

5
9618/32/M/J/26 · Question 3May/June 2026Paper 325 marks
Loading question…
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

6
9618/32/M/J/26 · Question 4May/June 2026Paper 326 marks
Loading question…
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]

7
9618/33/M/J/26 · Question 1May/June 2026Paper 335 marks
Loading question…
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]

8
9618/33/M/J/26 · Question 3May/June 2026Paper 336 marks
Loading question…
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

Advertisement
9
9618/33/M/J/26 · Question 5May/June 2026Paper 337 marks
Loading question…
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

10
9618/31/O/N/25 · Question 1Oct/Nov 2025Paper 316 marks
Loading question…
Question text

1
The composite record data type, ClubMember, is defined in pseudocode as:
TYPE ClubMember
DECLARE Code : INTEGER
DECLARE LastName : STRING
DECLARE FirstName : STRING
DECLARE Telephone : STRING
DECLARE JoinDate : DATE
DECLARE Fees : REAL
DECLARE FeesPaid : BOOLEAN
ENDTYPE
(a) (i)
Write the pseudocode statement to set up a variable for one record of the composite
data type, ClubMember.
…
… [1]
(ii)
Write the pseudocode statements to assign the following values to the variable set up in
part (a)(i):
•
984632 to Code
•
TRUE to FeesPaid
…
…
…
… [2]
(b) An enumerated data type, Activity, is required, so that a new field, Choice, can be added
to the composite data type, ClubMember, to allow members to choose an activity.
(i)
Write the pseudocode statement for the type declaration of Activity to hold the
names of the available activities:
Badminton, Football, Golf, Snooker, Swimming, Tennis.
…
…
…
… [2]
(ii)
Write the new pseudocode statement required to update the declaration of Choice in
the definition of ClubMember.
…
… [1]
ĬÕú¾Ġ´íÈõÏĪÅĊàù¸þ×

11
9618/31/O/N/25 · Question 2Oct/Nov 2025Paper 316 marks
Loading question…
Question text

2
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) Write the normalised floating‑point representation of the following positive binary number
using this system.
0.00000001110101101
Mantissa
Exponent
[2]
(b) Calculate the normalised binary floating‑point representation of – 76.1875 in this system.
Show your working.
Mantissa
Exponent
Working …
…
…
…
…
…
…
…
[4]
Ĭ×ú¾Ġ´íÈõÏĪÅĊàû¸þ×

12
9618/32/O/N/25 · Question 1Oct/Nov 2025Paper 326 marks
Loading question…
Question text

1
The composite data type, Car, is defined in pseudocode as:
TYPE Car
DECLARE
RegNumber : STRING
DECLARE
Make : STRING
DECLARE
Model : STRING
DECLARE
BodyStyle : STRING
DECLARE
Colour : STRING
DECLARE
IntoStock : DATE
DECLARE
Price : REAL
ENDTYPE
(a) (i)
Write the pseudocode statement to set up a variable for one record of the composite
data type, Car.
…
… [1]
(ii)
Write the pseudocode statements to assign the following values to the variable set up in
part (a)(i):
•
"Blue" to Colour
•
21/10/2025 to IntoStock
…
…
…
… [2]
(b) The data type for BodyStyle is changed to an enumerated type, Body.
(i)
Write the pseudocode statement for the type declaration of Body to hold the names of
the available choices:
Convertible, Hatchback, Saloon, SUV
…
…
…
… [2]
(ii)
Write the new pseudocode statement required to update the declaration of BodyStyle
in the definition of Car.
…
… [1]
ĬÍĊ®Ġ´íÈõÏĪÅĊÞù¸þ×

13
9618/32/O/N/25 · Question 2Oct/Nov 2025Paper 326 marks
Loading question…
Question text

2
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 denary value of the given normalised binary floating-point number.
Show your working.
Mantissa
Exponent
0
1
1
1
1
0
0
1
0
1
0
0
1
0
1
1
Working …
…
…
…
…
Denary value …
[3]
(b) Calculate the normalised binary floating-point representation of +26.6875 in this system.
Show your working.
Mantissa
Exponent
Working …
…
…
…
…
…
[3]
ĬÏĊ®Ġ´íÈõÏĪÅĊÞû¸þ×

Advertisement
14
9618/33/O/N/25 · Question 1Oct/Nov 2025Paper 338 marks
Loading question…
Question text

1
(a) An enumerated data type, Spectrum, is required to hold the names of colours.
(i)
Write the pseudocode statement for the type declaration of Spectrum to hold the
names of the colours available:
Red, Orange, Yellow, Green, Blue, Indigo, Violet.
…
… [2]
(ii)
Identify two characteristics of the list of values given in an enumerated data type
declaration.
1 …
…
2 …
…
[2]
(b) ColourData is a composite data type to store definitions of colours.
Write pseudocode statements to declare ColourData to hold the following fields:
Field
Example data
XYZ12345
ColourCode
Red
Colour
650
Wavelength
4.62
Frequency
Yes
PrimaryColour
Use the most appropriate data type in each case, including the enumerated data type
Spectrum from part a(i).
…
…
…
…
…
…
…
… [4]
ĬÕú¾Ġ´íÈõÏĪÅĊÝû·þ×

15
9618/33/O/N/25 · Question 2Oct/Nov 2025Paper 336 marks
Loading question…
Question text

2
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
•
2 bytes in total.
(a) Outline the effect of changing the number of bits used to store the mantissa to 10 bits, in this
system.
…
…
…
…
…
… [3]
(b) Describe one example of a situation that could cause an overflow to occur and the
consequences of such an overflow.
…
…
…
…
…
… [3]

Advertisement