Computer Science (9608) · Oct/Nov 2020 · Question paper 31
Cambridge Computer Science (9608) question paper for paper 31, Oct/Nov 2020 — 9608/31/O/N/20, file 9608_w20_qp_31.pdf.
Text of this paper
www.dynamicpapers.com
Cambridge International AS & A Level
* 1 7 1 0 8 1 4 6 3 2 *
COMPUTER SCIENCE
9608/31
Paper 3 Advanced Theory
October/November 2020
1 hour 30 minutes
You must answer on the question paper.
No additional materials are needed.
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.
This document has 12 pages. Blank pages are indicated.
DC (LK) 188581/3
© UCLES 2020
[Turn over
www.dynamicpapers.com
2
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
0
0
0
0
1
1
0
Exponent
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]
© UCLES 2020
9608/31/O/N/20
3
2
www.dynamicpapers.com
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]
© UCLES 2020
9608/31/O/N/20
[Turn over
4
3
www.dynamicpapers.com
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]
© UCLES 2020
9608/31/O/N/20
5
(b) (i)
www.dynamicpapers.com
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
[4]
(ii)
State one benefit and one drawback of the method you identified in part (b)(i).
Benefit
Drawback
[2]
© UCLES 2020
9608/31/O/N/20
[Turn over
www.dynamicpapers.com
6
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
AB
00
C
0
1
01
11
OUTPUT Y
AB
10
00
C
01
11
10
0
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]
© UCLES 2020
9608/31/O/N/20
7
www.dynamicpapers.com
(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]
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.
6
[4]
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]
© UCLES 2020
9608/31/O/N/20
[Turn over
8
www.dynamicpapers.com
(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
Differences
[4]
© UCLES 2020
9608/31/O/N/20
9
www.dynamicpapers.com
BLANK PAGE
© UCLES 2020
9608/31/O/N/20
[Turn over
www.dynamicpapers.com
10
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
801
0
1
1
0
1
1
0
0
802
0
0
1
0
1
0
0
1
803
0
0
1
0
0
0
0
0
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]
© UCLES 2020
9608/31/O/N/20
11
www.dynamicpapers.com
(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
Label
<label>:
Op code
Explanation
Operand
LDM #n
Load the number n to ACC
LDD <address>
Load the contents of the location at the
given address to ACC
STO <address>
Store the contents of ACC at the given
address
AND #n
Bitwise AND operation of the contents of
ACC with the operand
CMP #n
Compare the contents of ACC with number n
JPE <address>
Following a compare instruction, jump to
<address> or <label> if the compare was
True
JMP <address>
Jump to the given address or 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]
© UCLES 2020
9608/31/O/N/20
[Turn over
www.dynamicpapers.com
12
(ii)
A program written in assembly language, continuously checks the flags. If a flag is set,
the program jumps to the error-handling routine at the specified label. For example, if
the load is too heavy, the program jumps to the error-handling routine with the label
TOOHEAVY. The error-handling routine instructions have not been provided.
A programmer has written most of the instructions for the program in the following table.
There are four missing operands.
Complete the assembly language program by writing the four missing operands.
Label
CHECKLOAD:
Op code
Operand
LDD 803
AND &F0
STO TEMP
AND &80
CMP &80
JPE TOOHEAVY
LDD TEMP
AND &40
CMP
JPE TOOHIGH
LDD TEMP
AND
CMP &20
JPE UNSTABLE
LDD
AND &10
CMP &10
JPE NOTSECURED
JMP
TEMP:
[4]
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 the Cambridge Assessment Group. Cambridge Assessment is the brand name of the University of
Cambridge Local Examinations Syndicate (UCLES), which itself is a department of the University of Cambridge.
© UCLES 2020
9608/31/O/N/20