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
Oct/Nov 2020 · 9608/31/O/N/20
Answer on paper, open each mark scheme and give yourself marks, then open the Summary.
Question text
1
In a particular computer system, real numbers are stored using floating-point representation with:
•
12 bits for the mantissa
•
4 bits for the exponent
•
two’s complement form for both mantissa and exponent.
(a) The following floating-point number stored is not normalised.
Calculate the denary value for the floating-point number. Show your working.
Mantissa
Exponent
0
0
0
0
1
1
0
0
0
0
0
0
0
1
0
1
Working …
…
…
…
Denary value …
[3]
(b) (i)
Normalise the floating-point number given in part (a).
Write your answer in the following boxes.
Mantissa
Exponent
[2]
(ii)
Describe one problem that can occur when floating-point numbers are not normalised.
…
…
… [2]
Question text
2
Data types can be classified as composite or non-composite.
A record is declared of type box using the following pseudocode.
TYPE size = (small, medium, large)
TYPE box
DECLARE volume : size
DECLARE price : REAL
DECLARE colour : STRING
ENDTYPE
DECLARE myBox : ARRAY [1:6] OF box
(a) (i)
Identify one composite and three non-composite data types used in the pseudocode.
Composite data type …
Non-composite data type 1 …
Non-composite data type 2 …
Non-composite data type 3 …
[4]
(ii)
Identify the data type in the pseudocode that is enumerated.
… [1]
(b) A box is red, with medium volume and a price of $10.99.
Write pseudocode to store the details of this box in the first element of the array.
…
…
…
…
… [3]
Question text
3
The use of the TCP/IP protocol suite is essential for successful communication over the Internet.
(a) (i)
Describe the TCP/IP protocol suite.
…
…
…
…
…
…
…
…
… [5]
(ii)
A group of over 100 students has produced a movie. The size of the movie file is very
large.
The students would like to use peer-to-peer file sharing to share this file with friends and
family.
Identify the most appropriate TCP/IP protocol for sharing this file over the Internet and
describe the way this protocol works.
Protocol …
Description …
…
…
…
…
…
…
…
[5]
(b) (i)
Files shared over the Internet are sent using packet switching or circuit switching
methods.
Identify and describe the most suitable method for the large movie file from part (a)(ii).
Method …
Description …
…
…
…
…
Question text
4
The following truth table represents a logic circuit with three inputs and two outputs.
INPUT
OUTPUT
A
B
C
X
Y
0
0
0
0
0
0
0
1
1
0
0
1
0
1
0
0
1
1
0
1
1
0
0
1
0
1
0
1
0
1
1
1
0
0
1
1
1
1
1
1
(a) Write the Boolean expressions for the truth table as sum-of-products.
X = …
…
Y = …
…
[4]
(b) Complete the Karnaugh Maps (K-maps) for the truth table.
OUTPUT X
OUTPUT Y
AB
AB
00
01
11
10
00
01
11
10
0
0
C
C
1
1
[2]
(c) The K-maps can be used to simplify one of the expressions in part (a).
(i)
Draw loop(s) around appropriate group(s) of 1s to produce an optimal sum-of-products
for the single output table that can be simplified in part (b).
[3]
(ii)
Write the simplified sum-of-products expressions for this output from part (c)(i).
… [3]
(d) Identify the common logic circuit given by the truth table in part (a). Give the use of each
output.
Logic circuit …
Use of X …
Use of Y …
[3]
Question text
5
Complete these statements about a virtual machine.
A virtual machine is … that emulates a
… computer system.
A virtual machine allows multiple … operating systems to run
on one computer using a … operating system.
[4]
Question text
6
Anita is studying computer science and she is confused about some of the computer security
terminology as some of the words are similar.
Anita wants to know the similarities (features that are the same) and differences (features that are
different) between some of the terms.
(a) Give the similarities and differences between a public key and a private key.
Similarities …
…
…
…
…
Differences …
…
…
…
…
[4]
(b) Give the similarities and differences between a digital certificate and a digital signature.
Similarities …
…
…
…
…
Differences …
…
…
…
…
[4]
(c) Give the similarities and differences between phishing and pharming.
Similarities …
…
…
…
Question text
7
A company has a number of lorries that deliver items around the country. The items in each lorry
are its load. Each lorry has a monitoring system that provides information to the driver about the
state of the load and other data from each trip.
•
Data is stored in three memory locations with addresses 801 to 803.
•
Location 801 contains the distance travelled in kilometres for the current trip, stored as a
binary integer.
•
Location 802 contains the quantity of fuel used in litres for the current trip, stored as a
fixed-point binary number with six places before the binary point and two places after the
binary point.
•
The four most significant bits of location 803 are flags used to identify problems with the load,
for example it is too heavy. A flag is set to 1 if there is a problem, or 0 if not.
The problems are:
•
Bit 7 – load too heavy
•
Bit 6 – load too high
•
Bit 5 – load unstable
•
Bit 4 – load not secured (risk of the load falling off)
•
Bits 0 to 3 are not used
(a) The current contents of addresses 801 to 803 are:
Most significant bit
Least significant bit
0
1
1
0
1
1
0
0
801
0
0
1
0
1
0
0
1
802
0
0
1
0
0
0
0
0
803
State the information that the current contents of addresses 801 to 803 will provide to the
driver.
…
…
…
… [3]
(b) A lorry has a load that is too heavy and is not secured. It has travelled 120 kilometres and
used 35.25 litres of fuel.
Complete the contents of the addresses to record this information.
801
802
803
[3]
(c) The following table shows the instructions for the lorry load monitoring system in assembly
language. There is one general purpose register, the Accumulator (ACC).
Table 7.1
Instruction
Explanation
Label
Op code
Operand
LDM #n
Load the number n to ACC
Load the contents of the location at the
LDD <address>
given address to ACC
Store the contents of ACC at the given
STO <address>
address
Bitwise AND operation of the contents of
AND #n
ACC with the operand
CMP #n
Compare the contents of ACC with number n
Following a compare instruction, jump to
JPE <address>
<address> or <label> if the compare was
True
JMP <address>
Jump to the given address or label
<label>:
<op code> <operand>
Labels an instruction
Note:
# denotes immediate addressing
B denotes a binary number, for example B01001010
& denotes a hexadecimal number, for example &4A
(i)
Write assembly language instructions to set the contents of addresses 801 and 802 to
zero, and set all four most significant bits of the contents of address 803 to one.
Use the instruction set from Table 7.1.
…
…
…
…
…
… [3]
(ii)
A program written