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

10 questions

0 / 0Answer a question to start your score.
New quizSaved 0

Quick quiz: 10 random questions from this topic. Answer them all, then open the Summary.

Advertisement
1
9618/32/O/N/24 · Question 2Oct/Nov 2024Paper 323 marks
Loading question…
Question text

2
(a) Describe serial file organisation as a method of storing data records in a file.
…
…
…
… [2]
(b) State one example of a use for serial file organisation.
…
… [1]
ĬÍĊ®Ġ´íÈõÏĪÅĊÞû·þ×

2
9618/31/M/J/23 · Question 4May/June 2023Paper 314 marks
Loading question…
Question text

4
Two descriptions of user-defined data types are given.
Give appropriate type declaration statements for each, including appropriate names.
(a) A data type to hold a set of prime numbers below 20. These prime numbers are:
2, 3, 5, 7, 11, 13, 17, 19
…
…
…
… [2]
(b) A data type to point to a day in the week, for example Monday.
…
…
…
… [2]

3
9618/32/M/J/24 · Question 3May/June 2024Paper 327 marks
Loading question…
Question text

3
(a) Explain what is meant by the term non-composite data type and give an example of a
non-composite data type.
…
…
…
…
…
Example …
[3]
(b) Write pseudocode statements to declare the set data type EvenNumbers to hold this set of
even numbers between 2 and 12:
2, 4, 6, 8, 10, 12
…
…
…
…
…
…
…
… [4]

Advertisement
4
9618/33/M/J/25 · Question 2May/June 2025Paper 336 marks
Loading question…
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]
ĬÏĊ®Ġ´íÈõÏĪÅĊÝü·þ×

5
9618/31/M/J/24 · Question 3May/June 2024Paper 317 marks
Loading question…
Question text

3
(a) Explain what is meant by non-composite and composite data types.
…
…
…
…
…
… [3]
(b) Write pseudocode statements to declare the record data type FootballClub to hold data
about football clubs in a league, to include:
•
name of team
•
date team joined the league
•
main telephone number
•
name of the manager
•
number of members
•
current position in the league.
…
…
…
…
…
…
…
…
…
… [4]

6
9618/33/M/J/25 · Question 1May/June 2025Paper 336 marks
Loading question…
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]
ĬÍĊ®Ġ´íÈõÏĪÅĊÝú·þ×

7
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]

8
9618/32/O/N/24 · Question 4Oct/Nov 2024Paper 326 marks
Loading question…
Question text

4
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 denary value of the given normalised binary floating‑point number.
Show your working.
Mantissa
Exponent
1
0
0
0
1
1
1
0
1
1
1
0
1
1
1
0
Working …
…
…
Answer …
[2]
(b) Calculate the normalised binary floating‑point representation of – 49.1875 in this system.
Show your working.
Mantissa
Exponent
Working …
…
…
…
…
…
…
…
[4]
ĬÍĊ®Ġ´íÈõÏĪÅĊàû·Ā×

Advertisement
9
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]
ĬÏĊ®Ġ´íÈõÏĪÅĊÞû¸þ×

10
9618/32/M/J/24 · Question 1May/June 2024Paper 325 marks
Loading question…
Question text

1
(a) Describe the effect of changing the allocation of bits used for the mantissa and for the
exponent in a floating-point number with a fixed total number of bits.
…
…
…
… [2]
(b) Real numbers are stored in a computer, using floating-point representation with:
•
12 bits for the mantissa
•
4 bits for the exponent
•
two’s complement form for both the mantissa and exponent.
Calculate the normalised floating-point representation of +54.8125 in this system.
Show your working.
Mantissa
Exponent
Working …
…
…
…
…
… [3]

Advertisement