Computer Science (9608) · Oct/Nov 2016 · Question paper 32

Cambridge Computer Science (9608) question paper for paper 32, Oct/Nov 2016 — 9608/32/O/N/16, file 9608_w16_qp_32.pdf.

Advertisement
Loading the paper…
Text of this paper

www.dynamicpapers.com

Cambridge International Examinations
Cambridge International Advanced Level

* 7 0 9 8 8 8 7 8 6 9 *

9608/32

COMPUTER SCIENCE
Paper 3 Advanced Theory

October/November 2016
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 12 printed pages.
DC (ST/JG) 116627/3
© UCLES 2016

[Turn over

www.dynamicpapers.com
2
1

In a particular computer system, real numbers are stored using floating-point representation with:
•

8 bits for the mantissa

•

8 bits for the exponent

•

two’s complement form for both mantissa and exponent

(a) Calculate the floating point representation of + 3.5 in this system. Show your working.
Mantissa

Exponent

[3]
(b) Calculate the floating-point representation of –3.5 in this system. Show your working.
Mantissa

Exponent

[3]

© UCLES 2016

9608/32/O/N/16

www.dynamicpapers.com
3
(c) Find the denary value for the following binary floating-point number. Show your working.
Mantissa

0

1

1

1

0

Exponent

0

0

0

0

0

0

0

0

1

0

0

[3]
(d) (i)

State whether the floating-point number given in part (c) is normalised or not normalised.
[1]

(ii)

Justify your answer given in part (d)(i).

[1]

(e) Give the binary two’s complement pattern for the negative number with the largest magnitude.
Mantissa

Exponent

[2]

© UCLES 2016

9608/32/O/N/16

[Turn over

www.dynamicpapers.com
4
2

There are four stages in the compilation of a program written in a high-level language.
(a) Four statements and four compilation stages are shown below.
Draw a line to link each statement to the correct compilation stage.
Statement

Compilation stage

This stage can improve the time
taken to execute the statement:
x = y + 0

Lexical analysis

This stage produces object
code.

Syntax analysis

This stage makes use of tree
data structures.

Code generation

This stage enters symbols in
the symbol table.

Optimisation
[4]

(b) Write the Reverse Polish Notation (RPN) for the following expression.
P + Q – R / S
[2]

© UCLES 2016

9608/32/O/N/16

www.dynamicpapers.com
5
(c) An interpreter is executing a program. The program uses the variables a, b, c and d.
The program contains an expression written in infix form. The interpreter converts the infix
expression to RPN. The RPN expression is:
b a * c d a + + The interpreter evaluates this RPN expression using a stack.
The current values of the variables are:
a = 2
(i)

b = 2

c = 1

d = 3

Show the changing contents of the stack as the interpreter evaluates the expression.
The first entry on the stack has been done for you.

2
[4]

(ii) Convert back to its original infix form, the RPN expression:
b a * c d a + +
[2]

(iii)

One advantage of using RPN is that the evaluation of an expression does not require
rules of precedence.
Explain this statement.

[2]

© UCLES 2016

9608/32/O/N/16

[Turn over

www.dynamicpapers.com
6
3

A computer operating system (OS) uses paging for memory management.
In paging:
•

main memory is divided into equal-size blocks, called page frames

•

each process that is executed is divided into blocks of the same size, called pages

•

each process has a page table that is used to manage the pages of this process

The following table is the incomplete page table for a process, Y.
Page

Presence
flag

Page frame address

1

1

221

2

1

222

3

0

0

4

0

0

5

1

542

6

0

0

249

0

0

Additional data

(a) State two facts about Page 5.
1

2
[2]
(b) Process Y executes the last instruction in Page 5. This instruction is not a branch instruction.
(i)

Explain the problem that now arises in the continued execution of process Y.

[2]

© UCLES 2016

9608/32/O/N/16

www.dynamicpapers.com
7
(ii)

Explain how interrupts help to solve the problem that you explained in part (b)(i).

[3]

(c) When the next instruction is not present in main memory, the OS must load its page into a
page frame. If all page frames are currently in use, the OS overwrites the contents of a page
frame with the required page.
The page that is to be replaced is determined by a page replacement algorithm.
One possible algorithm is to replace the page which has been in memory the shortest amount
of time.
(i)

Give the additional data that would need to be stored in the page table.

[1]

(ii)

Complete the table entry below to show what happens when Page 6 is swapped into
main memory. Include the data you have identified in part (c)(i) in the final column.
Assume that Page 1 is the one to be replaced.
In the final column, give an example of the data you have identified in part (c)(i).

Page

Presence
flag

Page frame address

Additional data

6

[3]

© UCLES 2016

9608/32/O/N/16

[Turn over

www.dynamicpapers.com
8
Process Y contains instructions that result in the execution of a loop, a very large number of
times. All instructions within the loop are in Page 1.
The loop contains a call to a procedure whose instructions are all in Page 3.
All page frames are currently in use. Page 1 is the page that has been in memory for the
shortest time.
(iii)

Explain what happens to Page 1 and Page 3, each time the loop is executed.

[3]

(iv)

Name the condition described in part (c)(iii).
[1]

4

Both clients and servers use the Secure Socket Layer (SSL) protocol and its successor, the
Transport Layer Security (TLS) protocol.
(a) (i)

What is a protocol?

[2]

(ii)

Name the client application used in this context.
[1]

(iii)

Name the server used in this context.
[1]

(iv)

Identify two problems that the SSL and TLS protocols can help to overcome.
1
2 [2]

© UCLES 2016

9608/32/O/N/16

www.dynamicpapers.com
9
(b) Before any application data is transferred between the client and the server, a handshake
process takes place. Part of this process is to agree the security parameters to be used.
Describe two of these security parameters.
1

2

[4]

(c) Name two applications of computer systems where it would be appropriate to use the SSL or
TLS protocol. These applications should be different from the ones you named in part (a)(ii)
and part (a)(iii).
1

2
[2]

© UCLES 2016

9608/32/O/N/16

[Turn over

www.dynamicpapers.com
10
5

(a) (i)

A half adder is a logic circuit with the following truth table.
Input

Output

X

Y

A

B

0

0

0

0

0

1

0

1

1

0

0

1

1

1

1

0

The following logic circuit is constructed.
P

X

Q

HALF ADDER
Y
B

A
J

X

A

HALF ADDER
Y
B

R

K

Complete the following truth table for this logic circuit.
Input

Working space

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

Output
J

K

[2]
(ii)

State the name given to this logic circuit.
[1]

© UCLES 2016

9608/32/O/N/16

www.dynamicpapers.com
11
(iii)

Name the labels usually given to J and K.
Label J
Label K
Explain why your answers are appropriate labels for these outputs.

[4]

(b) (i)

Write down the Boolean expression corresponding to the following logic circuit:

A
B
X

C
[2]

(ii) Use Boolean algebra to simplify the expression given in part (b)(i).
Show your working.

[4]

© UCLES 2016

9608/32/O/N/16

[Turn over

www.dynamicpapers.com
12
6

A Local Area Network (LAN) consists of four computers, one server and a switch. The LAN uses a
star topology.
(a) Complete the diagram below to show how to connect the devices.

Computer
A

Computer
B

Computer
C

Computer
D

Server

Switch
[2]

(b) The LAN uses packets to transfer data between devices.
Three statements are given below.
Tick (✓) to show whether each statement is true or false.
Statement

True

False

All packets must be routed via the server.
Computer B can read a copy of the packet sent
from the Server to Computer A.
No collisions are possible.
[3]
(c) In the same building as this star network, there is another star network.
(i)

Name the device needed to connect the two networks together.
[1]

(ii)

Explain how the device in part (c)(i) decides whether to transfer a packet from one
network to the other.

[2]

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.

© UCLES 2016

9608/32/O/N/16

Advertisement