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

Cambridge Computer Science (9608) question paper for paper 32, Oct/Nov 2018 — 9608/32/O/N/18, file 9608_w18_qp_32.pdf.

Advertisement
Loading the paper…
Text of this paper

www.dynamicpapers.com

Cambridge International Examinations
Cambridge International Advanced Subsidiary and Advanced Level

* 7 8 2 5 2 0 0 9 7 3 *

9608/32

COMPUTER SCIENCE
Paper 3 Advanced Theory

October/November 2018
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 13 printed pages and 3 blank pages.
DC (RW/CT) 150986/3
© UCLES 2018

[Turn over

www.dynamicpapers.com

2
1

(a) A computer system uses floating-point representation to store real numbers. The floating-point
numbers have:

•
•

8 bits for the mantissa
8 bits for the exponent

The mantissa and exponent are both in two’s complement form.
(i)

Calculate the denary value of the following floating-point number. It is not in normalised
form.
Mantissa
0

0

1

0

1

Exponent
0

1

0

0

0

0

0

0

1

0

1

Show your working.
Working

Answer
[3]
(ii)

Convert the denary number + 7.5 into a normalised floating-point number.
Show your working.
Mantissa

Exponent

Working

[3]

© UCLES 2018

9608/32/O/N/18

www.dynamicpapers.com

3
(iii)

Convert the denary number − 7.5 into a normalised floating-point number.
Show your working.
Mantissa

Exponent

Working

[3]
(b) A normalised floating-point number is shown.
Mantissa
0
(i)

1

1

1

1

Exponent
1

1

1

0

1

1

1

1

1

1

1

State the significance of this binary number.

[1]

(ii)

State what will happen if a positive number is added to this number.

[1]

© UCLES 2018

9608/32/O/N/18

[Turn over

4
2

www.dynamicpapers.com

(a) A network can be set up using a star topology.
Give three features of a star topology.
1

2

3

[3]
(b) (i)

Describe what is meant by circuit switching.

[2]

(ii)

The table shows statements that relate to circuit switching, packet switching or both.
Tick (✓) one or more boxes in each row to show whether the statement applies to circuit
switching, packet switching or both.
Statements

Circuit switching

Packet switching

Shares bandwidth
Data may arrive out of order
Data can be corrupted
Data are less likely to get lost
[4]

© UCLES 2018

9608/32/O/N/18

5
3

www.dynamicpapers.com

(a) Consider the following Boolean expression.
A.B.C+A.B.C+A.B.C
Use Boolean algebra to simplify the expression.

[4]

© UCLES 2018

9608/32/O/N/18

[Turn over

www.dynamicpapers.com

6
(b) (i)

Complete the truth table for the following logic circuit.
A B C

X

A

B

C

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

X

[2]
(ii)

Complete the Karnaugh Map (K-map) for the truth table in part (b)(i).
AB
00
C

01

11

10

0
1
[1]

(iii)

Draw loops around appropriate groups of 1s in the table in part (b)(ii) to produce an
optimal sum-of-products.
[2]

(iv)

Using your answer to part (b)(iii), write a simplified sum-of-products Boolean expression.
X = [2]

© UCLES 2018

9608/32/O/N/18

www.dynamicpapers.com

7

(c) The truth table for a logic circuit with four inputs is shown.
INPUT

(i)

OUTPUT

A

B

C

D

X

0

0

0

0

0

0

0

0

1

0

0

0

1

0

0

0

0

1

1

0

0

1

0

0

1

0

1

0

1

0

0

1

1

0

0

0

1

1

1

0

1

0

0

0

0

1

0

0

1

0

1

0

1

0

0

1

0

1

1

0

1

1

0

0

1

1

1

0

1

1

1

1

1

0

1

1

1

1

1

1

Complete the K-map for the truth table in part (c).
AB

CD

[4]
(ii)

Draw loops around appropriate groups of 1s in the table in part (c)(i) to produce an
optimal sum-of-products.
[2]

(iii)

Using your answer to part (c)(ii), write a simplified sum-of-products Boolean expression.
X = [2]

© UCLES 2018

9608/32/O/N/18

[Turn over

www.dynamicpapers.com

8
4

A compiler uses a keyword table and a symbol table. Part of the keyword table is shown.

•
•

Tokens for keywords are shown in hexadecimal.
All of the keyword tokens are in the range 00 – 5F.
Keyword

Token
01

+

02

=

03

IF

4A

ENDIF

4C

THEN

4B

ELSE

4D

FOR

4E

STEP

4F

TO

50

INPUT

51

OUTPUT

52

ENDFOR

53

Entries in the symbol table are allocated tokens. These values start from 60 (hexadecimal).
Study the following code.
INPUT Number1
INPUT Number2
INPUT Answer
IF Answer = Number1 + Number2
THEN
OUTPUT 10
ELSE
OUTPUT 0
ENDIF
(a) Complete the symbol table to show its contents after the lexical analysis stage.
Symbol

© UCLES 2018

Token
Value

Type

Number1

60

Variable

Number2

61

Variable

9608/32/O/N/18

[3]

www.dynamicpapers.com

9

(b) The output from the lexical analysis stage is stored in the following table. Each cell stores one
byte of the output.
Complete the output from the lexical analysis. Use the keyword table and your answer to
part (a).

51

60
[2]
(c) A student uses the compiler to compile some different code.
After the syntax analysis is complete, the compiler generates object code.
The following line of code is compiled:

X

A + B + C − D

The compilation produces the following assembly language code.
LDD
ADD
ADD
STO
LDD
SUB
STO
(i)

236
237
238
540
540
239
235

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

loads value A into accumulator
adds value B to accumulator
adds value C to accumulator
stores accumulator in temporary location
loads value from temporary location into accumulator
subtracts value D from accumulator
stores accumulator in X

Identify the final stage in the compilation process that follows this code generation stage.
[1]

(ii)

Rewrite the equivalent code following the final stage.

[3]

© UCLES 2018

9608/32/O/N/18

[Turn over

10
(iii)

www.dynamicpapers.com

State two benefits of the process that is carried out in the final stage.
Benefit 1

Benefit 2

[2]

(d) An interpreter is executing a program. The program uses the variables a, b, c and d.
The program contains an expression that is written in infix form. The interpreter converts the
infix expression to RPN.
The RPN expression is:

b a c + * d + 2 −

The interpreter evaluates this RPN expression using a stack.
The current values are:

a = 1

b = 2

c = 2

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]
5

(a) Most desktop or laptop computers use CISC (Complex Instruction Set Computing)
architecture. Most smartphones and tablets use RISC (Reduced Instruction Set Computing).
State four features that are different for the CISC and RISC architectures.
1

2

3

4

[4]

© UCLES 2018

9608/32/O/N/18

www.dynamicpapers.com

11

(b) In a RISC processor, four instructions (A, B, C, D) are processed using pipelining.
The following table shows five stages that take place when instructions are fetched and
executed. In time interval 1, instruction A has been fetched.
(i)

In the table, write the instruction labels (A, B, C, D) in the correct time interval for each
stage. Each operation only takes one time interval.
Stage

Fetch instruction

Time interval
1

2

3

4

5

6

7

8

9

A

Decode instruction
Execute instruction
Access operand in memory
Write result to register
[3]
(ii)

When completed, the table in part (b)(i) shows how pipelining allows instructions to be
carried out more rapidly. Each time interval represents one clock cycle.
Calculate how many clock cycles are saved by using pipelining in the example in
part (b)(i).
Show your working.
Working

Answer
[3]

© UCLES 2018

9608/32/O/N/18

[Turn over

12

www.dynamicpapers.com

(c) The table shows four statements about computer architecture.
Put a tick (✓) in each row to identify the computer architecture associated with each statement.
Architecture

Statement

SIMD

MIMD

SISD

Each processor executes a different instruction
There is only one processor
Each processor executes the same instruction input
using data available in the dedicated memory
Each processor typically has its own partition within a
shared memory
[4]
6

(a) The following table shows descriptions and terms relating to data transmission security.
Add appropriate descriptions and terms to complete the table.
Description

Term

A

The result of encryption that is transmitted to the
recipient.

B

The type of cryptography used where different keys are
used; one for encryption and one for decryption.

C

Digital certificate

D

Private key

[4]

© UCLES 2018

9608/32/O/N/18

13

www.dynamicpapers.com

(b) The sequence of steps 1 to 7 describes what happens when setting up a secure connection
using Secure Socket Layer (SSL).
Four statements are missing from the sequence.
A

If the browser trusts the certificate, it creates, encrypts and sends the server a
symmetric session key using the server’s public key.

B

Server sends the browser an acknowledgement, encrypted with the session key.

C

Server sends a copy of its SSL Certificate and its public key.

D

Server decrypts the symmetric session key using its private key.

Write one letter (A to D) in the appropriate space to complete the sequence.
1.

Browser requests that the server identifies itself.

2.

3.

Browser checks the certificate against a list of trusted Certificate Authorities.

4.

5.

6.

7.

Server and browser now encrypt all transmitted data with the session key.

© UCLES 2018

9608/32/O/N/18

[3]

14
BLANK PAGE

© UCLES 2018

9608/32/O/N/18

www.dynamicpapers.com

15
BLANK PAGE

© UCLES 2018

9608/32/O/N/18

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 2018

9608/32/O/N/18

Advertisement