Computer Science (9608) · Oct/Nov 2017 · Question paper 31

Cambridge Computer Science (9608) question paper for paper 31, Oct/Nov 2017 — 9608/31/O/N/17, file 9608_w17_qp_31.pdf.

Advertisement
Loading the paper…
Text of this paper

www.dynamicpapers.com

Cambridge International Examinations
Cambridge International Advanced Subsidiary and Advanced Level

* 2 8 4 7 2 7 5 5 1 7 *

9608/31

COMPUTER SCIENCE

October/November 2017

Paper 3 Advanced Theory

1 hour 30 minutes
Candidates answer on the Question Paper.
No Additional Materials are required.
No calculators allowed.
READ THESE INSTRUCTIONS FIRST
Write your Centre number, candidate number and name in the spaces at the top of this page.
Write in dark blue or black pen.
You may use an HB pencil for any diagrams, graphs or rough working.
Do not use staples, paper clips, glue or correction fluid.
DO NOT WRITE IN ANY BARCODES.
Answer all questions.
No marks will be awarded for using brand names of software packages or hardware.
At the end of the examination, fasten all your work securely together.
The number of marks is given in brackets [ ] at the end of each question or part question.
The maximum number of marks is 75.

This document consists of 16 printed pages.
DC (NF/FC) 134870/3
© UCLES 2017

