Computer Science (9608) · May/June 2017 · Question paper 32

Cambridge Computer Science (9608) question paper for paper 32, May/June 2017 — 9608/32/M/J/17, file 9608_s17_qp_32.pdf.

Advertisement
Loading the paper…
Text of this paper

www.dynamicpapers.com

Cambridge International Examinations
Cambridge International Advanced Subsidiary and Advanced Level

* 0 4 7 4 7 0 1 1 7 5 *

9608/32

COMPUTER SCIENCE

May/June 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 14 printed pages and 2 blank pages.
DC (ST/SW) 158024/4
© UCLES 2017

[Turn over

www.dynamicpapers.com

2
1

(a) Consider the following pseudocode user-defined data type:
TYPE MyContactDetail
DECLARE Name

: STRING

DECLARE HouseNumber : INTEGER
ENDTYPE
(i)

Write a pseudocode statement to declare a variable, NewFriend, of type
MyContactDetail.
[1]

(ii)

Write a pseudocode statement that assigns 129 to the HouseNumber of NewFriend.
[1]

(b) The user-defined data type MyContactDetail needs to be modified by:

•
•

adding a field called Area which can take three values, uptown, downtown or midtown
amending the field HouseNumber so that house numbers can only be in the range 1 to
499.

Write the updated version of MyContactDetail.

[3]
(c) A pointer is a variable that stores the address of a variable of a particular type.
Consider the pseudocode on page 3, which uses the following identifiers:
Identifier

© UCLES 2017

Data type

Description

IPointer

^INTEGER

pointer to an integer

Sum

INTEGER

an integer variable

MyInt1

INTEGER

an integer variable

MyInt2

INTEGER

an integer variable

9608/32/M/J/17

www.dynamicpapers.com

3
Sum
91
IPointer

@Sum
IPointer^

MyInt1
IPointer^

MyInt2

//
//
//
//
//
//
//

assigns the value 91 to the integer variable Sum
assigns to IPointer the address of the
integer variable Sum
assigns to variable MyInt1 the value at an
address pointed at by IPointer
assigns the value in the variable MyInt2 to
the memory location pointed at by IPointer

The four assignment statements are executed. The diagram shows the memory contents
after execution.
Variable

Memory
Address

Contents
...

5848
5847
IPointer

5846

4402

5845
...
4403
Sum

4402

33

4401
...
3428
MyInt1

3427

91

MyInt2

3426

33

3425
...

Use the diagram to state the current values of the following expressions:
(i)

IPointer [1]

(ii)

IPointer^ [1]

(iii)

@MyInt1 [1]

(iv)

IPointer^ = MyInt2 [1]

© UCLES 2017

9608/32/M/J/17

[Turn over

4

www.dynamicpapers.com

(d) Write pseudocode statements that will achieve the following:
(i)

Place the address of MyInt2 in IPointer.
[1]

(ii)

Assign the value 33 to the variable MyInt1.
[1]

(iii)

Copy the value in MyInt2 into the memory location currently pointed at by IPointer.
[1]

© UCLES 2017

9608/32/M/J/17

5
2

www.dynamicpapers.com

The following incomplete table shows descriptions and terms relating to malware.
(a) Complete the table with appropriate description and terms.
Description

Term

(i)

Malicious code is installed on a personal computer
so that the user is misdirected to a fraudulent web
site without their knowledge.

[1]

(ii)

An attempt to acquire sensitive information, often
for malicious reasons, by trying to deceive the user
through the contents of an email.

[1]

(iii)

Worm

[2]

(b) State two vulnerabilities that the malware in part (a)(i) or part (a)(ii) can exploit.
Vulnerability 1

Vulnerability 2

[2]

© UCLES 2017

9608/32/M/J/17

[Turn over

6

www.dynamicpapers.com

(c) Digital certificates are used in internet communications. A Certificate Authority (CA) is
responsible for issuing a digital certificate.
The digital certificate contains a digital signature produced by the CA.
(i)

Name three additional data items present in a digital certificate.
1
2
3
[3]

(ii)

Describe how the digital signature is produced by the CA.

[3]

(iii)

Give the reason for including a digital signature in the digital certificate.

[1]

3

A logic circuit is shown:
P

S

Q
R

(a) Write the Boolean algebraic expression corresponding to this logic circuit:
S = [4]

© UCLES 2017

9608/32/M/J/17

www.dynamicpapers.com

7
(b) Complete the truth table for this logic circuit:

(c) (i)

P

Q

R

0

0

0

0

0

1

0

1

0

0

1

1

1

0

0

1

0

1

1

1

0

1

1

1

Working space

S

[2]

Complete the Karnaugh Map (K-map) for the truth table in part (b).
PQ
00
R

01

11

10

0
1

[1]

The K-map can be used to simplify the function in part (a).
(ii)

Draw loop(s) around appropriate groups to produce an optimal sum-of-products.

(iii)

Write a simplified sum-of-products expression, using your answer to part (ii).

[1]

S = [1]
(d) One Boolean identity is:

(A + B) . C = A . C + B . C

Simplify the expression for S in part (a) to the expression for S in part (c)(iii).
You should use the given identity and De Morgan’s Laws.

[3]
© UCLES 2017
9608/32/M/J/17
[Turn over

8
4

www.dynamicpapers.com

(a) Three file organisation methods and two file access methods are shown below.
Draw lines to link each file organisation method to its appropriate file access method(s).
File organisation method

File access method

random

sequential

serial

direct

sequential
[4]
(b) An energy company supplies electricity to a large number of customers. Each customer has
a meter that records the amount of electricity used. Customers submit meter readings using
their online account.
The company’s computer system stores data about its customers.
This data includes:

•
•
•
•

account number
personal data (name, address, telephone number)
meter readings
username and encrypted password.

The computer system uses three files:

© UCLES 2017

File

Content

Use

A

Account number and meter readings
for the current month.

Each time a customer submits their
reading, a new record is added to the
file.

B

Customer’s personal data.

At the end of the month to create a
statement that shows the electricity
supplied and the total cost.

C

Usernames and encrypted passwords.

When customers log in to their
accounts to submit meter readings.

9608/32/M/J/17

9

www.dynamicpapers.com

For each of the files A, B and C, state an appropriate file organisation method for the use
given in the table.
All three file organisation methods must be different.
Justify your choice.
(i)

File A organisation
Justification

[3]

(ii)

File B organisation
Justification

[3]

(iii)

File C organisation
Justification

[3]

© UCLES 2017

9608/32/M/J/17

[Turn over

10
5

www.dynamicpapers.com

The TCP/IP protocol suite can be viewed as a stack with four layers.
(a) Complete the stack by inserting the names of the three missing layers.
Application layer

[3]
(b) BitTorrent is a protocol used at the Application layer for the exchange of data.
(i)

State the network model used with this protocol.
[1]

(ii)

State the use of BitTorrent.
[1]

(iii)

Explain how the exchange of data is achieved using BitTorrent.

[4]

© UCLES 2017

9608/32/M/J/17

11

www.dynamicpapers.com

(c) State two additional protocols that are also used at the Application layer for the exchange of
data.
For each protocol, give an example of an appropriate exchange of data.
Protocol 1
Example

Protocol 2
Example

[4]

© UCLES 2017

9608/32/M/J/17

[Turn over

12
6

www.dynamicpapers.com

A large office building has many floors. On each floor there are security sensors and security
cameras. There is the same number of sensors on each floor. The building has a single security
room.
The images from the security cameras are output on monitors (one monitor for each floor) placed
in the security room.
The data from the sensors are read and processed by a computer system. Sensor readings and
warning messages can be displayed on the monitors.
(a) (i)

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

(ii)

Explain your answer to part (i).

[1]

(iii)

State two sensors that could be used in this system.
Sensor 1
Sensor 2
[2]

(b) A software routine:

•
•
•

checks the readings from the sensors
outputs readings and warning messages to the monitors
loops continuously.

The routine uses the following pseudocode variables:
Identifier

Data type

Description

FloorCounter

INTEGER

Loop counter for number of floors

SensorCounter

INTEGER

Loop counter for number of sensors

NumberOfFloors

INTEGER

Stores the number of floors

NumberOfSensors

INTEGER

Stores the number of sensors

ForEver

BOOLEAN

Stores value that ensures continuous loop

© UCLES 2017

9608/32/M/J/17

13
(i)

www.dynamicpapers.com

Complete the following pseudocode algorithm for the routine.

01 ForEver
02 REPEAT
03
04

FOR FloorCounter

1 TO NumberOfFloors

FOR SensorCounter

1 TO

05

READ Sensor(SensorCounter)on Floor(FloorCounter)

06

IF Sensor value outside range

07

THEN

08

OUTPUT “Problem on Floor ”, FloorCounter

09

ENDIF

10

ENDFOR

11

ENDFOR

12

//

13

// Delay loop

14

// Delay loop

15

//

16 UNTIL
[3]
(ii)

A delay needs to be introduced before the loop is processed again.
Write a FOR loop, in pseudocode, to replace lines 13 and 14.

[1]

(iii)

Give a reason for this delay in the system.

[1]

© UCLES 2017

9608/32/M/J/17

[Turn over

14

www.dynamicpapers.com

(c) An alternative method of reading and processing sensor data is to use interrupts. Each sensor
is connected so that it can send an interrupt signal to the processor if its value changes.
On receipt of an interrupt signal, the processor carries out a number of steps as shown in the
following diagram.
Interrupt

1. Disable interrupts
2. Save current task

3. Identify source of
interrupt
4. Jump to Interrupt
Service Routine

5. Restore task
Return to task
(i)

6. Enable interrupts

State the purpose of step 3.

[1]

(ii)

Explain what happens at step 4.

[2]

© UCLES 2017

9608/32/M/J/17

15
BLANK PAGE

© UCLES 2017

9608/32/M/J/17

www.dynamicpapers.com

16

www.dynamicpapers.com

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 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/32/M/J/17

Advertisement