Past paper – A Level Computer Science (old syllabus, to 2021) (9608)
Cambridge International AS & A Level · 9608
Computer Science (old syllabus, to 2021) · Paper 31
May/June 2019 · 9608/31/M/J/19
Answer on paper, open each mark scheme and give yourself marks, then open the Summary.
Question text
1
In a computer system, real numbers are stored using normalised floating-point representation
with:
•
twelve bits for the mantissa
•
four bits for the exponent.
The mantissa and exponent are both in two’s complement form.
(a) Calculate the denary value for the following binary floating-point number.
Show your working.
Mantissa
Exponent
1
0
0
1
0
1
1
1
0
0
1
1
0
1
1
1
Working …
…
…
…
…
Answer …
[3]
(b) Calculate the normalised floating-point representation of +1.5625 in this system.
Show your working.
Working …
…
…
…
…
…
Mantissa
Exponent
[3]
(c) (i)
Write the largest positive number that can be stored as a normalised floating-point
number using this format.
Mantissa
Exponent
[2]
(ii)
Write the smallest non-zero positive number that can be stored as a normalised
floating-point number using this format.
Mantissa
Exponent
[2]
(d) The developer of a new programming language decides that all real numbers will now be
stored using 20-bit normalised floating-point representation. She must decide how many bits
to use for the mantissa and how many bits for the exponent.
Explain the trade-off between using either a large number of bits for the mantissa, or a large
number of bits for the exponent.
…
…
…
…
…
… [3]
Question text
2
Cables connect the computers in a university admissions department in a star topology. The
server room contains the server and printer for the employees to use. The department has three
employees. Each employee has a computer connected to the star network.
(a) (i)
Draw a diagram to show this topology.
[3]
(ii)
Explain the benefits to the admissions department of using a star topology.
…
…
…
…
…
…
…
…
…
… [4]
(b) Each department of the university has its own network. All the department networks connect
to the university’s main Local Area Network (LAN). The LAN has a bus topology and uses the
CSMA/CD protocol.
Describe the CSMA/CD protocol.
…
…
…
…
…
…
… [3]
(c) Explain how the following devices are used to support the university LAN.
(i)
Router …
…
…
… [2]
(ii)
Network Interface Card (NIC) …
…
…
Question text
3
(a) The following logic circuit can be simplified to use only one gate.
A
X
B
Give the name of this single gate.
… [1]
(b) (i)
Complete the truth table for the logic circuit.
A
X
B
Y
Working space
A
B
X
Y
0
0
0
1
1
0
1
1
[2]
(ii)
Give the name of the logic circuit that has this truth table.
… [1]
(iii)
Give the uses for outputs X and Y.
X …
Y …
[2]
(c) Consider the following Boolean algebraic expression:
A . B . C . D + A . B . C . D + A . B . C . D + A . B . C . D + A . B . C . D
Use Boolean algebra to simplify the expression. Show your working.
Working
…
…
…
…
…
…
…
…
…
Simplified expression
… [5]
Question text
4
A compiler uses a keyword table and a symbol table. Part of the keyword table is shown.
•
Tokens for keywords are shown in hexadecimal.
•
All of the keyword tokens are in the range 00 – 5F.
Keyword
Token
01
+
02
=
03
<>
04
IF
4A
THEN
4B
ENDIF
4C
ELSE
4D
REPEAT
4E
UNTIL
4F
TO
50
INPUT
51
OUTPUT
52
ENDFOR
53
Entries in the symbol table are allocated tokens. These values start from 60 (hexadecimal).
Study the following piece of pseudocode.
0
Counter
INPUT Password
REPEAT
IF Password <> "Cambridge"
THEN
INPUT Password
ENDIF
Counter + 1
Counter
UNTIL Password = "Cambridge"
OUTPUT Counter
(a) Complete the symbol table to show its contents after the lexical analysis stage.
Token
Symbol
Value
Type
60
Variable
Counter
[3]
(b) The output from the lexical analysis stage is stored in the following table. Each cell stores one
byte of the output.
Complete the output from the lexical analysis using the keyword table and your answer to
part (a).
60 01
[2]
(c) The following table shows assembly language instructions for a processor which has one
general purpose register, the Accumulator (ACC).
Instruction
Explanation
Op code
Operand
Direct addressing. Load the contents of the location at the given
LDD
<address>
address to ACC
Add the contents of the given address to the ACC
ADD
<address>
Store the contents of ACC at the given address
STO
<address>
After the syntax analysis is completed successfully, the compiler generates object code.
The following lines of high level language code are compiled.
X = X + Y
Z = Z + X
The compilation produces the assembly language code as follows:
LDD
236
ADD
237
STO
236
LDD
238
ADD
236
STO
238
(i)
The final stage in the compilation process that follows this code generation stage is code
optimisation.
Rewrite the equivalent code after optimisation.
…
…
…
…
…
… [3]
(ii)
Explain why code optimisation is necessary.
…
…
…
… [2]
Question text
5
(a) Wiktor is an employee of a travel agent. He uses asymmetric encryption to send confidential
information to his manager.
Fill in the spaces with an appropriate term to complete the descriptions.
Asymmetric encryption uses different … . for encrypting and decrypting
data. When Wiktor sends a message to his manager, the message is encrypted into
… . using his manager’s … . key. When the
manager receives the message, it is decrypted using her … . key.
When the manager replies, the message is encrypted using Wiktor’s … .
key, and when Wiktor receives the message, it is decrypted into … .
using his … . key.
[5]
(b) When customers pay for their travel booking online, a secure connection is established using
Secure Socket Layer (SSL).
Explain how the customer’s browser and the server used to collect the payment will establish
a secure connection.
…
…
…
…
…
…
…
…
…
…
…
… [6]
(c) The manager is concerned about the threat of malware to the company computer systems.
Name two types of malware. State what the company should do to help prevent the effect of
the malware.
The two methods of prevention must be different.
Malware type 1 …
Prevention …
…
Malware type 2 …
Prevention …
…
[4]
Question text
6
Monitoring and control systems have many different applications.
(a) Explain the importance of feedback in a control system.
…
…
…
…
…
… [3]
(b) An indoor swimming pool is to be kept at a constant temperature of 28 degrees.
Describe the use of feedback in this control system.
…
…
…
…
…
…
…
… [4]
(c) Give one example of a monitoring system. Explain why this is a monitoring system.
Monitoring system …
…
Explanation …
…
…
…
[3]
Permission to reproduce items where third-party owned material protected by copyright is included has been sought and cleared where possible. Every
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 the Cambridge Assessment Group