[Turn over

2
1

www.dynamicpapers.com

A Local Area Network (LAN) consists of three computers, one server and a switch. The LAN uses
a star topology.
(a) Complete the following diagram to show how the computers, the server and the switch could
be connected.

Switch
Server

Computer
A

Computer
B

Computer
C

[1]

(b) There are four statements in the following table. For each statement, place a tick (✓) in the
appropriate column to indicate whether it is true or false.
Statement

True

False

The server can send packets to Computer B and Computer C at
the same time.
The network software on each computer needs to include
collision detection and avoidance.
Computer B can read a packet sent from the server to
Computer C.
Computer A can send a packet to Computer B and at the same
time the server can be sending a packet to Computer C.
[4]
(c) The LAN shown in part (a) will be connected to the Internet.
(i)

A router will be attached to one of the devices on the LAN.
State the device used. Give a reason for your choice.
Device
Reason

[2]

© UCLES 2017

9608/31/O/N/17

3
(ii)

www.dynamicpapers.com

Explain why a router is required.

[2]

(iii)

After the router has been connected, Computer A sends several packets to an internet
web server.
Explain how the packets are transmitted from the router to the web server.

[3]

2

(a) The following diagram shows four descriptions and four types of computer architecture.
Draw lines to connect each description to the appropriate computer architecture.
Description

Computer architecture

Most parallel computer systems use
this architecture.

SIMD

Widely used to process 3D graphics in
video games.

A microprocessor is used to control a
washing machine.

There are a number of processing
units. Each processing unit executes
the same instruction but on different
data.
© UCLES 2017

9608/31/O/N/17

MIMD

MISD

SISD
[4]
[Turn over

4

www.dynamicpapers.com

(b) A computer has a single processor that contains four processing units.
Explain why this is not an example of a massively parallel computer.

[2]
(c) An application has previously executed on a single computer. The application will be
transferred onto a massively parallel computer.
The program code used in the application will need to be updated to ensure that the power of
the massively parallel computer is fully used.
Explain what changes will be required to the program code.

[2]
(d) Explain one of the hardware issues that will have to be overcome if a massively parallel
computer is to function successfully.

[2]

© UCLES 2017

9608/31/O/N/17

5
3

www.dynamicpapers.com

The following syntax diagrams for a particular programming language show the syntax of:
•
•
•
•
•
•

an assignment statement
a variable
an unsigned integer
a letter
an operator
a digit.

Assignment statement
Variable

:=

Variable

Variable
Letter

Digit

Unsigned integer

Operator

Unsigned
integer
Digit
1
2

Digit

3

Letter

4

Operator

5

A

+

B

–

6

C

*

7

^

8
9
0

© UCLES 2017

9608/31/O/N/17

[Turn over

6

www.dynamicpapers.com

(a) The following assignment statements are invalid.
Give the reason in each case.
(i)

C2 = C3 + 123
Reason:
[1]

(ii)

A3 := B1 – B2
Reason:
[1]

(iii)

A32 := A2 * 7
Reason:
[1]

(b) Complete the Backus-Naur Form (BNF) for the syntax diagrams shown.
<digit> has been done for you.
<assignment_statement> ::=

<variable> ::=

<unsigned_integer> ::=

<digit> ::= 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0
<letter> ::=

<operator> ::=

[6]

© UCLES 2017

9608/31/O/N/17

7

www.dynamicpapers.com

(c) The definition of <variable> is changed to allow:
one or two letters and
zero, one or two digits.

•
•

Draw an updated version of the syntax diagram for <variable>.
Variable
Letter

[2]
(d) The definition of <assignment_statement> is altered so that its syntax has
<unsigned_integer> replaced by <real>.
A real is defined to be:
•
•
•

at least one digit before a decimal point
a decimal point
at least one digit after a decimal point.

Give the BNF for the revised <assignment_statement> and <real>.
<assignment_statement> ::=

<real> ::=

[2]
4

The Secure Socket Layer (SSL) protocol and its successor, the Transport Layer Security (TLS)
protocol, are used in Internet communications between clients and servers.
(a) (i)

Define the term protocol.

[2]

© UCLES 2017

9608/31/O/N/17

[Turn over

8
(ii)

www.dynamicpapers.com

Explain the purpose of the TLS protocol.

[3]

(b) A handshake process has to take place before any exchange of data using the TLS protocol.
The handshake process establishes details about how the exchange of data will occur. Digital
certificates and keys are used.
The handshake process starts with:
•
•
•

the client sending some communication data to the server
the client asking the server to identify itself
the server sending its digital certificate including the public key.

Describe, in outline, the other steps in the handshake process.

[3]
(c) Give two applications where it would be appropriate to use the TLS protocol.
1

2

[2]

© UCLES 2017

9608/31/O/N/17

9
5

(a) (i)

www.dynamicpapers.com

Complete the truth table for this 2-input NAND gate:
A
0
0
1
1

A
X
B

B
0
1
0
1

X

[1]
(ii)

Complete the truth table for this 3-input NAND gate:
A
0
0
0
0
1
1
1
1

A
X

B
C

B
0
0
1
1
0
0
1
1

C
0
1
0
1
0
1
0
1

X

[1]

(b) A SR flip-flop is constructed using two NAND gates.
S

Q

Q

R
(i)

Complete the truth table for the SR flip-flop:

Initially
R changed to 1
S changed to 0
S changed to 1
S and R changed to 0

© UCLES 2017

S
1
1
0
1
0

9608/31/O/N/17

R
0
1
1
1
0

Q

Q

1

1

0

1

[3]

[Turn over

10
(ii)

www.dynamicpapers.com

The final row in the table in part b(i) shows that the output for both Q and Q is 1.
Explain why this is a problem.

[2]

(c) Another type of flip-flop is the JK flip-flop.
A JK flip-flop is constructed as follows:

J

Q

Clock

Q

K

(i)

J

0
0
0
0
1
1
1
1

K

© UCLES 2017

0
0
1
1
0
0
1
1

Complete this truth table for the JK flip-flop.

Clock

Working space

1
1
1
1
1
1
1
1

Initial
values

Q
1
0
1
0
1
0
1
0

9608/31/O/N/17

Q
0
1
0
1
0
1
0
1

Final
values

Q
1
0
0
0

Q
0
1
1
1

[4]

11
(ii)

www.dynamicpapers.com

Explain why the JK flip-flop is an improvement on the SR flip-flop.

[2]

(d) Explain the role of flip-flops in a computer.

[2]
6

A large warehouse stores goods that must be kept above a temperature of 15 degrees Celsius.
The warehouse has six temperature sensors which are each placed at a different location in the
warehouse.
A computer system is programmed to turn on appropriate heaters when one of the sensors is
below the minimum temperature.
(a) (i)

State the name given to the type of system described.
[1]

(ii)

Justify your answer to part (i).

[1]

(b) Sensors and heaters are two types of device used in this system.
State two other devices that are used. Justify your choice.
Device 1
Justification

Device 2
Justification

[4]

© UCLES 2017

9608/31/O/N/17

[Turn over

www.dynamicpapers.com

12

(c) The computer system stores the temperature readings for the six sensors in six 8-bit memory
locations.
Six of the bits in an 8-bit register, LOWREG, are used to indicate whether a particular reading
is below the minimum temperature. A value of 1 means the reading is below the minimum
temperature.
For example:
This pattern of bits in LOWREG shows that sensor 5, sensor 4 and sensor 1 have readings
below the minimum temperature.

Not used

Not used

6

5

4

3

2

1

0

1

1

0

0

1

The following table shows part of the instruction set for a processor which has one general
purpose register, the Accumulator (ACC), and an Index Register (IX).
Instruction
Op code
LDD

<address>

Direct addressing. Load the contents of the given address to
ACC.

LDR

#n

Immediate addressing. Load the number n to IX.

LDX

<address>

Indexed addressing. Form the address from <address> +
the contents of the index register. Copy the contents of this
calculated address to ACC.

STO

<address>

Store the contents of ACC at the given address.

INC

<register>

Add 1 to the contents of the register (ACC or IX).

ADD

<address>

Add the contents of the given address to the ACC.

OR

<address>

Bitwise OR operation of the contents of ACC with the contents
of address.

CMP

#n

Compare the contents of ACC with number n.

CMP

<address>

Compare the contents of ACC with the contents of <address>.

JMP

<address>

Jump to the given address.

JPE

<address>

Following a compare instruction, jump to <address> if the
compare was True.

<address>

Following a compare instruction, jump to <address> if the
content of ACC is greater than or equal to the number used in
the compare instruction.

JGE

© UCLES 2017

Explanation

Operand

9608/31/O/N/17

13

www.dynamicpapers.com

Question 6(c) continues on the next page.

© UCLES 2017

9608/31/O/N/17

[Turn over

14

www.dynamicpapers.com

Part of the assembly language code for updating LOWREG is:
Label

Operand

LOWTEMP:

15

LOWREG:

B00000000

COUNTER:

1

START:

LDR

#0

LOOP:

LDX

8000

CMP

LOWTEMP

JGE

TEMPOK

LDD

LOWREG

OR

COUNTER

STO

LOWREG

TEMPOK:

LDD

COUNTER

Q1:

CMP

#32

JPE

HEATON

ADD

COUNTER

STO

COUNTER

INC

IX

JMP

LOOP

LDD

LOWREG

HEATON:

© UCLES 2017

Op code

9608/31/O/N/17

www.dynamicpapers.com

15
(i)

The code uses six memory locations to store the temperature readings. It stores readings
for sensors 1 to 6 at addresses 8000 to 8005.
At a particular time, the memory locations store the following data.
8000

8001

8002

8003

8004

8005

17

14

15

15

16

14

Dry run the assembly language code starting at START and finishing when the loop has been
processed twice.
LOWTEMP
15

LOWREG
B00000000

COUNTER

ACC

IX

1

[4]

© UCLES 2017

9608/31/O/N/17

[Turn over

16
(ii)

www.dynamicpapers.com

Explain why the operand of the instruction labelled Q1 has the value 32.

[2]

(iii)

The code beginning at the instruction labelled HEATON must make the system turn on
the heaters in those areas that are below the minimum temperature.
Describe what this code will have to do.

[3]

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 International
Examinations Copyright Acknowledgements Booklet. This is produced for each series of examinations and is freely available to download at www.cie.org.uk after
the live examination series.
Cambridge International Examinations is part of the Cambridge Assessment Group. Cambridge Assessment is the brand name of University of Cambridge Local
Examinations Syndicate (UCLES), which is itself a department of the University of Cambridge.

© UCLES 2017

9608/31/O/N/17

Advertisement