Cambridge International AS & A Level: Computer Science 9618/32
Cambridge International AS & A Level: Computer Science 9618/32
Cambridge International AS & A Level: Computer Science 9618/32
* 9 7 4 0 2 6 7 5 7 0 *
1 hour 30 minutes
INSTRUCTIONS
● Answer all questions.
● Use a black or dark blue pen.
● Write your name, centre number and candidate number in the boxes at the top of the page.
● Write your answer to each question in the space provided.
● Do not use an erasable pen or correction fluid.
● Do not write on any bar codes.
● You may use an HB pencil for any diagrams, graphs or rough working.
● Calculators must not be used in this paper.
INFORMATION
● The total mark for this paper is 75.
● The number of marks for each question or part question is shown in brackets [ ].
● No marks will be awarded for using brand names of software packages or hardware.
DC (RW/CGW) 302516/4
© UCLES 2022 [Turn over
2
1 Normalised floating-point numbers are stored in a computer system using two’s complement for
both the mantissa and the exponent with:
(a) Write the largest positive two’s complement binary number that can be stored in this system.
Mantissa Exponent
[1]
(b) Calculate the denary value of the given binary floating-point number.
Show your working.
Mantissa Exponent
1 0 1 1 0 0 1 0 0 1 1 0 1 0 0 1
Working .....................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
Answer ......................................................................................................................................
[3]
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
............................................................................................................................................. [2]
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]
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
............................................................................................................................................. [2]
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
............................................................................................................................................. [2]
Transport
Link
[2]
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
............................................................................................................................................. [2]
© UCLES 2022 9618/32/O/N/22 [Turn over
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.
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
............................................................................................................................................. [2]
(b) Write pseudocode statements to declare the composite data type Flight to hold data about
flights to a specific destination. These include:
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
............................................................................................................................................. [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
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
..................................................................................................................................... [3]
Description .......................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
Benefit 1 ...........................................................................................................................................
..........................................................................................................................................................
Benefit 2 ...........................................................................................................................................
..........................................................................................................................................................
Drawback 1 ......................................................................................................................................
..........................................................................................................................................................
Drawback 2 ......................................................................................................................................
..........................................................................................................................................................
[6]
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
............................................................................................................................................. [2]
(b) Explain the process by which an organisation may acquire its digital certificate.
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
............................................................................................................................................. [4]
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
[4]
8 (a) Draw a logic circuit for an SR flip-flop and label the inputs.
.................
Q̄
.................
[4]
...................................................................................................................................................
............................................................................................................................................. [1]
(c) Simplify the following expression using Boolean algebra, including De Morgan’s laws.
Show your working.
(A.B).(A.C).(B.D)
Working .....................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
Answer ......................................................................................................................................
[3]
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
............................................................................................................................................. [3]
(b) Describe these scheduling routines and identify a benefit for each one.
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
[6]
Encapsulation ...........................................................................................................................
...................................................................................................................................................
Getter ........................................................................................................................................
...................................................................................................................................................
Setter ........................................................................................................................................
...................................................................................................................................................
[3]
(b) A school has a program written using OOP to maintain its staff and student records.
The object SubstituteTeacher allows the details of the school’s substitute teachers to be
stored. This includes their full name, telephone number and whether or not they are in school
today. For example:
Complete the diagram for the object SubstituteTeacher, including appropriate properties
and their getters and setters.
SubstituteTeacher
SubName : STRING
....................................................................................................
InSchool : BOOLEAN
....................................................................................................
SetTelephone(Tel : STRING)
....................................................................................................
GetSubName()
....................................................................................................
....................................................................................................
[3]
11 A simplified linked list is used to store the names of flowers in alphabetical order. It is implemented
using two 1D arrays:
HeadPointer indicates the index of the first flower name in the linked list.
HeadPointer 6
When the end of the linked list is reached, the next pointer has the value of 0.
(a) Several flower names have been deleted from the linked list. These are crossed out in the
following table.
Complete the table to show the new values of HeadPointer and NextPointer to keep the
remaining flower names in alphabetical order.
HeadPointer
(b) Complete the pseudocode algorithm so that it achieves the following when applied to the
arrays:
Pointer HeadPointer
Found 0
OUTPUT "Enter a flower name "
………………………………………………………………….
………………………………………………………………….
IF Flower[Pointer] = FlowerName THEN
Found Pointer
Pointer 0
ELSE
………………………………………………………………….
ENDIF
ENDWHILE
………………………………………………………………….
OUTPUT Flower[Found], " is found"
ELSE
………………………………………………………………….
ENDIF
[5]
(c) Explain how you could improve the simplified linked list structure.
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
............................................................................................................................................. [2]
BLANK PAGE
Permission to reproduce items where third-party owned material protected by copyright is included has been sought and cleared where possible. Every
reasonable effort has been made by the publisher (UCLES) to trace copyright holders, but if any items requiring clearance have unwittingly been included, the
publisher will be pleased to make amends at the earliest possible opportunity.
To avoid the issue of disclosure of answer-related information to candidates, all copyright acknowledgements are reproduced online in the Cambridge
Assessment International Education Copyright Acknowledgements Booklet. This is produced for each series of examinations and is freely available to download
at www.cambridgeinternational.org after the live examination series.
Cambridge Assessment International Education is part of Cambridge Assessment. Cambridge Assessment is the brand name of the University of Cambridge
Local Examinations Syndicate (UCLES), which is a department of the University of Cambridge.