0% found this document useful (0 votes)
17 views426 pages

A2 CS Past Papers

Uploaded by

charlesma463
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views426 pages

A2 CS Past Papers

Uploaded by

charlesma463
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 426

Cambridge International AS & A Level

COMPUTER SCIENCE 9618/03


Paper 3 Advanced Theory For examination from 2021
SPECIMEN PAPER 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 16 pages. Blank pages are indicated.

© UCLES 2018 [Turn over


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) Calculate the normalised floating-point representation of +4.5 in this system. Show your
working.

Mantissa Exponent

Working .....................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

.............................................................................................................................................. [3]

(b)
working.

Mantissa Exponent

Working .....................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

.............................................................................................................................................. [3]

© UCLES 2018 9618/03/SP/21


3

(c) Calculate the denary value for the following binary floating-point number. Show your working.

Mantissa Exponent

0 0 0 1 1 0 0 0 0 0 0 0 0 1 0 1

Working .....................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

Answer ......................................................................................................................................
[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) The system changes so that it now allocates eight bits to both the mantissa and the exponent.

Explain two effects this has on the numbers that can be represented.

1 ................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

2 ................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................
[4]

© UCLES 2018 9618/03/SP/21 [Turn over


4

2 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 applications use BitTorrent to exchange data.

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...................................................................................................................................... [4]

© UCLES 2018 9618/03/SP/21


5

(c) State two other protocols that are used at the Application layer for the exchange of data.

For each protocol, give a different example of an appropriate exchange of data.

Protocol 1 .................................................................................................................................

Example ....................................................................................................................................

...................................................................................................................................................

Protocol 2 .................................................................................................................................

Example ....................................................................................................................................

...................................................................................................................................................
[4]

© UCLES 2018 9618/03/SP/21 [Turn over


6

3 (a) Complete the Boolean expression that corresponds to the following truth table.

INPUT OUTPUT
A B C X
0 0 0 0
0 0 1 0
0 1 0 0
0 1 1 1
1 0 0 0
1 0 1 0
1 1 0 1
1 1 1 1

X = A . B . C ....................................................................................................................... [2]

The part to the right of the equals sign is known as the sum-of-products.

(b) (i) Complete the Karnaugh map (K-map) for the truth table given in part (a).

AB
00 01 11 10
0
C
1
[1]

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

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


[2]

(iii) Using your answer to part (b)(ii), write the simplified sum-of-products Boolean
expression.

X = ................................................................................................................................ [2]

© UCLES 2018 9618/03/SP/21


7

4 A student writes a program in a high-level programming language. A compiler translates the


program into machine code.

(a) The compilation process has a number of stages.

The output of the lexical analysis stage forms the input to the next stage.

(i) Identify this stage.

...................................................................................................................................... [1]

(ii) State two tasks that occur at this stage.

1 .........................................................................................................................................

...........................................................................................................................................

2 .........................................................................................................................................

...........................................................................................................................................
[2]

(b) The program uses pseudocode in place of a high-level language.

There are a number of reasons for performing optimisation. One reason is to produce code
that minimises the amount of memory used.

State another reason for the optimisation of code.

.............................................................................................................................................. [1]

(c) The following statement assigns an expression to the variable A.

Suggest what a compiler could do to optimise the following expression.

A B + 2 * 6

...................................................................................................................................................

...................................................................................................................................................

.............................................................................................................................................. [1]

© UCLES 2018 9618/03/SP/21 [Turn over


8

(d) These lines of code are to be compiled:

X A + B
Y A + B + C

Following the syntax analysis stage, object code is generated. The equivalent code, in
assembly language, is shown below:

01 LDD 436 // loads value A


02 ADD 437 // adds value B
03 STO 612 // stores result in X
04 LDD 436 // loads value A
05 ADD 437 // adds value B
06 ADD 438 // adds value C
07 STO 613 // stores result in Y

Suggest what a compiler could do to optimise this code.

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

.............................................................................................................................................. [3]

© UCLES 2018 9618/03/SP/21


9

5 Ed wants to send a message securely. Before sending the message, the software encrypts it
using a symmetric key.

(a) (i) Describe what is meant by symmetric key encryption.

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...................................................................................................................................... [2]

(ii) State two drawbacks of using symmetric key encryption.

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...................................................................................................................................... [2]

(b) The symmetric key is to be exchanged before the message is sent.


To exchange the key securely, the use of quantum cryptography is being considered.

State two possible benefits of using quantum cryptography.

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

.............................................................................................................................................. [2]

© UCLES 2018 9618/03/SP/21 [Turn over


10

6 (a) Artificial Intelligence (AI) can be aided by the use of different techniques.

Draw a line from each technique to the correct description.

Technique Description

A structure used to model relationships between


objects.

Artificial Neural Network


A computer system modelled on a brain.

A* Algorithm
A computer program that improves its performance
at certain tasks with experience.
Graph

An abstract data type with a hierarchical structure.


Machine Learning

A computer method used to find the optimal path


between two mapped locations.

[4]

(b) Describe two categories of machine learning.

1 ................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

2 ................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................
[4]

© UCLES 2018 9618/03/SP/21


11

7 An ordered binary tree Abstract Data Type (ADT) has these associated operations:

create tree
add new item to tree
traverse tree

A student is designing a program that will implement a binary tree ADT as a linked list of ten
nodes.

Each node consists of data, a left pointer and a right pointer.

A program is to be written to implement the tree ADT. The variables and procedures to be used
are listed below:

Identifier Data type Description


Node RECORD Data structure to store node data and associated
pointers.
LeftPointer INTEGER Stores index of start of left subtree.
RightPointer INTEGER Stores index of start of right subtree.
Data STRING Data item stored in node.
Tree ARRAY Array to store nodes.
NewDataItem STRING Stores data to be added.
FreePointer INTEGER Stores index of start of free list.
RootPointer INTEGER Stores index of root node.
NewNodePointer INTEGER Stores index of node to be added.
CreateTree() Procedure initialises the root pointer and free pointer
and links all nodes together into the free list.
AddToTree() Procedure to add a new data item in the correct
position in the binary tree.
FindInsertionPoint() Procedure that finds the node where a new node is
to be added.
Procedure takes the parameter NewDataItem and
returns two parameters:
Index, whose value is the index of the node
where the new node is to be added
Direction, whose value is the direction of the
pointer (“Left” or “Right”).

© UCLES 2018 9618/03/SP/21 [Turn over


12

These pseudocode declarations and this procedure can be used to create an empty tree with ten
nodes.

TYPE Node
DECLARE LeftPointer : INTEGER
DECLARE RightPointer: INTEGER
DECLARE Data : STRING
ENDTYPE
DECLARE Tree : ARRAY[0 : 9] OF Node
DECLARE FreePointer : INTEGER
DECLARE RootPointer : INTEGER

PROCEDURE CreateTree()
DECLARE Index : INTEGER
RootPointer -1
FreePointer 0
FOR Index 0 TO 9 // link nodes
Tree[Index].LeftPointer Index + 1
Tree[Index].RightPointer -1
NEXT
Tree[9].LeftPointer -1
ENDPROCEDURE

© UCLES 2018 9618/03/SP/21


13

(a) Complete the pseudocode to add a data item to the tree.

PROCEDURE AddToTree(BYVALUE NewDataItem : STRING)


// if no free node report an error

IF FreePointer ............................................................................................................
THEN
OUTPUT "No free space left"
ELSE
// add new data item to first node in the free list
NewNodePointer FreePointer

.............................................................................................................................
// adjust free pointer

FreePointer ..............................................................................................
// clear left pointer

Tree[NewNodePointer].LeftPointer ................................................
// is tree currently empty?

IF ......................................................................................................................
THEN // make new node the root node

..............................................................................................................
ELSE // find position where new node is to be added
Index RootPointer
CALL FindInsertionPoint(NewDataItem, Index, Direction)
IF Direction = "Left"
THEN // add new node on left

...........................................................................................
ELSE // add new node on right

...........................................................................................
ENDIF
ENDIF
ENDIF
ENDPROCEDURE [8]

© UCLES 2018 9618/03/SP/21 [Turn over


14

(b) The traverse tree operation outputs the data items in alphabetical order.
This can be written as a recursive solution.

Complete the pseudocode for the recursive procedure TraverseTree.

PROCEDURE TraverseTree(BYVALUE Pointer : INTEGER)

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

ENDPROCEDURE [5]

© UCLES 2018 9618/03/SP/21


15

8 The following table shows part of the instruction set for a processor. The processor has one
general purpose register, the Accumulator (ACC).

Instruction
Explanation
Opcode Operand
LDM #n Load the denary 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
ADD <address> Add the contents of the given address to the ACC
INC <register> Add 1 to the contents of the register
CMP <address> Compare the contents of ACC with the contents of <address>
JPN <address> Following a compare instruction, jump to <address> if the
compare was False
END Return control to the operating system

(a) State the addressing mode used by:

LDM ...........................................................................................................................................

...................................................................................................................................................

LDD ............................................................................................................................................

...................................................................................................................................................
[2]

(b) Using opcodes from the table, write instructions to set the value at address 509 to the contents
of address 500 added to the value 12.

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

.............................................................................................................................................. [3]

© UCLES 2018 9618/03/SP/21


16

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.

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 2018 9618/03/SP/21


Cambridge International AS & A Level
* 7 9 2 0 7 5 1 8 6 5 *

COMPUTER SCIENCE 9618/32


Paper 3 Advanced Theory October/November 2021

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 16 pages. Any blank pages are indicated.

DC (RW/SW) 206388/2
© UCLES 2021 [Turn over
2

1 (a) Numbers are stored in a computer using floating-point representation with:

• 12 bits for the mantissa


• 4 bits for the exponent
• two’s complement form for both the mantissa and exponent.

(i) Write the normalised floating-point representation of the following unsigned binary
number using this system.

1011100.011001
Working .............................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

Mantissa Exponent

[2]

(ii) State the consequence of storing the binary number in part (a)(i) as a floating-point
number in this system. Justify your answer.

Consequence ....................................................................................................................

...........................................................................................................................................

Justification .......................................................................................................................

...........................................................................................................................................

...........................................................................................................................................
[2]

(b) Explain the reason why binary numbers are stored in normalised form.

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

............................................................................................................................................. [3]
© UCLES 2021 9618/32/O/N/21
3

2 Draw one line from each programming paradigm to its most appropriate description.

Programming paradigm Description

Programs using the instruction set of a


processor

Declarative
Programs based on events such as user
actions or sensor outputs

Imperative
Programs using the concepts of class,
inheritance, encapsulation and
polymorphism
Low-level

Programs with an explicit sequence of


commands that update the program state,
Object-oriented with or without procedure calls

Programs that specify the desired result


rather than how to get to it

[4]

3 Enumerated and pointer are two non-composite data types.

(a) Write pseudocode to create an enumerated type called Parts to include these parts sold in
a computer shop:

Monitor, CPU, SSD, HDD, LaserPrinter, Keyboard, Mouse

...................................................................................................................................................

...................................................................................................................................................

............................................................................................................................................. [2]

(b) Write pseudocode to create a pointer type called SelectParts that will reference the
memory location in which the current part name is stored.

...................................................................................................................................................

...................................................................................................................................................

............................................................................................................................................. [2]

© UCLES 2021 9618/32/O/N/21 [Turn over


4

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

• a digit
• a capital letter
• a character.

digit capital letter


0 A

1 E

2 I

3 O

4 U

5 character
$

6
%

7
&

8
*

9
#

(a) Write the Backus-Naur Form (BNF) notation of the syntax diagram for character.

...................................................................................................................................................

...................................................................................................................................................

............................................................................................................................................. [2]

© UCLES 2021 9618/32/O/N/21


5

(b) A password must begin with a character and be followed by one or more digits or capital
letters.

(i) State an example of a valid password.

..................................................................................................................................... [1]

(ii) A valid password is represented by the syntax diagram:

password
character digit

capital letter

Write the BNF notation of the syntax diagram for password.

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

..................................................................................................................................... [4]

© UCLES 2021 9618/32/O/N/21 [Turn over


6

5 (a) Compare sequential and serial methods of file organisation.

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

............................................................................................................................................. [4]

(b) State the most suitable method of file access when a record is referenced by a unique
address on a disk-type storage medium.

............................................................................................................................................. [1]

(c) State the most suitable method of file access when a bank stores its data records in ascending
order of account number.

............................................................................................................................................. [1]

© UCLES 2021 9618/32/O/N/21


7

6 (a) Explain how packet switching is used to transfer messages across the internet.

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

............................................................................................................................................. [5]

(b) Outline the function of a router in packet switching.

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

............................................................................................................................................. [3]

© UCLES 2021 9618/32/O/N/21 [Turn over


8

7 (a) Write the Boolean expression that corresponds to the given truth table as a sum-of-products.

INPUT OUTPUT

A B C D Z

0 0 0 0 0

0 0 0 1 0

0 0 1 0 0

0 0 1 1 0

0 1 0 0 0

0 1 0 1 0

0 1 1 0 0

0 1 1 1 0

1 0 0 0 0

1 0 0 1 1

1 0 1 0 0

1 0 1 1 1

1 1 0 0 1

1 1 0 1 1

1 1 1 0 1

1 1 1 1 1

Z = ............................................................................................................................................

............................................................................................................................................. [3]

© UCLES 2021 9618/32/O/N/21


9

(b) (i) Complete the Karnaugh map (K-map) for the given truth table.

AB

CD 00 01 11 10

00

01

11

10

[2]

(ii) Draw loop(s) around appropriate group(s) of 1s in the K-map to produce an optimal
sum-of-products. [2]

(iii) Write the Boolean expression from your answer to part b(ii) as a simplified
sum-of-products.

Z = .....................................................................................................................................

..................................................................................................................................... [2]

(iv) Write the simplified Boolean expression for your answer to part b(iii).

Z = .....................................................................................................................................

..................................................................................................................................... [1]

© UCLES 2021 9618/32/O/N/21 [Turn over


10

8 (a) Describe the purpose of the Secure Sockets Layer (SSL) and Transport Layer Security (TLS)
protocols.

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

............................................................................................................................................. [2]

(b) Explain how SSL/TLS protocols are used when a client-server communication is initiated.

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

............................................................................................................................................. [4]

© UCLES 2021 9618/32/O/N/21


11

9 (a) The diagram shown represents an artificial neural network.

Output
Layer
Input
Layer
Hidden Hidden
Layer 1 Hidden Layer 3
Layer 2

(i) State the reason for having multiple hidden layers in an artificial neural network.

...........................................................................................................................................

..................................................................................................................................... [1]

(ii) Explain how artificial neural networks enable machine learning.

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

..................................................................................................................................... [4]

© UCLES 2021 9618/32/O/N/21 [Turn over


12

(b) Find the shortest path between the Home and School nodes using the A* algorithm.
Show your working in the table provided.

The first two rows in the table have been completed.

14

h = 10 Home 9
g=1 4
A 5 C
3
7
B 6
2
6
D 6
3
7
F
1
2
3
E
3 5
School

Node Cost from Home node (g) Heuristic (h) Total (f = g + h)

Home 0 14 14

A 1 10 11

Final path
[5]

© UCLES 2021 9618/32/O/N/21


13

10 (a) State three essential features of recursion.

1 ................................................................................................................................................

...................................................................................................................................................

2 ................................................................................................................................................

...................................................................................................................................................

3 ................................................................................................................................................

...................................................................................................................................................
[3]

(b) Explain the reasons why a stack is a suitable Abstract Data Type (ADT) to implement
recursion.

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

............................................................................................................................................. [3]

(c) Identify two ADTs other than a stack.

1 ................................................................................................................................................

2 ................................................................................................................................................
[2]

© UCLES 2021 9618/32/O/N/21 [Turn over


14

(d) The function StackFull() checks whether a stack is full.

The function uses the variable TopOfStack to represent the pointer to the most recent
position used on the stack, and the variable Max to represent the maximum size of the stack.
Assume TopOfStack and Max are global variables.

FUNCTION StackFull() RETURNS BOOLEAN


IF TopOfStack = Max THEN
RETURN TRUE
ELSE
RETURN FALSE
ENDIF
ENDFUNCTION

An algorithm AddInteger is required to add a new integer data element to a stack.

The stack is implemented as an array ArrayStack.

The function AddInteger() calls StackFull() and returns an appropriate message.

Complete the pseudocode for the function AddInteger().

FUNCTION AddInteger(NewInteger : INTEGER) RETURNS STRING

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

ENDFUNCTION
[5]

© UCLES 2021 9618/32/O/N/21


15

BLANK PAGE

© UCLES 2021 9618/32/O/N/21


16

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
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 2021 9618/32/O/N/21


Cambridge International AS & A Level
* 4 0 8 1 7 6 1 7 1 4 *

COMPUTER SCIENCE 9618/33


Paper 3 Advanced Theory May/June 2021

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.

DC (LO) 213987
© UCLES 2021 [Turn over
2

1 Real numbers are stored in a computer system using floating-point representation with:

• 10 bits for the mantissa


• 6 bits for the exponent
• Two’s complement form for both the mantissa and the exponent.

(a) Calculate the normalised floating-point representation of –7.25 in this system.


Show your working.

Mantissa Exponent

Working .....................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................
[3]

(b) Calculate the denary value of the given binary floating-point number.
Show your working.

Mantissa Exponent

1 0 1 1 0 0 0 1 1 1 0 0 0 1 1 1

Working .....................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

Answer ......................................................................................................................................
[3]

© UCLES 2021 9618/33/M/J/21


3

(c) The given binary floating-point number is not normalised.

Normalise the floating-point number. Show your working.

Mantissa Exponent

0 0 0 0 0 0 0 1 1 1 1 0 0 1 1 1

Mantissa Exponent

Working .....................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................
[3]

(d) The denary number 513 cannot be stored accurately as a normalised floating-point number in
this computer system.

(i) Explain the reason for this.

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

..................................................................................................................................... [3]

(ii) Describe an alteration to the way floating-point numbers are stored to enable this number
to be stored accurately using the same total number of bits.

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

..................................................................................................................................... [2]

© UCLES 2021 9618/33/M/J/21 [Turn over


4

2 (a) Describe the purpose of a user-defined data type.

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

............................................................................................................................................. [2]

(b) Define, using pseudocode, the following enumerated data types:

(i) SchoolDay to hold data about the days students are usually in school.

...........................................................................................................................................

..................................................................................................................................... [1]

(ii) WeekEnd to hold data about the days that are not school days.

...........................................................................................................................................

..................................................................................................................................... [1]

(c) Define, using pseudocode, the composite data type ClubMeet. This will hold data about club
members that includes:

• first name and last name


• the two days they attend:
one on a school day
one not on a school day.

Use the enumerated types you created in part (b).

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

............................................................................................................................................. [4]

© UCLES 2021 9618/33/M/J/21


5

3 (a) Draw one line to connect each Operating System (OS) term to the most appropriate
description about it.

OS term Description

Using secondary storage to simulate


additional main memory
Multi-tasking

Managing the processes running on


the CPU
Paging

Managing the execution of many programs


that appear to run at the same time

Interrupt handling

Locating non-contiguous blocks of data and


relocating them

Scheduling
Transferring control to another routine when
a service is required

Virtual memory
Reading/writing same-size blocks of data
from/to secondary storage when required

[5]

(b) Explain how an interpreter executes a program without producing a complete translated
version of it.

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

............................................................................................................................................. [4]

© UCLES 2021 9618/33/M/J/21 [Turn over


6

4 (a) (i) Explain why Reverse Polish Notation (RPN) is used to carry out the evaluation of
expressions.

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

..................................................................................................................................... [2]

(ii) Identify, with reasons, a data structure that could be used to evaluate an expression
in RPN.

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

..................................................................................................................................... [2]

(b) Write the infix expression in RPN.

(a – b) * (a + c) / 7

...................................................................................................................................................

............................................................................................................................................. [1]

(c) Write the RPN expression as an infix expression.

a b / 4 * a b + -

...................................................................................................................................................

............................................................................................................................................. [1]

(d) Evaluate the RPN expression:

a b + c d / /

where a = 17, b = 3, c = 48 and d = 12.

Show your working.

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

............................................................................................................................................. [2]

© UCLES 2021 9618/33/M/J/21


7

5 (a) Calculate the shortest distance between the base and each of the other towns in the diagram
using Dijkstra’s algorithm.

Show your working and write your answers in the table provided.

Base
4
5

Town 1 2
1 Town 2
8

Town 3

7 3 Town 6
1

5
6
Town 4 Town 5

Working .....................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

Answers

Town 1 Town 2 Town 3 Town 4 Town 5 Town 6

[5]

© UCLES 2021 9618/33/M/J/21 [Turn over


8

(b) Explain the use of graphs to aid Artificial Intelligence (AI).

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

............................................................................................................................................. [3]

6 Give two benefits and two drawbacks of packet switching.

Benefit 1 ...........................................................................................................................................

..........................................................................................................................................................

Benefit 2 ...........................................................................................................................................

..........................................................................................................................................................

Drawback 1 ......................................................................................................................................

..........................................................................................................................................................

Drawback 2 ......................................................................................................................................

..........................................................................................................................................................
[4]

© UCLES 2021 9618/33/M/J/21


9

7 The diagram shows a logic circuit.

A P
Y
B

C R

Z
Q

(a) Complete the truth table for the given logic circuit. Show your working.

Inputs Working space Outputs


A B C P Q R Y Z
0 0 0
0 0 1
0 1 0
0 1 1
1 0 0
1 0 1
1 1 0
1 1 1
[3]
(b) State the name of the logic circuit.

............................................................................................................................................. [1]

(c) Write the Boolean expressions for the two outputs Y and Z in the truth table as
sum-of-products and state the purpose of each output.

Y = ............................................................................................................................................

Purpose ....................................................................................................................................

Z = ............................................................................................................................................

Purpose ....................................................................................................................................
[4]

© UCLES 2021 9618/33/M/J/21 [Turn over


10

8 (a) State two factors that may affect the performance of a sorting algorithm.

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

............................................................................................................................................. [2]

(b) The given algorithm is a simple bubble sort that arranges a set of scores stored in a one-
dimensional array into descending order, and orders the corresponding students’ names
stored into a two-dimensional array in the same order as the scores. All the arrays are indexed
from 1.

The contents of both arrays after sorting are shown.

Name
Score
1 2
1 98 1 Smithfield Tom
2 97 2 Johnson Jane

… …

248 5 248 Peters Jade


249 3 249 Allen John

YearSize 249
Flag TRUE
WHILE Flag = TRUE
Flag FALSE
FOR Student 1 TO YearSize - 1
IF Score[Student] < Score[Student + 1] THEN
Temp1 Score[Student]
Temp2 Name[Student,1]
Temp3 Name[Student,2]
Score[Student] Score[Student + 1]
Name[Student,1] Name[Student + 1,1]
Name[Student,2] Name[Student + 1,2]
Score[Student + 1] Temp1
Name[Student + 1,1] Temp2
Name[Student + 1,2] Temp3
Flag TRUE
ENDIF
NEXT Student
ENDWHILE

© UCLES 2021 9618/33/M/J/21


11

Write an algorithm, using pseudocode, that will perform the same task using an insertion sort.

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

............................................................................................................................................. [6]

© UCLES 2021 9618/33/M/J/21 [Turn over


12

9 (a) Describe what is meant by an imperative (procedural) programming language.

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

............................................................................................................................................. [2]

(b) Describe what is meant by a declarative programming language.

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

............................................................................................................................................. [2]

(c) Identify the programming paradigm for each of these program code examples.

Program code example Programming paradigm


male(john).
female(ethel).
parent(john, ethel).
FOR Counter = 1 TO 20
X = X * Counter
NEXT Counter
Start: LDD Counter
INC ACC
STO Counter
public class Vehicle
{
private speed;
public Vehicle()
{
speed = 0;
}
}
[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 2021 9618/33/M/J/21


Cambridge International Examinations
Cambridge International Advanced Subsidiary and Advanced Level

COMPUTER SCIENCE 9608/03


Paper 3 Advanced Theory For Examination from 2015
SPECIMEN PAPER
1 hour 30 minutes
Candidates answer on the Question Paper.
No Additional Materials are required.

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.

Answer all questions.


No marks will be awarded for using brand names for software packages or hardware.
No calculators allowed.

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.

This document consists of 15 printed pages and 1 blank page.

© UCLES 2012 [Turn over


2

1 Floating-point is to be used to represent real numbers with:

• 8 bits for the mantissa, followed by


• 4 bits for the exponent
• two’s complement used for both mantissa and exponent

(a) (i) Consider this binary pattern.

0 1 1 0 1 0 0 0 0 1 0 0

What number is this in denary? Show your working.

[3]

(ii) The representation shown in part (a)(i) is normalised.

Explain why floating-point numbers are normalised.

[1]

(iii) Show the binary pattern for the smallest positive number which can be stored using a
normalised 12-bit floating-point representation.

Mantissa:

Exponent:

Work out its denary value.

Denary: [3]

© UCLES 2012 9608/03/SP/15


3

(b) The developer of a new programming language decides that all real numbers will be stored
using 20-bit normalised floating-point representation. She cannot decide how many bits to
use for the mantissa and how many for the exponent.

Explain the trade-off between using either a large number of bits for the mantissa, or a large
number of bits for the exponent.

[2]

© UCLES 2012 9608/03/SP/15 [Turn over


4

2 (a) Complete the diagram to show how the layers of the TCP/IP protocol are related.

Choose from the terms: Internet Layer, Presentation Layer, Data Link Layer,
Application Layer, Transport Layer.

Network Access Layer


[3]

(b) Give the names of two LAN network technologies that the Network Access Layer has to
interface with.

Network technology 1:

Network technology 2: [2]

One layer of the protocol makes use of IP addresses. An IP address is a 32-bit number; for
example, 205.123.4.192 is an IP address.

Part of the IP address is used for the network ID, and part of the address is used for the host ID.

(c) (i) Explain the terms:

network ID:

host ID:

[2]

Most IP addresses fall into one of three classes:

• If the 32-bit address starts with a 0 bit, the address is a Class A address.
• If the 32-bit address starts with the bits 10, the address is a Class B address.
• If the 32-bit address starts with bits 110, the address is a Class C address.

(ii) Show how to determine whether 205.123.4.192 is a Class A, Class B or Class C


address.

[2]

© UCLES 2012 9608/03/SP/15


5

(iii) • In a Class A address, the first byte represents the network ID and the remaining
three bytes represent the host ID.
• In a Class B address, the first two bytes represent the network ID and the remaining
two bytes represent the host ID.
• In a Class C address, the first three bytes represent the network ID and the
remaining byte represents the host ID.

For the address 205.123.4.192 state the:

network ID:

host ID: [2]

© UCLES 2012 9608/03/SP/15 [Turn over


6

3 A zoo reptile house has sixteen tanks which accommodate its reptiles. Each tank has to have its
own microclimate where the appropriate levels of heat and humidity are crucial. The zoo
implements a computer system which supplies the conditions in each of the tanks to a terminal in
a central area. Warning messages are flashed up on the screen if any condition arises which
requires the intervention of a zoo-keeper.

(a) State the name of the type of computing system described.

[1]

(b) State two items of hardware which need to be present in the tanks for this system to function
correctly.

2 [2]

(c) This is the polling routine which is used to run the system indefinitely.

01 REPEAT
02 FOR i ← 1 TO ..........
03 READ Condition1, Condition2 in tank(i)
04 IF Condition1 < Extreme[i,1] OR Condition1 > Extreme[i,2]
05 THEN
06 OUTPUT “Warning! Problem in Tank ”, i
07 ENDIF
08 IF Condition2 < Extreme[i,3] OR Condition2 > Extreme[i,4]
09 THEN
10 OUTPUT “Warning! Problem in Tank ”, i
11 ENDIF
12 ENDFOR
13
14 FOR i ← 1 TO 999999
15 ENDFOR
16 UNTIL ...............................

(i) Fill in the gaps in the pseudocode. [2]

(ii) Explain what is stored in the array Extreme.

[2]

© UCLES 2012 9608/03/SP/15


7

(iii) Explain what happens in lines 04 to 11.

[3]

(iv) Explain the purpose of the loop in lines 14 to 15.

[1]

© UCLES 2012 9608/03/SP/15 [Turn over


8

(d) The zoo decides that the computer system needs to be updated. The computer system will
now make use of actuators. These actuators will operate devices which adjust the
microclimate.

Actuators can be in two states, on or off. Whether an actuator is on or off is determined by a


single bit value (0 means off, 1 means on) in a specific 8-bit memory location.

The actuators to control the climate in Tank 4 use memory location 0804. Bit 5 of this
memory location controls the heater.

7 6 5 4 3 2 1 0 bit number

0 0 1 1 0 1 0 1 value

Use some of the assembly language instructions to write the instructions that will ensure bit 5
of location 0804 is set to 1.

Instruction
Explanation
Op Code Operand

LDM #n Immediate addressing. Load the number n to ACC

LDD <address> Direct addressing. Load the contents of the given


address to ACC

STO <address> Store the contents of ACC at the given address

OUT Output to the screen the character whose ASCII value


is stored in ACC

AND #n Bitwise AND operation of the contents of ACC with the


operand

AND <address> Bitwise AND operation of the contents of ACC with the
contents of <address>

XOR #n Bitwise XOR operation of the contents of ACC with the


operand

OR #n Bitwise OR operation of the contents of ACC with the


operand

© UCLES 2012 9608/03/SP/15


9

[6]

© UCLES 2012 9608/03/SP/15 [Turn over


10

4 (a) Explain what is meant by an interrupt.

[2]

(b) An operating system uses interrupts which have priorities.

Describe the sequence of steps which would be carried out by the interrupt handler software
when an interrupt is received and serviced.

[6]

© UCLES 2012 9608/03/SP/15


11

(c) Modern personal computer operating systems support multi-tasking.


One of the modules of such an operating system will be for memory management.

Describe two different strategies which could be used to manage the available main
memory.

[6]

© UCLES 2012 9608/03/SP/15 [Turn over


12

5 (a) Write the Boolean expression that corresponds to the logic circuit.

[3]

(b) Use Boolean algebra to simplify the expression.

[3]

(c) Draw the logic circuit that corresponds to your simplified expression.

[3]

© UCLES 2012 9608/03/SP/15


13

(d) Complete the truth table for the logic circuit:

A B Work space X Y

0 0

0 1

1 0

1 1
[4]

(e) What is the name given to a logic circuit that has this truth table?

[1]

© UCLES 2012 9608/03/SP/15 [Turn over


14

6 Raz and Tan wish to exchange some sensitive information via a message in an email. Initially,
Raz wants to send the message to Tan in such a way that Tan can be assured that the message
did come from Raz.

(a) The steps are as follows.

1. Raz creates a <answer 1> using a <answer 2> function on the message.

2. Raz encrypts the <answer 1> using his <answer 3> key. This is the digital <answer 4>
for the message.

3. Raz sends both the message and the digital <answer 4> to Tan.

4. Tan decrypts the digital <answer 4> using Raz’s <answer 5> key.

5. Tan repeats what Raz did in Step 1 to the message.

Select from the list of terms to complete the five statements.

signature hash message-digest encryption private public email

<answer 1>

<answer 2>

<answer 3>

<answer 4>

<answer 5> [5]

(b) Tan finds that her results in Step 5 do not match her results in Step 4.

Give two possible reasons for this.

[2]

© UCLES 2012 9608/03/SP/15


15

(c) Even though Tan’s results in Step 5 match the results in Step 4, she is still concerned that
anybody receiving the message can actually read the contents.

Explain what Raz and Tan need to do so that only Tan can read the message.

[3]

© UCLES 2012 9608/03/SP/15


16

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.

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 2012 9608/03/SP/15


Cambridge International AS & A Level
* 7 9 0 2 6 0 6 6 5 0 *

COMPUTER SCIENCE 9608/33


Paper 3 Advanced Theory May/June 2021

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 16 pages. Any blank pages are indicated.

DC (LK/CGW) 205098/3
© UCLES 2021 [Turn over
2

1 In a particular computer system, two real numbers, A and B, 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.

Number A Mantissa Exponent

1 1 0 0 0 0 0 0 0 0 0 0 0 0 1 0

Number B Mantissa Exponent

0 1 1 1 0 0 0 0 0 0 0 0 1 1 1 1

(a) (i) Identify whether each number is positive or negative. Justify your answer.

Number A .........................................................................................................................

...........................................................................................................................................

Number B .........................................................................................................................

...........................................................................................................................................
[2]

(ii) Convert the binary values of the mantissa and the exponent for each number to their
separate denary values.

A mantissa ........................................................................................................................

...........................................................................................................................................

A exponent ........................................................................................................................

...........................................................................................................................................

B mantissa ........................................................................................................................

...........................................................................................................................................

B exponent ........................................................................................................................

...........................................................................................................................................
[4]

© UCLES 2021 9608/33/M/J/21


3

(iii) Calculate the denary value of each floating-point number using your values from
part (a)(ii).

Number A .........................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

Number B .........................................................................................................................

...........................................................................................................................................

...........................................................................................................................................
[2]

(b) State which number, A or B, is stored in normalised floating-point form. Justify your answer.

Number .....................................................................................................................................

Justification ...............................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................
[3]

© UCLES 2021 9608/33/M/J/21 [Turn over


4

2 The TCP/IP protocol suite can be viewed as a stack with four layers.

(a) Write the correct descriptions for the two layers and the correct layers for the two descriptions
given in the following table.

Layer Description

Application

Handles forwarding of packets

Internet /
Network

Handles how data is physically sent

[4]

(b) (i) Explain why communication protocols are necessary.

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

..................................................................................................................................... [2]

(ii) Identify and describe one other communication protocol. State its purpose.

Protocol .............................................................................................................................

Description ........................................................................................................................

...........................................................................................................................................

Purpose .............................................................................................................................

...........................................................................................................................................
[3]

© UCLES 2021 9608/33/M/J/21


5

3 Describe, with the aid of a diagram for each one, the bus and star network topologies.

Bus

Description .......................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

Star

Description .......................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................
[6]

© UCLES 2021 9608/33/M/J/21 [Turn over


6

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

INPUT OUTPUT
P Q R S X
0 0 0 0 1

0 0 0 1 0

0 0 1 0 1

0 0 1 1 0

0 1 0 0 0

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 0

1 1 0 1 1

1 1 1 0 0

1 1 1 1 1

(i) Write the Boolean expression for the truth table as a sum-of-products.

X = .............................................................................................................................. [2]

(ii) Complete the Karnaugh Map (K-map) for the truth table.

PQ
00 01 11 10
00
01
RS
11
10
[2]

© UCLES 2021 9608/33/M/J/21


7

(iii) The K-map can be used to simplify the expression in part (a)(i).

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

(iv) Write the simplified sum-of-products expression for your answer to part (a)(iii).

X = ............................................................................................................................... [2]

(b) Simplify your expression for X in part (a)(i) using Boolean algebra. Show your working.

...................................................................................................................................................

...................................................................................................................................................

............................................................................................................................................. [2]

© UCLES 2021 9608/33/M/J/21 [Turn over


8

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

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

assignment statement

variable = variable operator variable

unsigned
integer

variable

letter letter

unsigned integer

digit digit

letter operator digit


X + 1

Y – 2

Z * 3

(a) Give reasons why each of these statements is invalid.

X = XY + 21

...................................................................................................................................................

YZ := YZ * 3

...................................................................................................................................................

...................................................................................................................................................
[3]

© UCLES 2021 9608/33/M/J/21


9

(b) Complete the Backus-Naur Form (BNF) for the syntax diagrams shown.

<letter> has been completed for you.

<letter> ::= X|Y|Z

<assignment_statement> ::=

...................................................................................................................................................

<variable> ::=

...................................................................................................................................................

<digit> ::=

...................................................................................................................................................

<unsigned_integer> ::=

...................................................................................................................................................

<operator> ::=

...................................................................................................................................................
[5]

(c) The syntax of a variable is changed to allow one or two letters followed by zero, one or two
digits.

(i) Draw an updated syntax diagram for the variable.

[3]

(ii) Give the BNF for the revised variable.

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

..................................................................................................................................... [3]

© UCLES 2021 9608/33/M/J/21 [Turn over


10

6 Encryption is used to provide security when messages are transferred over a communication link.

(a) (i) Explain the way in which asymmetric key cryptography is used to encrypt a message
being sent from one computer user to another over the Internet.

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

.................................................................................................................................... [4]

(ii) State two benefits of using asymmetric key cryptography.

1 ........................................................................................................................................

...........................................................................................................................................

2 ........................................................................................................................................

...........................................................................................................................................
[2]

(b) (i) Explain the way in which Transport Layer Security (TLS) provides communication
security over a computer network.

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

..................................................................................................................................... [4]

© UCLES 2021 9608/33/M/J/21


11

(ii) State two situations where the use of TLS would be appropriate.

1 ........................................................................................................................................

...........................................................................................................................................

2 ........................................................................................................................................

...........................................................................................................................................
[2]

© UCLES 2021 9608/33/M/J/21 [Turn over


12

7 Four shipping containers are used to store goods on the dockside at a port. The temperature
inside each container should be kept between 5 and 8 degrees Celsius inclusive.
Each container has a temperature sensor.

A computer system is programmed to control each container’s temperature by:


• turning on the heater and turning off the air conditioning unit when the temperature falls below
5 degrees
• turning off the heater and turning on the air conditioning unit when the temperature rises
above 8 degrees.

(a) (i) State the name given to the type of system described.

..................................................................................................................................... [1]

(ii) Justify your answer to part (i).

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

..................................................................................................................................... [2]

(b) The computer system stores the temperature readings for the four sensors in two’s
complement form and in four eight-bit memory locations with addresses 301 to 304.

301 0 0 0 0 1 0 0 1 Container 1

302 0 0 0 0 0 1 1 1 Container 2

303 0 0 0 0 0 1 1 0 Container 3

304 1 1 1 1 1 1 1 0 Container 4

State the container number(s) where the temperature is out of range and give the value(s) of
these temperature(s) in denary.

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

............................................................................................................................................. [2]

© UCLES 2021 9608/33/M/J/21


13

(c) The status of the heaters and the air conditioning units is shown at location 300.

A value of 1 means that the device is on and a value of 0 (zero) means that the device is off.

The status of the heaters is shown in the most significant four bits; the status of the air
conditioning units is shown in the least significant four bits.

The pattern of bits at location 300 shows that the heater for container 4 is on and the air
conditioning unit for container 1 is on.

Container number

1 2 3 4 1 2 3 4
300 0 0 0 1 1 0 0 0
Heater Air conditioning

Show the pattern of bits when the heater is on for containers 1 and 2 and no air conditioning
units are on.

300

[1]

© UCLES 2021 9608/33/M/J/21 [Turn over


14

(d) The following table shows assembly language instructions for the container computer system
that has one general purpose register, the Accumulator (ACC).

Instruction
Explanation
Label Op code Operand
LDM &n Load the hexadecimal number n to ACC
Load the contents of the location at the given
LDD <address>
address to ACC
Store the contents of ACC at the given
STO <address>
address
Bitwise AND operation of the contents of ACC
AND &n
with the hexadecimal number n
Bits in ACC are shifted denary number n
LSL #n places to the left. Zeros are introduced at the
right hand end
Compare the contents of ACC with the
CMP &n
hexadecimal number n
Following a compare instruction, jump to
JPE <address>
<address> or <label> if the compare was True
<label>: <op code> <operand> Labels an instruction

If the bit for a container’s heater and the bit for the same container’s air conditioning unit are
both set to 1, a routine at label ERROR is executed. This routine has not been provided.

(i) These assembly language instructions check for an error in the container 1 system.

LDD 300
AND &88
CMP &88
JPE ERROR

Explain the purpose of each instruction.

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

..................................................................................................................................... [4]

© UCLES 2021 9608/33/M/J/21


15

(ii) Write the assembly language instructions to check for an error in the container 4 system.

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

..................................................................................................................................... [3]

© UCLES 2021 9608/33/M/J/21


16

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
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 2021 9608/33/M/J/21


Cambridge International AS & A Level
* 1 0 5 9 1 9 5 7 0 3 *

COMPUTER SCIENCE 9608/32


Paper 3 Advanced Theory May/June 2021

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 16 pages. Any blank pages are indicated.

DC (PQ/CGW) 205105/3
© UCLES 2021 [Turn over
2

1 In a computer system, two real numbers, A and B, 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.

Number A Mantissa Exponent

0 1 1 0 0 0 0 0 0 0 0 0 1 1 1 1

Number B Mantissa Exponent

1 1 1 0 0 0 0 0 0 0 0 0 0 1 0 0

(a) (i) Convert the binary values of the mantissa and the exponent for each number to their
separate denary values.

A mantissa .......................................................................................................................

...........................................................................................................................................

A exponent .......................................................................................................................

...........................................................................................................................................

B mantissa .......................................................................................................................

...........................................................................................................................................

B exponent .......................................................................................................................

...........................................................................................................................................
[4]

(ii) Calculate the denary value of each floating-point number using your values from
part (a)(i).

Number A .........................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

Number B .........................................................................................................................

...........................................................................................................................................

...........................................................................................................................................
[2]

© UCLES 2021 9608/32/M/J/21


3

(b) State which number, A or B, is stored in normalised floating-point form. Justify your answer.

Number .....................................................................................................................................

Justification ...............................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................
[3]

2 The TCP/IP protocol suite can be viewed as a stack with four layers.

(a) Write the correct descriptions for the two layers and the correct layers for the two descriptions
given in the following table.

Layer Description

Application

Transport

Handles transmission of data

Handles how data is physically sent

[4]

(b) Identify and state the purpose of two communication protocols other than TCP/IP.

Protocol 1 .................................................................................................................................

Purpose ....................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

Protocol 2 .................................................................................................................................

Purpose ....................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................
[4]

© UCLES 2021 9608/32/M/J/21 [Turn over


4

3 (a) Describe, with the aid of a diagram, a bus topology network.

Description ................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................
[3]

(b) Describe the way in which a bus network uses Ethernet technology for communication.

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

............................................................................................................................................. [4]
© UCLES 2021 9608/32/M/J/21
5

BLANK PAGE

© UCLES 2021 9608/32/M/J/21 [Turn over


6

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

INPUT OUTPUT

P Q R S X

0 0 0 0 1

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 1

1 1 0 0 0

1 1 0 1 0

1 1 1 0 0

1 1 1 1 1

(i) Write the Boolean expression for the truth table as a sum-of-products.

X = ............................................................................................................................... [2]

(ii) Complete the Karnaugh Map (K-map) for the truth table.

PQ

00 01 11 10

00

01
RS
11

10
[2]

© UCLES 2021 9608/32/M/J/21


7

(iii) The K-map can be used to simplify the expression in part (a)(i).

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

(iv) Write the simplified sum-of-products expression for your answer to part (a)(iii).

X = ............................................................................................................................... [2]

(b) Simplify your expression for X in part (a)(i) using Boolean algebra. Show your working.

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

............................................................................................................................................. [2]

5 Flip-flops are used in computer construction.

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

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

............................................................................................................................................. [3]

(b) Describe the difference between an SR flip-flop and a JK flip-flop.

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

............................................................................................................................................. [2]

© UCLES 2021 9608/32/M/J/21 [Turn over


8

6 The syntax diagrams for a programming language show the syntax of:

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

assignment statement

variable variable operator unsigned


= integer

variable

letter digit

unsigned integer

digit digit

letter operator digit

X + 1

Y – 2

Z * 3

(a) Give reasons why each of these statements is invalid.

X1 = Y - 21

...................................................................................................................................................

Y3 := Y3 + 1

...................................................................................................................................................

X1 = X2 * 7

...................................................................................................................................................
[3]

© UCLES 2021 9608/32/M/J/21


9

(b) Complete the Backus-Naur Form (BNF) for the syntax diagrams shown.
<letter> has been completed for you.

<letter> ::= X|Y|Z

<assignment_statement> ::=

...................................................................................................................................................

<variable> ::=

...................................................................................................................................................

<unsigned_integer> ::=

...................................................................................................................................................

<operator> ::=

...................................................................................................................................................

<digit> ::=

...................................................................................................................................................
[5]

(c) The syntax of an assignment statement is changed to allow for a variable or an unsigned
integer before and after the operator.

(i) Draw an updated syntax diagram for the assignment statement.

[2]

(ii) Give the BNF for the revised assignment statement syntax.

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

..................................................................................................................................... [2]

© UCLES 2021 9608/32/M/J/21 [Turn over


10

7 (a) A digital certificate and a digital signature are used to ensure that a message is not changed
during transmission.

Write an appropriate term in each space to complete the descriptions.

A digital certificate contains the ...................................... key of the owner. A digital certificate

is obtained from the ...................................... .

Before a private message is sent to the owner of the digital certificate, this key is used

to ...................................... the message.

A digital signature is also sent. The message is hashed to produce a ...................................... ,

which is then encrypted with the sender’s ...................................... key to obtain the digital

signature. [5]

(b) State two encryption protocols used in data transmission.

1 ................................................................................................................................................

2 ................................................................................................................................................
[2]

(c) Malware can harm computer systems.

Describe two methods that can be used to restrict the effect of malware.

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

............................................................................................................................................. [4]

© UCLES 2021 9608/32/M/J/21


11

8 Four greenhouses are used to grow tomatoes. The temperature inside each greenhouse should
be kept between 10 and 20 degrees Celsius inclusive.
Each greenhouse has a temperature sensor.

A computer system is programmed to control each greenhouse’s temperature by:


• turning on the heater and closing the ventilation when the temperature falls below 10 degrees
• turning off the heater and opening the ventilation when the temperature rises above
20 degrees.

(a) (i) State the name given to the type of system described.

..................................................................................................................................... [1]

(ii) Justify your answer to part (i).

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

..................................................................................................................................... [2]

(b) The computer system stores the temperature readings for the four sensors in two’s
complement form and in four eight-bit memory locations with addresses 701 to 704.

701 0 0 0 0 1 0 1 0 Greenhouse 1

702 0 0 0 1 0 1 1 1 Greenhouse 2

703 0 0 0 0 1 1 1 0 Greenhouse 3

704 1 1 1 1 1 1 1 1 Greenhouse 4

State the greenhouse number(s) where the temperature is out of range and give the value(s)
of these temperature(s) in denary.

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

............................................................................................................................................. [2]

© UCLES 2021 9608/32/M/J/21 [Turn over


12

(c) The status of the heaters and the ventilation is shown at location 700.

• A value of 1 means that the heater is on.

• A value of 0 (zero) means that the heater is off.

• A value of 1 means that the ventilation is open.

• A value of 0 (zero) means that the ventilation is closed.

The status of the heaters is shown in the most significant four bits; the status of the ventilation
is shown in the least significant four bits.

The pattern of bits at location 700 shows that the heater for greenhouse 3 is on and the
ventilation for greenhouse 1 is open.

Greenhouse number

1 2 3 4 1 2 3 4

700 0 0 1 0 1 0 0 0

Heater Ventilation

Show the pattern of bits when the heater is on for greenhouses 1 and 2 only and no ventilation
is open.

700
[1]

(d) The table shows assembly language instructions for the greenhouse computer system that
has one general purpose register, the accumulator (ACC).

Instruction
Explanation
Label Op code Operand
LDM &n Load the hexadecimal number n to ACC

Load the contents of the location at the given address


LDD <address>
to ACC
STO <address> Store the contents of ACC at the given address

Bitwise AND operation of the contents of ACC with the


AND &n
hexadecimal number n
Bits in ACC are shifted denary number n places to the
LSL #n
left. Zeros are introduced at the right hand end
Compare the contents of ACC with the hexadecimal
CMP &n
number n
Following a compare instruction, jump to <address>
JPE <address>
or <label> if the compare was True
<label>: <op code> <operand> Labels an instruction

© UCLES 2021 9608/32/M/J/21


13

If the bit for a greenhouse’s heater and the bit for the same greenhouse’s ventilation are both
set to 1, a routine at label ERROR is executed. This routine has not been provided.

(i) These assembly language instructions check for an error in the greenhouse 1 system.

LDD 700
AND &88
CMP &88
JPE ERROR

Explain the purpose of each instruction.

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

..................................................................................................................................... [4]

(ii) Write the assembly language instructions to check for an error in the greenhouse 2
system.

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

..................................................................................................................................... [3]

© UCLES 2021 9608/32/M/J/21


14

BLANK PAGE

© UCLES 2021 9608/32/M/J/21


15

BLANK PAGE

© UCLES 2021 9608/32/M/J/21


16

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
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 2021 9608/32/M/J/21


Cambridge International AS & A Level
* 1 0 4 9 1 1 6 6 5 7 *

COMPUTER SCIENCE 9608/33


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 (KN) 206397
© UCLES 2020 [Turn over
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 Exponent

0 0 0 0 1 1 0 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/33/O/N/20


3

2 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/33/O/N/20 [Turn over


4

3 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/33/O/N/20


5

(b) (i) 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/33/O/N/20 [Turn over


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 OUTPUT Y
AB AB
00 01 11 10 00 01 11 10

0 0
C C
1 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/33/O/N/20


7

(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.


[4]

6 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/33/O/N/20 [Turn over


8

(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/33/O/N/20


9

BLANK PAGE

© UCLES 2020 9608/33/O/N/20 [Turn over


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/33/O/N/20


11

(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
Explanation
Label Op code Operand
LDM #n Load the number n to ACC
Load the contents of the location at the
LDD <address>
given address to ACC
Store the contents of ACC at the given
STO <address>
address
Bitwise AND operation of the contents of
AND #n
ACC with the operand
CMP #n Compare the contents of ACC with number n
Following a compare instruction, jump to
JPE <address> <address> or <label> if the compare was
True
JMP <address> Jump to the given address or label

<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/33/O/N/20 [Turn over


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 Op code Operand


CHECKLOAD: 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/33/O/N/20


Cambridge International AS & A Level
* 9 1 9 6 1 7 8 4 3 9 *

COMPUTER SCIENCE 9608/32


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 16 pages. Blank pages are indicated.

DC (JC) 188582/1
© UCLES 2020 [Turn over
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) Calculate the denary value for the following floating-point number. Show your working.

Mantissa Exponent

0 1 0 1 0 0 0 0 0 0 0 0 0 1 1 0

Working .....................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

Denary value ............................................................................................................................


[3]

(b) A new operating system has been installed that has changed the way the floating-point
numbers are used. The order of the exponent and the mantissa are reversed.

(i) Calculate the new denary value for the following floating-point number that has the same
bit pattern as the number in part (a). Show your working.

Exponent Mantissa

0 1 0 1 0 0 0 0 0 0 0 0 0 1 1 0

Working .............................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

Denary value .....................................................................................................................


[3]

© UCLES 2020 9608/32/O/N/20


3

(ii) Identify two problems that can occur due to the change in the representation of the
floating-point number.

Problem 1 ..........................................................................................................................

...........................................................................................................................................

Problem 2 ..........................................................................................................................

...........................................................................................................................................
[2]

© UCLES 2020 9608/32/O/N/20 [Turn over


4

2 Data types can be classified as composite or non-composite.

(a) Draw one line from each data type to its correct classification.

Data type Classification

Pointer

Record Composite

Set

Class Non-composite

Integer

[2]

(b) A user-defined data type, timeOfDay, is declared using the following pseudocode.

TYPE timeOfDay = (morning, afternoon, evening, night)

(i) Identify the type of user-defined data type declared and state its classification.

Type ..................................................................................................................................

Classification .....................................................................................................................
[2]

(ii) Write pseudocode to declare the variable session of type timeOfDay.


Assign the value afternoon to the variable session.

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

..................................................................................................................................... [2]

© UCLES 2020 9608/32/O/N/20


5

3 The use of protocols is essential for successful communication between computers.

(a) Define the term communication protocol.

...................................................................................................................................................

...................................................................................................................................................

............................................................................................................................................. [2]

(b) Identify two protocols that are used in the transfer of emails and state the purpose of each
protocol.

Protocol 1 .................................................................................................................................

Purpose ....................................................................................................................................

...................................................................................................................................................

Protocol 2 .................................................................................................................................

Purpose ....................................................................................................................................

...................................................................................................................................................
[4]

(c) Manav and Miora want to have a video conversation over the Internet using a dedicated
connection.

(i) Identify and describe the switching method used to implement this connection.

Method ..............................................................................................................................

Description ........................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................
[3]

(ii) State one benefit and one drawback of the method you identified in part (c)(i).

Benefit ...............................................................................................................................

...........................................................................................................................................

Drawback ..........................................................................................................................

...........................................................................................................................................
[2]

© UCLES 2020 9608/32/O/N/20 [Turn over


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 1 0
0 0 1 0 0
0 1 0 0 0
0 1 1 0 1
1 0 0 0 0
1 0 1 0 1
1 1 0 0 0
1 1 1 1 1

(a) Write the Boolean expressions for the truth table as sum-of-products.

X = ............................................................................................................................................

Y = ............................................................................................................................................
[3]

(b) Complete the Karnaugh Maps (K-maps) for the truth table.

OUTPUT X OUTPUT Y
AB AB

00 01 11 10 00 01 11 10

0 0
C C
1 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). [2]

(ii) Write the simplified sum-of-products expressions for this output from part (c)(i).

..................................................................................................................................... [2]

© UCLES 2020 9608/32/O/N/20


7

5 Complete these statements about flip-flops.

A flip-flop is a .................................................... .

It has .................................................... stable states.

A flip-flop is used for .................................................... .

There are different types of flip-flop, for example .................................................... and

.................................................... .
[5]

© UCLES 2020 9608/32/O/N/20 [Turn over


8

6 Mahmoud is developing a new application, MyApp, that needs to work with three different
operating systems (OS1, OS2 and OS3).

He has decided to use virtual machine software to test MyApp with these three different operating
systems.

The diagram shows MyApp running on three virtual machines.

MyApp MyApp MyApp

OS1 OS2 OS3

Virtual machine software

OS4

Hardware

(a) Describe the roles of the four operating systems (OS1, OS2, OS3 and OS4) shown in the
diagram.

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

............................................................................................................................................. [3]

(b) Describe the role of the virtual machine software in the testing of MyApp.

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

............................................................................................................................................. [3]
© UCLES 2020 9608/32/O/N/20
9

(c) Explain one benefit and one drawback of this approach to testing MyApp.

Benefit ......................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

Drawback ..................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................
[4]

© UCLES 2020 9608/32/O/N/20 [Turn over


10

7 Sam wants to send confidential data to an organisation. He has already received the organisation’s
digital certificate. The organisation has asked him to make sure that the message containing the
confidential data is encrypted and is sent with a digital signature.

(a) Explain the process the organisation followed to obtain its digital certificate.

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

............................................................................................................................................. [3]

(b) Identify two items included in the organisation’s digital certificate that will be used when
sending the message. Give a reason why each item is required.

Item 1 ........................................................................................................................................

Reason .....................................................................................................................................

...................................................................................................................................................

Item 2 ........................................................................................................................................

Reason .....................................................................................................................................

...................................................................................................................................................
[4]

(c) Identify two other items included in the organisation’s digital certificate.

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

............................................................................................................................................. [2]

© UCLES 2020 9608/32/O/N/20


11

(d) Explain how the digital signature for Sam’s message is produced.

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

............................................................................................................................................. [4]

© UCLES 2020 9608/32/O/N/20 [Turn over


12

8 A car monitoring system provides information to the driver about the car’s performance and alerts
the driver to possible problems.

• Data about the car’s performance is stored in three memory locations with addresses 601 to
603.
• Location 601 contains the distance travelled in kilometres for the current trip as a binary
integer.
• Location 602 contains the quantity of fuel used in litres for the current trip, as a fixed-point
binary number with 5 places before the binary point and three places after the binary point.
• The four least significant bits of location 603 are flags used to identify problems with the car,
for example, the fuel is low. A flag is set to 1 if there is a problem, or 0 if not. These problems
are:

• Bit 0 - high engine temperature


• Bit 1 - low oil pressure
• Bit 2 - low battery
• Bit 3 - low fuel
• Bits 4 to 7 are not used

(a) The current contents of addresses 601 to 603 are:

Most significant Least significant

601 0 0 1 0 1 1 0 0
602 0 0 1 0 1 0 0 1
603 0 0 0 0 0 1 0 0

State the information that the current contents of addresses 601 to 603 will provide to the
driver.

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

............................................................................................................................................. [3]

(b) A car has low oil pressure and low fuel. It has travelled 80 kilometres and used 7.25 litres of
fuel.

Complete the contents of the addresses to record this information.

601

602

603
[3]

© UCLES 2020 9608/32/O/N/20


13

(c) The following table shows the assembly language instructions for the car performance
monitoring system. There is one general purpose register, the Accumulator (ACC).

Table 8.1

Instruction
Explanation
Label Op code Operand

LDM #n Load the number n to ACC

Load the contents of the location at the given


LDD <address>
address to ACC

STO <address> Store the contents of ACC at the given address

Bitwise AND operation of the contents of ACC


AND #n
with the numeric operand

CMP #n Compare the contents of ACC with the number n

Following a compare instruction, jump to


JPE <address>
<address> or <label> if the compare was True

JMP <address> Jump to <address> or <label>

<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 601 and 602 to
zero, and set all four least significant bits of the contents of address 603 to one.
Use the instruction set from Table 8.1.

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

..................................................................................................................................... [3]

© UCLES 2020 9608/32/O/N/20 [Turn over


14

(ii) A program continuously checks the flags. If a flag is set, the program moves to the
error-handling routine at the specified label. For example, if the engine temperature
is high, the program jumps to the label for the error-handling routine HIGHTEMP. 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 Op code Operand

CHECKFLAGS: LDD 603

AND &0F

STO TEMP

AND &01

CMP &01

JPE HIGHTEMP

LDD TEMP

AND &02

CMP

JPE LOWOIL

LDD TEMP

AND

CMP &04

JPE LOWBATT

LDD

AND &08

CMP &08

JPE LOWFUEL

JMP

TEMP:
[4]

© UCLES 2020 9608/32/O/N/20


15

BLANK PAGE

© UCLES 2020 9608/32/O/N/20


16

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
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/32/O/N/20


Cambridge International AS & A Level
* 6 9 4 3 0 9 9 5 5 6 *

COMPUTER SCIENCE 9608/33


Paper 3 Advanced Theory May/June 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 16 pages. Blank pages are indicated.

DC (SC/TP) 182132/3
© UCLES 2020 [Turn over
2

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

• 10 bits for the mantissa


• 6 bits for the exponent
• two’s complement form for both mantissa and exponent.

(a) Calculate the normalised floating-point representation of +192.5 in this system. Show your
working.

Mantissa Exponent

Working .....................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

............................................................................................................................................. [3]

(b) Calculate the normalised floating-point representation of –192.5 in this system. Show your
working.

Mantissa Exponent

Working .....................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

............................................................................................................................................. [3]

© UCLES 2020 9608/33/M/J/20


3

(c) The floating-point representation has changed. There are now 12 bits for the mantissa and 4
bits for the exponent as shown.

Mantissa Exponent

Explain why +192.5 cannot be accurately represented in this format.

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

............................................................................................................................................. [3]

2 The diagram shows four files and three methods of file organisation.

Draw one line to match each file with its most appropriate method of file organisation.

File File organisation

Text file

Sequential

File for recording the temperature every hour

Random

Master file for paying each employee every month

Serial

Customer user name and password file

[4]

© UCLES 2020 9608/33/M/J/20 [Turn over


4

3 A mobile phone company uses circuit switching for voice calls and packet switching to send and
receive other data.

(a) (i) Describe circuit switching.

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

..................................................................................................................................... [3]

(ii) Explain why the company uses circuit switching for voice calls.

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

..................................................................................................................................... [2]

(b) (i) Describe packet switching.

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

..................................................................................................................................... [3]

(ii) Explain why the company uses packet switching to send and receive other data.

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

..................................................................................................................................... [2]

© UCLES 2020 9608/33/M/J/20


5

4 (a) Write the Boolean algebraic expressions for the following logic circuit.

P
X

R
Y

X = ............................................................................................................................................

...................................................................................................................................................

Y = ............................................................................................................................................

...................................................................................................................................................
[5]

(b) The logic circuit given in part (a) is a full adder.

(i) Give the purpose of outputs X and Y in this circuit.

X ........................................................................................................................................

Y ........................................................................................................................................
[2]

(ii) Give the use of the input R in this circuit.

..................................................................................................................................... [1]

5 Complete these three statements about computer processors.

A processor with a few simple fixed-length instructions that have a small number of instruction

formats is called a ............................................................................................. processor.

A processor with many complex variable-length instructions that has many instruction formats is

called a ............................................................................................. processor.

Instruction-level parallelism, applied to the execution of instructions during the fetch-execute cycle,

is called ............................................................................................. .
[3]

© UCLES 2020 9608/33/M/J/20 [Turn over


6

6 Duraid writes a short program in a high-level programming language. An interpreter executes the
program.

The following is part of Duraid’s program.

DECLARE P, Q, R, X, Y : INTEGER
CONSTANT M = 10

P = 4
Q = 2
R = 1
X = (P + Q) * (P – Q)
Y = (M / Q) * (P + Q - R)

(a) Write the Reverse Polish Notation (RPN) for the following expression from Duraid’s program.

(P + Q) * (P – Q)

............................................................................................................................................. [2]

(b) The interpreter is executing Duraid’s program. The expressions are in infix form.

The interpreter converts the infix to RPN.

The RPN expression for Y is:

The interpreter evaluates this RPN expression using a stack.

(i) Show the changing contents of the stack, as the interpreter evaluates the expression
for Y.

Use the values of the variables and constant given in the program. The first entry has
been done for you.

10

[4]

© UCLES 2020 9608/33/M/J/20


7

(ii) Convert the following RPN expression back to its infix form.

...........................................................................................................................................

..................................................................................................................................... [2]

(c) Explain how RPN is used by an interpreter to evaluate expressions.

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

............................................................................................................................................. [2]

© UCLES 2020 9608/33/M/J/20 [Turn over


8

7 A computer at a remote weather station is performing three tasks:

• measuring and recording the temperature every 10 seconds


• measuring and recording the wind speed every 10 seconds
• sending the previous day’s temperature and wind speed readings to a scientist at another
location via the Internet.

The operating system is managing the multitasking of these tasks.

(a) At one point in time:

• the temperature measuring and recording task is idle


• the wind speed is being recorded
• the task to send the previous day’s temperature and wind speed readings is waiting for
an internet connection.

Identify the process state for each task. Give a reason why each task is in that process state.

Temperature measuring and recording process state ..............................................................

Reason .....................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

Wind speed measuring and recording process state ...............................................................

Reason .....................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

Sending process state ..............................................................................................................

Reason .....................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................
[6]

© UCLES 2020 9608/33/M/J/20


9

(b) The weather station computer uses an operating system.

Explain how this operating system uses interrupts to schedule the measuring and recording
tasks.

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

............................................................................................................................................. [4]

© UCLES 2020 9608/33/M/J/20 [Turn over


10

8 Martha wants to send a private message to Joshua over the Internet.

(a) Martha and Joshua’s computers have already exchanged digital certificates.

Identify three items that could be contained in a digital certificate.

1 ................................................................................................................................................

...................................................................................................................................................

2 ................................................................................................................................................

...................................................................................................................................................

3 ................................................................................................................................................

...................................................................................................................................................
[3]

(b) Joshua and Martha’s digital certificates are used to ensure that Martha’s message has not
been altered during transmission.

Explain how asymmetric encryption uses the contents of the digital certificates to ensure that
the message has not been altered during transmission.

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

............................................................................................................................................. [6]

© UCLES 2020 9608/33/M/J/20


11

9 A train cannot move if any of the eight automatic train doors are open. The train door monitoring
system, set out below, checks that all the doors are closed before the train can move.

• If a monitoring system detects that a door is open, it sets a specific bit in address 500 to 1.
• If the bit for door one is equal to 1, the binary value for hexadecimal FF is sent to address
501. The contents of address 501 are changed to make door 1’s light flash when the door is
open.
• If the bit for door two is equal to 1, the binary value for hexadecimal FF is sent to address
502. The contents of address 502 are changed to make door 2’s light flash when the door is
open.
This is repeated for each door from 3 to 8.
• Each door sets its bit in address 500 to zero when the door closes, and the contents of the
corresponding door address are set to zero.
• The train manager can identify which door is open from the flashing light.

The current contents of address 500 are:

Door number
1 2 3 4 5 6 7 8

Address 500 1 0 0 1 0 0 1 0

(a) Complete the following table by writing the values stored in addresses 503 to 508. Use the
contents of address 500 shown above. Note that addresses 501 and 502 are complete.

501 1 1 1 1 1 1 1 1 Door 1

502 0 0 0 0 0 0 0 0 Door 2

503 Door 3

504 Door 4

505 Door 5

506 Door 6

507 Door 7

508 Door 8
[2]

© UCLES 2020 9608/33/M/J/20 [Turn over


12

(b) The following table shows assembly language instructions for the processor controlling the
train door monitoring system that has one general purpose register, the Accumulator (ACC).

Instruction
Explanation
Label Op code Operand
LDM &n Load the hexadecimal number n to ACC
Load the contents of the location at the given address
LDD <address>
to ACC
STO <address> Store the contents of ACC at the given address
Bitwise AND the contents of ACC with the hexadecimal
AND &n
number n
Compare the contents of ACC with the hexadecimal
CMP &n
number n
Following a compare instruction, jump to <address> or
JPE <address>
<label> if the compare was True
<label>: <op code> <operand> Labels an instruction
Macro to wait one second before the next instruction is
WAIT
executed

After rechecking the doors, address 500 now contains 10101010.

(i) Complete the table by writing the values of the Accumulator (ACC) and the contents of
address 501 as these instructions are executed once to check door 1.

Instruction
ACC 501
Label Op code Operand
CHECK1: LDD 500

AND &80

CMP &00

JPE DOOR1

LDM &FF

DOOR1: STO 501

WAIT

LDM &00

STO 501

WAIT

JMP CHECK1
[4]

© UCLES 2020 9608/33/M/J/20


13

(ii) Write the assembly language instructions to check door 2.

Instruction

Label Op code Operand

[4]

(c) Explain how the check door routines show a flashing light or no light.

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

............................................................................................................................................. [2]

© UCLES 2020 9608/33/M/J/20


14

BLANK PAGE

© UCLES 2020 9608/33/M/J/20


15

BLANK PAGE

© UCLES 2020 9608/33/M/J/20


16

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
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/33/M/J/20


Cambridge Assessment International Education
Cambridge International Advanced Subsidiary and Advanced Level
* 7 4 3 3 1 2 0 2 2 3 *

COMPUTER SCIENCE 9608/33


Paper 3 Advanced Theory October/November 2019
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 (LK) 183934
© UCLES 2019 [Turn over
2

1 Real numbers are stored using floating-point representation in a computer system.

This representation uses:

• 8 bits for the mantissa, followed by


• 4 bits for the exponent.

(a) (i) A real number is stored as a 12-bit normalised binary number as follows:

Mantissa Exponent

0 1 0 1 0 0 1 0 0 0 1 0

Calculate the denary value for this binary number. Show your working.

Working .............................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

Denary value .....................................................................................................................


[3]

(ii)

Mantissa Exponent

Working .............................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................
[3]

(b) The number of bits available to represent a real number is increased to 16.

State the effect of increasing the size of the exponent by 4 bits.

...................................................................................................................................................

............................................................................................................................................. [1]

© UCLES 2019 9608/33/O/N/19


3

(c) State why some binary representations can lead to rounding errors.

...................................................................................................................................................

............................................................................................................................................. [1]

(d) Complete the following descriptions by inserting the two missing terms.

................................................ can occur in the exponent of a floating-point number, when the

exponent has become too large to be represented using the number of bits available.

A calculation results in a number so small that it cannot be represented by the number of bits

available. This is called ................................................ .


[2]

© UCLES 2019 9608/33/O/N/19 [Turn over


4

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

• a condition
• a variable
• a number
• a letter
• a digit
• an operator

condition
variable operator number

variable

variable
letter

number
digit digit

letter
a

digit operator
1 ==

2 >

3 <

© UCLES 2019 9608/33/O/N/19


5

(a) The following conditions are invalid.

Give the reason in each case.

(i) 35 > 24

Reason ..............................................................................................................................

..................................................................................................................................... [1]

(ii) abc := cba

Reason ..............................................................................................................................

..................................................................................................................................... [1]

(iii) bc < 49

Reason ..............................................................................................................................

..................................................................................................................................... [1]

(b) Complete the Backus-Naur Form (BNF) for the syntax diagram.

<operator> ::= ...................................................................................................................

...................................................................................................................................................

<number> ::= ........................................................................................................................

...................................................................................................................................................

<variable> ::= ...................................................................................................................

...................................................................................................................................................

<condition> ::= .................................................................................................................

...................................................................................................................................................
[6]

© UCLES 2019 9608/33/O/N/19 [Turn over


6

3 Protocols are essential for communication between computers.

(a) Explain why protocols are essential for communication between computers.

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

............................................................................................................................................. [2]

(b) A protocol used in bus networks is CSMA/CD.

Explain what is meant by CSMA/CD.

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

............................................................................................................................................. [4]

© UCLES 2019 9608/33/O/N/19


7

4 A Boolean expression produces the following truth table.

INPUT OUTPUT
A B C X
0 0 0 1
0 0 1 1
0 1 0 0
0 1 1 1
1 0 0 0
1 0 1 1
1 1 0 0
1 1 1 1

(a) Write the Boolean expression for the truth table as a sum-of-products.

X = ...................................................................................................................................... [2]

(b) Complete the Karnaugh Map (K-map) for the truth table above.

AB

00 01 11 10

0
C
1

[1]

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

(c) Draw loops around appropriate groups in the K-map in part (b) to produce an optimal sum-of-
products. [2]

(d) Write, using your answer to part (c), a simplified sum-of-products expression for the truth
table.

X = ...................................................................................................................................... [2]

© UCLES 2019 9608/33/O/N/19 [Turn over


8

5 (a) Explain why user-defined data types are necessary.

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

............................................................................................................................................. [2]

(b) An organisation stores data about its employees.

• Employee ID is a five-digit number, for example, 01234.



• Department is one of three values: Sales, Technical, Customer services.
• Salary is an integer value in the range 25 000 to 150 000.

(i) Complete the following pseudocode definition of a user-defined data type to store the
employee data.

TYPE Employee

DECLARE EmployeeID : ....................................................................................

DECLARE EmployeeName : STRING

DECLARE Department : ( .................................................................................

..................................................................................)

DECLARE Salary : 25000..150000

...........................................................................................................................................
[4]

(ii) Write a pseudocode statement to declare a variable, NewEmployee of data type


Employee.

...........................................................................................................................................

..................................................................................................................................... [1]

(iii) Write a pseudocode statement that assigns 02244 to the EmployeeID of


NewEmployee.

...........................................................................................................................................

..................................................................................................................................... [1]

(iv) Employee is an example of a record that is a composite data type.

State two other composite data types.

1 ........................................................................................................................................

2 ........................................................................................................................................
[2]
© UCLES 2019 9608/33/O/N/19
9

6 (a) An operating system (OS) uses a memory management technique called paging.

Explain what is meant by the following terms.

Page .........................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

Page frame ...............................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

Page table ................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................
[3]

(b) Explain why an operating system needs to use scheduling algorithms.

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

............................................................................................................................................. [3]

(c) State what is meant by an interrupt.

...................................................................................................................................................

............................................................................................................................................. [1]

© UCLES 2019 9608/33/O/N/19 [Turn over


10

(d) For a computer system using multi-programming, the low-level scheduler decides which
process will get next use of the processor.

One algorithm could be a round-robin, which means every process gets use of the processor
in sequence for a fixed amount of time (time-slice).

For a round-robin algorithm, five processes are currently loaded and get the use of the
processor in the sequence:

JOB21 – JOBSS – JOBPT – JOB32 – JOB42, then return to JOB21

Process JOB32 has just completed its time-slice.

The following paragraph describes what happens next. Complete the paragraph by inserting
the missing processes.

Interrupt received from the low-level scheduler. Save all register contents for

................................................ .

Copy the saved registers for ................................................ to the CPU.

The processor will now process ................................................ .


[3]

© UCLES 2019 9608/33/O/N/19


11

7 (a) Identify the four layers of the TCP/IP protocol suite.

1 ................................................................................................................................................

2 ................................................................................................................................................

3 ................................................................................................................................................

4 ................................................................................................................................................
[4]

(b) The TCP/IP protocol suite is responsible for transmitting data across the Internet using packet
switching.

(i) Explain why packet switching is used when sending data across the Internet.

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

..................................................................................................................................... [2]

(ii) Each packet requires a header.

Describe the purpose of a packet header.

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

..................................................................................................................................... [2]

(iii) Identify three items that should be contained in a packet header.

Item 1 ................................................................................................................................

...........................................................................................................................................

Item 2 ................................................................................................................................

...........................................................................................................................................

Item 3 ................................................................................................................................

...........................................................................................................................................
[3]

© UCLES 2019 9608/33/O/N/19 [Turn over


12

8 Digital certificates are used in internet communications. A Certificate Authority (CA) is responsible
for issuing a digital certificate.

(a) Identify two data items present in a digital certificate.

1 ................................................................................................................................................

2 ................................................................................................................................................
[2]

(b) The following paragraph describes how a digital signature is produced. Complete the
paragraph by inserting an appropriate term in each space.

A ................................................ algorithm is used to generate a message digest from the

................................................ .
[3]

© UCLES 2019 9608/33/O/N/19


13

9 (a) The following incomplete table shows descriptions relating to computer architectures.

Complete the table by inserting the appropriate terms.

Description Term
• There are several processors.
A • Each processor executes different sets of instructions .........................................
on one set of data at the same time.
• The processor has several ALUs.
B • Each ALU executes the same set of instructions on .........................................
different sets of data at the same time.
• There is only one processor.
C • The processor executes one set of instructions on one .........................................
set of data.
• There are several processors.
D • Each processor executes a different set of instructions. .........................................
• Each processor operates on different sets of data.
[4]

(b) State three characteristics of massively parallel computers.

1 ................................................................................................................................................

...................................................................................................................................................

2 ................................................................................................................................................

...................................................................................................................................................

3 ................................................................................................................................................

...................................................................................................................................................
[3]

© UCLES 2019 9608/33/O/N/19


16

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
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 2019 9608/33/O/N/19


Cambridge Assessment International Education
Cambridge International Advanced Subsidiary and Advanced Level
* 4 9 6 2 0 8 4 7 7 5 *

COMPUTER SCIENCE 9608/32


Paper 3 Advanced Theory October/November 2019
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 (ST) 171621/2
© UCLES 2019 [Turn over
2

1 (a) The following incomplete table shows descriptions relating to the security of data transmission.

Complete the table with the appropriate terms.

Description Term

A The original data to be transmitted as a message .........................................

An electronic document from a trusted authority that


B .........................................
ensures authentication

An encryption method produced by a trusted authority


C .........................................
that can be used by anyone

[3]

(b) (i) Explain the purpose of a digital signature.

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

..................................................................................................................................... [2]

(ii) Describe how a digital signature is produced for transmission with the message.

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

..................................................................................................................................... [3]

© UCLES 2019 9608/32/O/N/19


3

2 (a) A Boolean expression produces the following truth table.

INPUT OUTPUT
A B C X
0 0 0 1
0 0 1 1
0 1 0 1
0 1 1 1
1 0 0 1
1 0 1 1
1 1 0 0
1 1 1 0

(i) Write the Boolean expression for the truth table by applying the sum-of-products.

X = .....................................................................................................................................

..................................................................................................................................... [3]

(ii) Complete the Karnaugh Map (K-map) for the truth table in part (a).

AB

00 01 11 10

0
C
1

[1]

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

(iii) Draw loop(s) around appropriate groups in the table in part (a)(ii), to produce an optimal
sum-of-products. [2]

(iv) Write, using your answer to part (a)(iii), a simplified Boolean expression for your
Karnaugh map.

X = ............................................................................................................................... [2]

© UCLES 2019 9608/32/O/N/19 [Turn over


4

(b)

(W + X) (Y + Z)

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

............................................................................................................................................. [3]

© UCLES 2019 9608/32/O/N/19


5

3 A computing department in a school has a Local Area Network (LAN) with a bus topology.

(a) A description of sending a message on a bus network is given.

Complete the following description by inserting an appropriate term in each space.

Computer 1 and Computer 2 are on the same bus network. Computer 1 sends a message to

Computer 2. Before the message is sent, it is split into ................................................ .

Computer 1 needs to check that the ................................................ is free, before sending the

message, otherwise a ................................................ will occur that will be managed by the

................................................ protocol.
[4]

(b)

Explain how each device is used in the operation of the bus network.

Router .......................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

Network Interface Card (NIC) ...................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................
[4]

© UCLES 2019 9608/32/O/N/19 [Turn over


6

(c)
devices.

(i) Identify two types of hardware components the computing department will need to allow
wireless connection.

1 .........................................................................................................................................

2 .........................................................................................................................................
[2]

(ii) Describe how the wireless connection sends and receives data.

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

..................................................................................................................................... [4]

© UCLES 2019 9608/32/O/N/19


7

4 Physical memory is managed using virtual memory and paging.

(a) Describe what is meant by virtual memory.

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

............................................................................................................................................. [2]

(b) (i) Explain how paging is used to manage virtual memory.

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

..................................................................................................................................... [4]

(ii) Give a suitable page replacement algorithm for this process.

..................................................................................................................................... [1]

(iii) One drawback of using virtual memory is disk thrashing.

Describe what is meant by the term disk thrashing.

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

..................................................................................................................................... [2]

© UCLES 2019 9608/32/O/N/19 [Turn over


8

5 A weather station uses monitoring and control systems.

(a) Describe the difference between a monitoring system and a control system.

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

............................................................................................................................................. [2]

(b) (i) The weather station records how the outside temperature changes over a period of time.
The system will read the temperature once every hour, over a period of 100 days.

The temperature readings are automatically stored in a file. No other data are stored.

Explain why the weather station has decided to use serial organisation for the file.

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

..................................................................................................................................... [2]

(ii) Serial files can be accessed using sequential access.

Explain how sequential access could be used for the temperature readings file.

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

..................................................................................................................................... [2]

(iii) Name and describe a method of file organisation other than serial or sequential.

Method ..............................................................................................................................

Description ........................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................
[4]
© UCLES 2019 9608/32/O/N/19
9

6 (a) State what is meant by a user-defined data type.

...................................................................................................................................................

............................................................................................................................................. [2]

(b) A pseudocode declaration for a user-defined data type for the months of the year is as follows:

TYPE
DECLARE Months: (January, February, March, April, May, June, July,
August, September, October, November, December)
ENDTYPE

(i) Identify this type of user-defined data type.

...........................................................................................................................................

..................................................................................................................................... [1]

(ii) Write a pseudocode statement to declare a variable CurrentMonth of data type


Months.

...........................................................................................................................................

..................................................................................................................................... [1]

(iii) Write a pseudocode statement to assign the value August to the variable
CurrentMonth.

...........................................................................................................................................

..................................................................................................................................... [1]

© UCLES 2019 9608/32/O/N/19 [Turn over


10

7 The following are the first few lines of a source code program written in a high-level language. The
source code program is to be translated by the language compiler.

// program written on 15 June 2019

DECLARE IsFound : Boolean;


DECLARE NoOfChildren : Integer;
DECLARE Count : Integer;
Constant TaxRate = 15;

// start of main program


For Count = 1 to 50


(a) During the lexical analysis stage, the compiler will use a keyword table and a symbol table.

(i) Identify two types of data in the keyword table.

Type 1 ................................................................................................................................

Type 2 ................................................................................................................................
[2]
(ii) Identify two types of data in the symbol table.

Type 1 ................................................................................................................................

Type 2 ................................................................................................................................
[2]

(iii) Explain how the contents of the keyword and symbol tables are used to translate the
source code program.

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

..................................................................................................................................... [2]

(iv) State one additional task completed at the lexical analysis stage that does not involve
the use of a keyword or a symbol table.

...........................................................................................................................................

..................................................................................................................................... [1]

© UCLES 2019 9608/32/O/N/19


11

(b) The final stage of compilation can be code optimisation.

Explain why code is optimised.

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

............................................................................................................................................. [2]

© UCLES 2019 9608/32/O/N/19 [Turn over


12

8 (a)
complement form. The twelve most significant bits are used for the mantissa and the four
least significant bits are used for the exponent.

Most Least
significant bit significant bit

0 1 1 1 0 0 0 0 0 0 0 0 1 1 0 1

(i) Identify the binary value of the exponent.

..................................................................................................................................... [1]

(ii) Identify the binary value of the mantissa.

..................................................................................................................................... [1]

(iii) State whether the number stored is positive or negative. Justify your choice.

Positive or negative ...........................................................................................................

Justification .......................................................................................................................

...........................................................................................................................................

...........................................................................................................................................
[2]

(iv) Convert the binary floating-point number in part (a) into denary. Show your working.

Working .............................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

Denary value .....................................................................................................................


[3]

© UCLES 2019 9608/32/O/N/19


13

(b) The number of bits used for the exponent is increased to eight, and the number of bits used
for the mantissa is decreased to eight.

State the effects of this change.

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

............................................................................................................................................. [2]

© UCLES 2019 9608/32/O/N/19


14

BLANK PAGE

© UCLES 2019 9608/32/O/N/19


15

BLANK PAGE

© UCLES 2019 9608/32/O/N/19


16

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
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 2019 9608/32/O/N/19


Cambridge Assessment International Education
Cambridge International Advanced Subsidiary and Advanced Level
* 2 2 6 4 6 8 4 0 1 8 *

COMPUTER SCIENCE 9608/33


Paper 3 Advanced Theory May/June 2019
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 (ST/CT) 163543/2
© UCLES 2019 [Turn over
2

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

• twelve bits for the mantissa


• four bits for the exponent.

(a) Calculate the denary value for the following binary floating-point number.

Show your working.

Mantissa Exponent

1 0 0 1 0 1 1 1 0 0 1 1 0 1 1 1

Working .....................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

Answer ......................................................................................................................................
[3]

(b) Calculate the normalised floating-point representation of +1.5625 in this system.

Show your working.

Working .....................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

Mantissa Exponent

[3]

© UCLES 2019 9608/33/M/J/19


3

(c) (i) Write the largest positive number that can be stored as a normalised floating-point
number using this format.

Mantissa Exponent

[2]

(ii) Write the smallest non-zero positive number that can be stored as a normalised
floating-point number using this format.

Mantissa Exponent

[2]

(d) The developer of a new programming language decides that all real numbers will now be
stored using 20-bit normalised floating-point representation. She must decide how many bits
to use for the mantissa and how many bits for the exponent.

Explain the trade-off between using either a large number of bits for the mantissa, or a large
number of bits for the exponent.

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

............................................................................................................................................. [3]

© UCLES 2019 9608/33/M/J/19 [Turn over


4

2 Cables connect the computers in a university admissions department in a star topology. The
server room contains the server and printer for the employees to use. The department has three
employees. Each employee has a computer connected to the star network.

(a) (i) Draw a diagram to show this topology.

[3]

(ii) Explain the benefits to the admissions department of using a star topology.

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

..................................................................................................................................... [4]

© UCLES 2019 9608/33/M/J/19


5

(b) Each department of the university has its own network. All the department networks connect

CSMA/CD protocol.

Describe the CSMA/CD protocol.

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

............................................................................................................................................. [3]

(c) Explain how the following devices are used to support the university LAN.

(i) Router ...............................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

..................................................................................................................................... [2]

(ii) Network Interface Card (NIC) ............................................................................................

...........................................................................................................................................

...........................................................................................................................................

..................................................................................................................................... [2]

(iii) Wireless Access Point .......................................................................................................

...........................................................................................................................................

...........................................................................................................................................

..................................................................................................................................... [2]

© UCLES 2019 9608/33/M/J/19 [Turn over


6

3 (a) The following logic circuit can be simplified to use only one gate.

Give the name of this single gate.

............................................................................................................................................. [1]

(b) (i) Complete the truth table for the logic circuit.

Working space
A B X Y

0 0

0 1

1 0

1 1

[2]

(ii) Give the name of the logic circuit that has this truth table.

..................................................................................................................................... [1]

(iii) Give the uses for outputs X and Y.

X ........................................................................................................................................

Y ........................................................................................................................................
[2]

© UCLES 2019 9608/33/M/J/19


7

(c) Consider the following Boolean algebraic expression:

A.B.C.D + A.B.C.D + A.B.C.D + A.B.C.D + A.B.C.D

Use Boolean algebra to simplify the expression. Show your working.

Working ..................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

Simplified expression ....................................................................................................... [5]

© UCLES 2019 9608/33/M/J/19 [Turn over


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
<> 04

IF 4A
THEN 4B
ENDIF 4C
ELSE 4D
REPEAT 4E
UNTIL 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 piece of pseudocode.

Counter 0
INPUT Password
REPEAT
IF Password <> "Cambridge"
THEN
INPUT Password
ENDIF
Counter Counter + 1
UNTIL Password = "Cambridge"
OUTPUT Counter

© UCLES 2019 9608/33/M/J/19


9

(a) Complete the symbol table to show its contents after the lexical analysis stage.

Token
Symbol
Value Type
Counter 60 Variable

[3]

(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 using the keyword table and your answer to
part (a).

60 01
[2]

© UCLES 2019 9608/33/M/J/19 [Turn over


10

(c) The following table shows assembly language instructions for a processor which has one
general purpose register, the Accumulator (ACC).

Instruction
Explanation
Op code Operand
Direct addressing. Load the contents of the location at the given
LDD <address>
address to ACC
ADD <address> Add the contents of the given address to the ACC
STO <address> Store the contents of ACC at the given address

After the syntax analysis is completed successfully, the compiler generates object code.

The following lines of high level language code are compiled.

X = X + Y
Z = Z + X

The compilation produces the assembly language code as follows:

LDD 236
ADD 237
STO 236
LDD 238
ADD 236
STO 238

(i) The final stage in the compilation process that follows this code generation stage is code
optimisation.

Rewrite the equivalent code after optimisation.

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

..................................................................................................................................... [3]

(ii) Explain why code optimisation is necessary.

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

..................................................................................................................................... [2]

© UCLES 2019 9608/33/M/J/19


11

5 (a) Wiktor is an employee of a travel agent. He uses asymmetric encryption to send confidential
information to his manager.

Fill in the spaces with an appropriate term to complete the descriptions.

Asymmetric encryption uses different ……………………………. for encrypting and decrypting

data. When Wiktor sends a message to his manager, the message is encrypted into

manager receives the message, it is decrypted using her ……………………………. key.

key, and when Wiktor receives the message, it is decrypted into …………………………….

using his ……………………………. key. [5]

(b) When customers pay for their travel booking online, a secure connection is established using
Secure Socket Layer (SSL).

a secure connection.

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

............................................................................................................................................. [6]

© UCLES 2019 9608/33/M/J/19 [Turn over


12

(c) The manager is concerned about the threat of malware to the company computer systems.

Name two types of malware. State what the company should do to help prevent the effect of
the malware.

The two methods of prevention must be different.

Malware type 1 .........................................................................................................................

Prevention ................................................................................................................................

...................................................................................................................................................

Malware type 2 .........................................................................................................................

Prevention ................................................................................................................................

...................................................................................................................................................
[4]

© UCLES 2019 9608/33/M/J/19


13

6 Monitoring and control systems have many different applications.

(a) Explain the importance of feedback in a control system.

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

............................................................................................................................................. [3]

(b) An indoor swimming pool is to be kept at a constant temperature of 28 degrees.

Describe the use of feedback in this control system.

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

............................................................................................................................................. [4]

(c) Give one example of a monitoring system. Explain why this is a monitoring system.

Monitoring system ....................................................................................................................

...................................................................................................................................................

Explanation ...............................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................
[3]

© UCLES 2019 9608/33/M/J/19


14

BLANK PAGE

© UCLES 2019 9608/33/M/J/19


15

BLANK PAGE

© UCLES 2019 9608/33/M/J/19


16

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
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 2019 9608/33/M/J/19


Cambridge Assessment International Education
Cambridge International Advanced Subsidiary and Advanced Level
* 6 6 9 0 1 5 7 2 9 8 *

COMPUTER SCIENCE 9608/32


Paper 3 Advanced Theory May/June 2019
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 11 printed pages and 1 blank page.

DC (ST) 163542/3
© UCLES 2019 [Turn over
2

1 (a) A computer stores real numbers using floating-point representation. The floating-point
numbers have:

• eight bits for the mantissa


• four bits for the exponent.

(i) Calculate the denary value of the following floating-point number.

Show your working.

Mantissa Exponent

0 0 1 1 0 1 1 1 0 1 0 1

Working .............................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

Answer ..............................................................................................................................
[3]

(ii) State why the floating-point number in part (a)(i) is not normalised.

...........................................................................................................................................

..................................................................................................................................... [1]

(iii) Give the floating-point number in part (a)(i)

Mantissa Exponent

[2]

© UCLES 2019 9608/32/M/J/19


3

(b) (i) Convert the denary number +11.625 into a normalised floating-point number.

Show your working.

Working .............................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

Mantissa Exponent

[3]

(ii)

Show your working.

Working .............................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

Mantissa Exponent

[3]

© UCLES 2019 9608/32/M/J/19 [Turn over


4

(c) A student enters the following into an interpreter:

OUTPUT(0.2 * 0.4)

The student is surprised to see that the interpreter outputs the following:

0.08000000000000002

Explain why the interpreter outputs this value.

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

............................................................................................................................................. [3]

2 Packet switching can be used to transmit data across the Internet.

Packet switching is not always the most appropriate method of transferring data.

(a) Name an alternative method of transferring data across the Internet.

............................................................................................................................................. [1]

(b) Give an example of a situation where the method you identified in part (a) is more appropriate.

Justify your choice.

Example ....................................................................................................................................

...................................................................................................................................................

Justification ...............................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................
[3]

© UCLES 2019 9608/32/M/J/19


5

3 (a) A Boolean algebraic expression produces the following truth table.

INPUT OUTPUT
A B C X
0 0 0 1
0 0 1 1
0 1 0 1
0 1 1 1
1 0 0 1
1 0 1 1
1 1 0 0
1 1 1 0

(i) Complete the Karnaugh Map (K-map) for the truth table.

AB

00 01 11 10

0
C
1

[1]

The K-map can be used to simplify the expression that produced the truth table in part (a).

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

(iii) Write the simplified sum-of-products Boolean expression for the truth table.

X = ............................................................................................................................... [2]

© UCLES 2019 9608/32/M/J/19 [Turn over


6

(b) A logic circuit with four inputs produces the following truth table.

INPUT OUTPUT
A B C D X
0 0 0 0 0
0 0 0 1 0
0 0 1 0 1
0 0 1 1 1
0 1 0 0 0
0 1 0 1 0
0 1 1 0 1
0 1 1 1 1
1 0 0 0 1
1 0 0 1 1
1 0 1 0 0
1 0 1 1 0
1 1 0 0 1
1 1 0 1 1
1 1 1 0 0
1 1 1 1 0

(i) Complete the K-map for the truth table.

AB

CD

[4]

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

(iii) Write the simplified sum-of-products Boolean algebraic expression for the truth table.

X = ............................................................................................................................... [2]

© UCLES 2019 9608/32/M/J/19


7

4 (a) Describe the main steps in the evaluation of a Reverse Polish Notation (RPN) expression
using a stack.

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

............................................................................................................................................. [4]

(b) The infix expression 8 * (5 – 2) – 30 / (2 * 3) converts to:

8 5 2 – * 30 2 3 * / –

in Reverse Polish Notation (RPN).

Show the changing contents of the stack as this RPN expression is evaluated.

[4]

© UCLES 2019 9608/32/M/J/19 [Turn over


8

5 Sanjeet is a member of the public, and he wants to send a private message to a government
department.

(a) Explain how asymmetric encryption is used to ensure that the message remains private.

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

............................................................................................................................................. [2]

(b) When the government department replies to Sanjeet, it needs to send a verified message.

Explain how asymmetric encryption can be used to ensure that it is a verified message.

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

............................................................................................................................................. [2]

(c)

(i) Describe two vulnerabilities that malware can exploit in computer systems.

1 ........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

2 .........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................
[4]

(ii) Identify one method that can be used to restrict the effect of malware.

...........................................................................................................................................

..................................................................................................................................... [1]
© UCLES 2019 9608/32/M/J/19
9

6 A company sells plant watering systems that automatically turn on water sprinklers when the soil
becomes too dry.

The plant watering system has a processor and connecting cables.

Identify two other hardware devices that are required in this system. State the purpose of each
device.

Device 1 ...........................................................................................................................................

Purpose ............................................................................................................................................

..........................................................................................................................................................

Device 2 ...........................................................................................................................................

Purpose ............................................................................................................................................

..........................................................................................................................................................
[4]

© UCLES 2019 9608/32/M/J/19 [Turn over


10

7 (a) RISC (Reduced Instruction Set Computing) and CISC (Complex Instruction Set Computing)
are two types of processor.

Tick ( ) one box in each row to show if the statement applies to RISC or CISC processors.

Statement RISC CISC

Larger instruction set

Variable length instructions

Smaller number of instruction formats

Pipelining is easier

Microprogrammed control unit

Multi-cycle instructions

[3]

(b) In parallel processing, a computer can have multiple processors running in parallel.

(i) State the four basic computer architectures used in parallel processing.

1 ........................................................................................................................................

2 ........................................................................................................................................

3 ........................................................................................................................................

4 ........................................................................................................................................
[4]

(ii) Describe what is meant by a massively parallel computer.

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

..................................................................................................................................... [3]

© UCLES 2019 9608/32/M/J/19


11

8 (a) A computer process can be in one of three states.

Identify and describe two of these states.

State 1 ......................................................................................................................................

Description ................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

State 2 ......................................................................................................................................

Description ................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................
[6]

(b) One of the main tasks of an operating system is resource management.

Describe how an operating system can maximise the use of resources.

Primary memory .......................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

Disk ...........................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................
[6]

© UCLES 2019 9608/32/M/J/19


12

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
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 2019 9608/32/M/J/19


Cambridge International Examinations
Cambridge International Advanced Subsidiary and Advanced Level
* 4 7 6 4 0 7 1 7 7 4 *

COMPUTER SCIENCE 9608/33


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 14 printed pages and 2 blank pages.

DC (LEG) 173054
© UCLES 2018 [Turn over
2

Question 1 begins on the next page.

© UCLES 2018 9608/33/O/N/18


3

1 Consider the following user-defined data type.

TYPE Book
DECLARE ISBN : INTEGER
DECLARE Author : STRING
DECLARE Title : STRING
DECLARE Supplier : (Amazone, Stones, Smiths, Blackwalls, Greens,
Coals, Boarders)
ENDTYPE

(a) Name the data type of Book.

...............................................................................................................................................[1]

(b) Name the non-composite data type used in the Supplier declaration.

...............................................................................................................................................[1]

(c) (i) Write a pseudocode statement to declare a variable, BestSeller, of type Book.

.......................................................................................................................................[1]

(ii) Write a pseudocode statement to assign “John Williams” to the author of


BestSeller.

.......................................................................................................................................[1]

© UCLES 2018 9608/33/O/N/18 [Turn over


4

2 (a) A computer system stores real numbers using floating-point representation. The floating-point
numbers have:

• eight bits for the mantissa


• four bits for the exponent.

(i) Calculate the denary value of the following floating-point number.

Mantissa Exponent

0 0 1 1 1 0 0 0 0 1 1 1

Show your working.

Working .............................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

Answer ..............................................................................................................................
[3]

(ii) State how you know the floating-point number in part (a)(i) is not normalised.

...........................................................................................................................................

.......................................................................................................................................[1]

(iii) Normalise the floating-point number in part (a)(i).

Mantissa Exponent

[2]

(b) (i) Write the largest positive number that this system can represent as a normalised
floating-point number in this format.

Mantissa Exponent

[2]

© UCLES 2018 9608/33/O/N/18


5

(ii) Write the smallest positive number that can be stored as a normalised floating-point
number in this format.

Mantissa Exponent

[2]

(c) The number of bits available to represent a real number is increased to 16.

State the effect this has on the numbers that can be represented, if the additional four bits are
used in the:

(i) mantissa ............................................................................................................................

.......................................................................................................................................[1]

(ii) exponent ...........................................................................................................................

.......................................................................................................................................[1]

(d) A student enters the following code into an interpreter.

X = 0.1
Y = 0.2
Z = 0.3
OUTPUT (X + Y + Z)

The student is surprised to see the output:

0.6000000000000001

Explain why this is output.

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...............................................................................................................................................[3]

© UCLES 2018 9608/33/O/N/18 [Turn over


6

3 A local college has CSMA/CD in operation on its Local Area Network (LAN).

(a) One function of CSMA/CD is to monitor traffic on the network.

State two other tasks performed by CSMA/CD.

1 ................................................................................................................................................

2 ................................................................................................................................................
[2]

(b) The network uses the TCP/IP protocol to transfer files across the network.

(i) State three functions of the TCP part of this protocol.

1 ........................................................................................................................................

...........................................................................................................................................

2 ........................................................................................................................................

...........................................................................................................................................

3 ........................................................................................................................................

...........................................................................................................................................
[3]

(ii) State two functions of the IP part of this protocol.

1 ........................................................................................................................................

2 ........................................................................................................................................
[2]

(iii) Identify one other common protocol that could be used to transfer files across the college
network.

.......................................................................................................................................[1]

(c) Protocols are essential for successful transmission of data over a network. The TCP/IP
protocol suite operates on many layers.

Give an appropriate protocol for each layer in the table.

Layer Protocol

Application

Transport

Internet

[3]

© UCLES 2018 9608/33/O/N/18


7

(d) The TCP/IP protocol is used to send an email message from one node on a LAN to a node on
a different LAN.

State the steps that take place when the email message is sent and received.

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...............................................................................................................................................[4]

© UCLES 2018 9608/33/O/N/18 [Turn over


8

4 (a) A Boolean expression corresponds to the following truth table.

INPUT OUTPUT
A B C X
0 0 0 0
0 0 1 0
0 1 0 0
0 1 1 1
1 0 0 0
1 0 1 1
1 1 0 1
1 1 1 1

(i) Write the Boolean expression for the truth table by applying the sum-of-products.

X = .................................................................................................................................[2]

(ii) Complete the Karnaugh Map (K-map) for the truth table.

AB

00 01 11 10

0
C
1

[1]

(iii) The K-map can be used to simplify the expression in part (a)(i).

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

(iv) Write the simplified sum-of-products expression for your answer to part (a)(iii).

X = .................................................................................................................................[3]

© UCLES 2018 9608/33/O/N/18


9

(b) A logic circuit with four inputs produces the following truth table.

INPUT 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

(i) Complete the K-map that corresponds to the truth table.

AB

CD

[4]

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

(iii) Write the simplified sum-of-products expression for your answer to part (b)(ii).

X = .................................................................................................................................[2]

© UCLES 2018 9608/33/O/N/18 [Turn over


10

5 A computer process can be in one of three states: running, ready or blocked.

(a) Explain how the processes are affected when the following events take place.

(i) The running process needs to read a file from a disk.

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

.......................................................................................................................................[2]

(ii) The running process uses up its time slice.

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

.......................................................................................................................................[2]

(b) (i) State the conditions that are necessary for a process to move from the ready to the
running state.

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

.......................................................................................................................................[2]

(ii) State the conditions that are necessary for a process to move from the blocked to the
ready state.

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

.......................................................................................................................................[2]

© UCLES 2018 9608/33/O/N/18


11

(c) Give three reasons why process scheduling is needed.

1 ................................................................................................................................................

...................................................................................................................................................

2 ................................................................................................................................................

...................................................................................................................................................

3 ................................................................................................................................................

...................................................................................................................................................
[3]

© UCLES 2018 9608/33/O/N/18 [Turn over


12

6 The compilation process has a number of stages. The first stage is lexical analysis.

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
THEN 4B
ENDIF 4C
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.

Start 1
INPUT Number
// Output values in a loop
FOR Counter Start TO 12
OUTPUT Number * Counter
ENDFOR

© UCLES 2018 9608/33/O/N/18


13

(a) Complete the symbol table to show its contents after the lexical analysis stage.

Token
Symbol
Value Type

Start 60 Variable

1 61 Constant

[3]

(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 stage. Use the keyword table and your answer
to part (a).

60 01
[2]

(c) The output of the lexical analysis stage is the input to the syntax analysis stage.

Identify two tasks in syntax analysis.

1 ................................................................................................................................................

...................................................................................................................................................

2 ................................................................................................................................................

...................................................................................................................................................
[2]

(d) The final stage of compilation is optimisation.

(i) Code optimisation produces code that minimises the amount of memory used.

Give one additional reason why code optimisation is performed.

...........................................................................................................................................

.......................................................................................................................................[1]

© UCLES 2018 9608/33/O/N/18 [Turn over


14

(ii) A student uses the compiler to compile some different code.

After the syntax analysis stage is complete, the compiler generates object code.

The following lines of code are compiled.

X A + B
Y A + B + C
Z A + B + C + D

The compilation produces the following assembly language code.

LDD 236 // loads value A to accumulator


ADD 237 // adds value B to accumulator
STO 512 // stores accumulator in X
LDD 236 // loads value A to accumulator
ADD 237 // adds value B to accumulator
ADD 238 // adds value C to accumulator
STO 513 // stores accumulator in Y
LDD 236 // loads value A to accumulator
ADD 237 // adds value B to accumulator
ADD 238 // adds value C to accumulator
ADD 239 // adds value D to accumulator
STO 514 // stores accumulator in Z

Rewrite the assembly language code after it has been optimised.

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

.......................................................................................................................................[5]

© UCLES 2018 9608/33/O/N/18


15

BLANK PAGE

© UCLES 2018 9608/33/O/N/18


16

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/33/O/N/18


Cambridge International Examinations
Cambridge International Advanced Subsidiary and Advanced Level
* 7 8 2 5 2 0 0 9 7 3 *

COMPUTER SCIENCE 9608/32


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

(i) Calculate the denary value of the following floating-point number. It is not in normalised
form.

Mantissa Exponent

0 0 1 0 1 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


3

(iii)

Show your working.

Mantissa Exponent

Working .............................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................
[3]

(b) A normalised floating-point number is shown.

Mantissa Exponent

0 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1

(i) 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 (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 (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


6

(b) (i) Complete the truth table for the following logic circuit.

A B C

Working space
A B C X

0 0 0

0 0 1

0 1 0

0 1 1

1 0 0

1 0 1

1 1 0

1 1 1

[2]

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

AB

00 01 11 10

0
C
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
7

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

INPUT 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

(i) 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


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
THEN 4B
ENDIF 4C
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.

Token
Symbol
Value Type
Number1 60 Variable
Number2 61 Variable

[3]
© UCLES 2018 9608/32/O/N/18
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

The compilation produces the following assembly language code.

LDD 236 // loads value A into accumulator


ADD 237 // adds value B to accumulator
ADD 238 // adds value C to accumulator
STO 540 // stores accumulator in temporary location
LDD 540 // loads value from temporary location into accumulator
SUB 239 // subtracts value D from accumulator
STO 235 // stores accumulator in X

(i) 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) 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:

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


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.

Time interval
Stage
1 2 3 4 5 6 7 8 9
Fetch instruction 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

(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
The result of encryption that is transmitted to the
A
recipient. .................................
The type of cryptography used where different keys are
B
used; one for encryption and one for decryption. .................................

.........................................................................................

.........................................................................................
C Digital certificate
.........................................................................................

.........................................................................................

.........................................................................................

.........................................................................................
D Private key
.........................................................................................

.........................................................................................

[4]

© UCLES 2018 9608/32/O/N/18


13

(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.

If the browser trusts the certificate, it creates, encrypts and sends the server a
A

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.
[3]

© UCLES 2018 9608/32/O/N/18


14

BLANK PAGE

© UCLES 2018 9608/32/O/N/18


15

BLANK PAGE

© UCLES 2018 9608/32/O/N/18


16

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


Cambridge International Examinations
Cambridge International Advanced Subsidiary and Advanced Level
* 3 5 5 6 5 3 5 0 3 1 *

COMPUTER SCIENCE 9608/33


Paper 3 Advanced Theory May/June 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 15 printed pages and 1 blank page.

DC (RW/CT) 150988/3
© UCLES 2018 [Turn over
2

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

• 12 bits for the mantissa


• 4 bits for the exponent

(a) Find the denary value for the following binary floating-point number.

Mantissa Exponent

1 0 1 1 1 0 0 1 1 0 1 0 0 1 0 1

Show your working.

Working .....................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

Answer ......................................................................................................................................
[3]

(b) Calculate the normalised floating-point representation of 5.25 in this system. Show your
working.

Working .....................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

Mantissa Exponent

[3]

© UCLES 2018 9608/33/M/J/18


3

(c) The size of the mantissa is decreased and the size of the exponent is increased.

State how this affects the range and precision of the numbers that the computer system can
represent.

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...............................................................................................................................................[2]

2 A programmer uses non-composite and composite data types to create a program.

(a) Define the term non-composite data type.

...................................................................................................................................................

...............................................................................................................................................[1]

(b) Describe two different non-composite data types.

Data type 1 ...............................................................................................................................

Description ................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

Data type 2 ...............................................................................................................................

Description ................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................
[4]

(c) Define the term composite data type.

...................................................................................................................................................

...............................................................................................................................................[1]

© UCLES 2018 9608/33/M/J/18 [Turn over


4

(d) Describe two different composite data types.

Data type 1 ...............................................................................................................................

Description ................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

Data type 2 ...............................................................................................................................

Description ................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................
[4]

3 Star and bus are two types of topology that can be used in a Local Area Network (LAN).

Bus topology

Star topology

(a) (i) State one benefit and one drawback of the star topology.

Benefit ...............................................................................................................................

...........................................................................................................................................

Drawback ..........................................................................................................................

...........................................................................................................................................
[2]

(ii) State one benefit and one drawback of the bus topology.

Benefit ...............................................................................................................................

...........................................................................................................................................

Drawback ..........................................................................................................................

...........................................................................................................................................
[2]
© UCLES 2018 9608/33/M/J/18
5

(b) The sequence of steps 1 to 7 describes what happens when the LAN transmits data from
Computer X to Computer Y using circuit switching. Four statements (4 to 7) are missing from
the sequence.

A Computer X sends the data.


B The sender signals node to deallocate resources.
C Computer Y sends a receipt signal.
D If available, Computer X sets up path between nodes.

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

1 Computer X sends a connection request to Computer Y.

2 Computer Y sends ready or busy signal.

3 If busy, Computer X waits and then resends the connection request to Computer Y.

4 ……………

5 ……………

6 ……………

7 ……………
[3]

(c) (i) Protocols are essential for successful transmission of data over a network. The TCP/IP
protocol suite operates on many layers.

State the appropriate layer for each protocol in the following table.

Protocol Layer

TCP

IP

SMTP

[3]

© UCLES 2018 9608/33/M/J/18 [Turn over


6

(ii) Peer-to-peer (P2P) file sharing uses the BitTorrent protocol.

Explain how the BitTorrent protocol allows files to be shared.

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

.......................................................................................................................................[3]

© UCLES 2018 9608/33/M/J/18


7

Question 4 begins on the next page.

© UCLES 2018 9608/33/M/J/18 [Turn over


8

4 (a) A Boolean expression produces the following truth table.

INPUT OUTPUT
A B C X
0 0 0 0
0 0 1 0
0 1 0 1
0 1 1 1
1 0 0 1
1 0 1 1
1 1 0 0
1 1 1 0

(i) Write the Boolean expression for the truth table as a sum-of-products.

X = .................................................................................................................................[2]

(ii) Complete the Karnaugh Map (K-map) for the truth table in part (a)(i).

AB

00 01 11 10

0
C
1

[1]

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

(iii) Draw loop(s) around appropriate group(s) of 1s to produce an optimal sum-of-products


for the table in part (a)(ii). [2]

(iv) Write the simplified sum-of-products expression for your answer to part (a)(iii).

X = .................................................................................................................................[2]

© UCLES 2018 9608/33/M/J/18


9

(b) A logic circuit with four inputs produces the following truth table.

INPUT 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 1
0 1 1 0 1
0 1 1 1 1
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 0
1 1 1 1 0

(i) Complete the K-map that corresponds to the truth table.

AB

CD

[4]

(ii) Draw loop(s) around appropriate group(s) of 1s to produce an optimal sum-of-products


for the table in part (b)(i). [2]

(iii) Write the simplified sum-of-products expression for your answer to part (b)(ii).

X = .................................................................................................................................[2]

© UCLES 2018 9608/33/M/J/18 [Turn over


10

5 The following syntax diagrams show the syntax of:

• an assignment statement
• a variable
• a signed integer
• a letter
• a digit
• an operator

assignment statement
variable = variable operator signed integer

variable
letter letter

signed integer
+ digit

letter x

digit operator
1

2 \

© UCLES 2018 9608/33/M/J/18


11

(a) The following assignment statements are invalid.

Give the reason in each case.

(i) xy = xy ^ c4

Reason ..............................................................................................................................

.......................................................................................................................................[1]

(ii) zy = zy \ 10

Reason ..............................................................................................................................

.......................................................................................................................................[1]

(iii)

Reason ..............................................................................................................................

.......................................................................................................................................[1]

(b) Complete the Backus-Naur Form (BNF) for the syntax diagrams on the opposite page.

<assignment statement> ::=

...................................................................................................................................................

<variable> ::=

...................................................................................................................................................

<signed integer> ::=

...................................................................................................................................................

<operator> ::=

...................................................................................................................................................
[4]

(c) Rewrite the BNF rule for a variable so that it can be any number of letters.

<variable> ::=

...............................................................................................................................................[2]

© UCLES 2018 9608/33/M/J/18 [Turn over


12

6 A company specialises in educational software.

(a) The company is concerned that malware might disrupt their business.

(i) Add appropriate descriptions and terms in the table.

Description Term
Redirection to a bogus website that appears to be
A
legitimate to gain confidential data. .................................

B
.................................

.........................................................................................
C ......................................................................................... Spyware

.........................................................................................

.........................................................................................
D ......................................................................................... Worm

.........................................................................................

[4]

(ii) A member of staff is using the Internet to carry out research. They are worried about the
threat from terms A and B.

Identify one solution to the each of the threats.

Term A ...............................................................................................................................

...........................................................................................................................................

Term B ...............................................................................................................................

...........................................................................................................................................
[2]

© UCLES 2018 9608/33/M/J/18


13

(b) A customer downloads a new educational software package from the company.

the customer that:

• the software has come from the company (is authentic) and
• no one has altered it.

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...............................................................................................................................................[4]

© UCLES 2018 9608/33/M/J/18 [Turn over


14

7 A museum stores antique items that need to be kept at constant temperature.

The museum is not sure about the actual temperatures. The museum installs some equipment.
This records the temperatures every hour and ensures the temperature stays within a set range.

(a) Identify the type of system described.

...............................................................................................................................................[1]

(b) The system has a temperature sensor.

Identify two other items of hardware that the museum can use for the type of system identified.

Describe the purpose of each item.

Item 1 ........................................................................................................................................

Purpose ....................................................................................................................................

...................................................................................................................................................

Item 2 ........................................................................................................................................

Purpose ....................................................................................................................................

...................................................................................................................................................
[4]

(c) The equipment records the temperature in all seven rooms in the museum.

Each recording is stored as two successive bytes in memory. The format is as shown.

Temperature Room

7 6 5 4 3 2 1 0

Byte 1 Byte 2

The room is indicated by the setting of one of the bits in Byte 2 to 1. For example, room 7 is
indicated by setting bit 7 to 1.

Bit 0 of Byte 2 is a flag:


Byte 1 contains the temperature reading as an unsigned integer.

© UCLES 2018 9608/33/M/J/18


15

One reading returns the following binary data.

Temperature Room

7 6 5 4 3 2 1 0
1 0 1 1 0 0 1 1 0 0 1 0 0 0 0 1

Byte 1 Byte 2

(i) Analyse the data contained in the two bytes.

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

.......................................................................................................................................[3]

(ii) The system receives a temperature reading of 238 from room number 4.

Complete the bytes to show the two bytes for this recording. The reading has not yet
been processed.

7 6 5 4 3 2 1 0

Byte 1 Byte 2
[2]

© UCLES 2018 9608/33/M/J/18


16

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/33/M/J/18


Cambridge International Examinations
Cambridge International Advanced Subsidiary and Advanced Level
* 3 0 2 0 0 1 4 6 9 0 *

COMPUTER SCIENCE 9608/32


Paper 3 Advanced Theory May/June 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 12 printed pages.

DC (RW/CT) 151794/4
© UCLES 2018 [Turn over
2

1 Data types can be defined in a programming language.

The data type, StudentRecord, is defined by the code:

TYPE StudentRecord
DECLARE StudentID : INTEGER
DECLARE StudentFirstName : STRING
DECLARE StudentSurname : STRING
DECLARE StudentDOB : DATE
DECLARE StudentCourse : ARRAY[1:10] OF STRING
ENDTYPE

A variable, CollegeStudent, is declared with the code:

DECLARE CollegeStudent : StudentRecord

(a) Write a pseudocode statement to assign 6539 to the StudentID of CollegeStudent.

...............................................................................................................................................[1]

(b) The type definition for StudentRecord is changed.

(i) Students can take six courses from: Computer Science, Engineering, Science, Maths,
Physics, Chemistry, Music, Drama and English Language.

Rewrite one line from the type definition of StudentRecord to implement the change.

DECLARE ...........................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

.......................................................................................................................................[2]

(ii) The values for the field StudentID must be between 1 and 8000 inclusive.

Rewrite one line from the type definition of StudentRecord to implement the change.

DECLARE .......................................................................................................................[1]

© UCLES 2018 9608/32/M/J/18


3

(c) A programmer is asked to write a program to process the assessment data for each student.
Students sit one exam in every course they take.

A composite data type, StudentAssessment, needs to be defined with the following three
fields.

• a student assessment code (a unique code of three letters and two digits)
• the marks for the six exams
• the average mark of the six exams

(i) Write pseudocode to define the data type StudentAssessment.

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

.......................................................................................................................................[4]

(ii) Data about all students and their assessments are stored in a file that uses random
organisation. The StudentID is used as the key field.

The program allows a user to enter data for a new student.

Explain how the program adds the new data to the file.

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

.......................................................................................................................................[3]

© UCLES 2018 9608/32/M/J/18 [Turn over


4

2 The following syntax diagrams show the syntax of:

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

assignment statement
variable = variable operator variable ;

variable
letter unsigned integer

unsigned integer
digit

letter A

digit operator
1 +

2 -

3 *

4 /

© UCLES 2018 9608/32/M/J/18


5

(a) The following assignment statements are invalid.

Give the reason in each case.

(i) A = B + 5;

Reason ..............................................................................................................................

.......................................................................................................................................[1]

(ii)

Reason ..............................................................................................................................

.......................................................................................................................................[1]

(iii)

Reason ..............................................................................................................................

.......................................................................................................................................[1]

(b) Complete the Backus-Naur Form (BNF) for the syntax diagrams shown on the opposite page.

<assignment statement> ::=

...................................................................................................................................................

<variable> ::=

...................................................................................................................................................

<unsigned integer> ::=

...................................................................................................................................................

<operator> ::=

...................................................................................................................................................
[6]

© UCLES 2018 9608/32/M/J/18 [Turn over


6

(c) The syntax of variable is changed to allow one or more letters followed by an unsigned
integer.

Draw a syntax diagram for the new syntax of the variable.

[3]

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

• 8 bits for the mantissa


• 4 bits for the exponent

(a) Calculate the normalised floating-point representation of + 21.75 in this system. Show your
working.

Working .....................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

Mantissa Exponent

[3]

© UCLES 2018 9608/32/M/J/18


7

(b) Find the denary value for the following binary floating-point number.

Mantissa Exponent

1 0 1 1 0 0 0 0 1 1 1 0

Show your working.

Working .....................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

Answer ......................................................................................................................................
[3]

4 The TCP/IP protocol suite is used on the Internet.

(a) The table has statements about transmitting data across the Internet.

Put a tick ( ) in each row to identify whether the responsibility belongs to TCP or IP.

Responsibility TCP IP

Correct routing

Host to host communication

Communication between networks

Retransmitting missing packets

Reassembling packets into the correct order

[5]

(b) Identify two other internet protocols. State a use for each protocol.

Protocol 1 .................................................................................................................................

...................................................................................................................................................

Use ...........................................................................................................................................

...................................................................................................................................................

© UCLES 2018 9608/32/M/J/18 [Turn over


8

Protocol 2 .................................................................................................................................

...................................................................................................................................................

Use ...........................................................................................................................................

...................................................................................................................................................
[4]

(c) State the name of the TCP/IP layer that uses IP addresses.

...............................................................................................................................................[1]

(d) Emails are transmitted across the Internet using packet switching and routing tables.

(i) Give four items of data in an IP data packet.

1 ........................................................................................................................................

2 ........................................................................................................................................

3 ........................................................................................................................................

4 ........................................................................................................................................
[4]

(ii) Describe two benefits of using packet switching.

Benefit 1 ............................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

Benefit 2 ............................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................
[4]

(iii) Give two items of data stored in a routing table.

1 ........................................................................................................................................

2 ........................................................................................................................................
[2]

© UCLES 2018 9608/32/M/J/18


9

5 Katarina works for a company specialising in the sale of computer parts and accessories. She
works in the London office and her colleague Lucy works in the Hong Kong office. Katarina emails
confidential information to Lucy so that only Lucy can read the information.

(a) Explain how public and private keys are used to ensure that only Lucy has a readable copy of
the confidential information.

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...............................................................................................................................................[4]

(b) Julio is buying items from the online shop. He already has an account with the shop.

Explain how the use of Secure Socket Layer (SSL) or Transport Layer Security (TLS) helps to

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...............................................................................................................................................[3]

(c) The manager of the company is concerned about the threat of malware.

State three vulnerabilities that a malware can exploit.

1 ................................................................................................................................................

...................................................................................................................................................

2 ................................................................................................................................................

...................................................................................................................................................

3 ................................................................................................................................................

...................................................................................................................................................
[3]
© UCLES 2018 9608/32/M/J/18 [Turn over
10

6 (a) There are five scenarios on the left and two types of system on the right.

Draw a line to link each scenario to its correct type of system.

Scenario System

Car speed display

Aeroplane autopilot

Control

Rollercoaster

Monitoring

Recording the rainfall at


a weather station

Robot loading a part onto


a conveyor belt

[2]

(b) Mary has six fish tanks. The temperature of the water in each tank needs to be within a
specific range.

Identify three items of hardware that Mary can add to her tanks to help maintain the
temperature. Describe the purpose of each item.

Item 1 ........................................................................................................................................

Purpose ....................................................................................................................................

...................................................................................................................................................

Item 2 ........................................................................................................................................

Purpose ....................................................................................................................................

...................................................................................................................................................

Item 3 ........................................................................................................................................

Purpose ....................................................................................................................................

...................................................................................................................................................
[6]
© UCLES 2018 9608/32/M/J/18
11

(c) A temperature reading is taken from each tank once per minute. The temperature reading is
stored as two successive bytes. The format is shown:

Fish tank Temperature reading

7 6 5 4 3 2 1 0

Byte 1 Byte 2

The fish tank number is indicated by setting one of the bits in Byte 1 to 1. For example, fish
tank number 5 is indicated by setting bit 5 to 1.

Bit 7 of Byte 1 is a flag:


Bit 0 of Byte 1 is unused.

Byte 2

(i) After a temperature reading has been taken, the bytes contain the following data.

7 6 5 4 3 2 1 0
0 0 0 0 1 0 0 0 0 0 0 0 1 0 1 1

Byte 1 Byte 2

Analyse the data contained in the two bytes.

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

.......................................................................................................................................[3]

© UCLES 2018 9608/32/M/J/18 [Turn over


12

(ii)

Complete the bytes to show the values for this reading after it has been processed.

7 6 5 4 3 2 1 0

Byte 1 Byte 2
[2]

(d) A hardware device to affect the temperature of each tank is on or off depending on the value
of a bit in memory location 6753.

If bit 4 is 1, then the hardware device in fish tank 4 is on.

Write assembly language instructions to set bit 4 of memory location 6753 to 1 without
changing any other bits. Use the instruction set provided.

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...............................................................................................................................................[3]

Instruction set

Instruction Explanation
Op code Operand
LDD <address> Direct addressing. 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.
AND <address> Bitwise AND operation of the contents of ACC with the contents
of <address>.
XOR #n Bitwise XOR operation of the contents of ACC with the operand.
OR #n Bitwise OR operation of the contents of ACC with the operand.
OR <address> Bitwise OR operation of the contents of ACC with the contents
of <address>.
<address> can be an absolute address or a symbolic address.

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/M/J/18


Cambridge International Examinations
Cambridge International Advanced Subsidiary and Advanced Level
* 1 1 7 8 7 7 4 8 7 7 *

COMPUTER SCIENCE 9608/33


Paper 3 Advanced Theory October/November 2017
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 (JP) 147947
© UCLES 2017 [Turn over
2

1 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 Computer Computer


A B 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/33/O/N/17


3

(ii) 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.
MIMD

A microprocessor is used to control a


washing machine.
MISD

There are a number of processing


units. Each processing unit executes
SISD
the same instruction but on different
data.
[4]
© UCLES 2017 9608/33/O/N/17 [Turn over
4

(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/33/O/N/17


5

3 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

Unsigned
Variable := Variable Operator
integer

Variable
Digit
Letter Digit
1

Unsigned integer
2
Digit

4
Letter Operator
5
A +

B – 6

C * 7

^ 8

© UCLES 2017 9608/33/O/N/17 [Turn over


6

(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/33/O/N/17


7

(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/33/O/N/17 [Turn over


8

(ii) 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/33/O/N/17


9

5 (a) (i) Complete the truth table for this 2-input NAND gate:

A B X
A 0 0
X 0 1
1 0
B
1 1

[1]

(ii) Complete the truth table for this 3-input NAND gate:

A B C X
0 0 0
0 0 1
A 0 1 0
B X 0 1 1
C 1 0 0
1 0 1
1 1 0
1 1 1
[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:

S R Q Q
Initially 1 0 0 1
R changed to 1 1 1
S changed to 0 0 1
S changed to 1 1 1
S and R changed to 0 0 0 1 1
[3]

© UCLES 2017 9608/33/O/N/17 [Turn over


10

(ii) 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) Complete this truth table for the JK flip-flop.

Initial Final
Working space values values
J K Clock Q Q Q Q
0 0 1 1 0 1 0
0 0 1 0 1 0 1
0 1 1 1 0 0 1
0 1 1 0 1 0 1
1 0 1 1 0
1 0 1 0 1
1 1 1 1 0
1 1 1 0 1
[4]

© UCLES 2017 9608/33/O/N/17


11

(ii) 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/33/O/N/17 [Turn over


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.

6 5 4 3 2 1
Not used Not used 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
Explanation
Op code Operand
Direct addressing. Load the contents of the given address to
LDD <address>
ACC.
LDR #n Immediate addressing. Load the number n to IX.
Indexed addressing. Form the address from <address> +
LDX <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.
Bitwise OR operation of the contents of ACC with the contents
OR <address>
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.
Following a compare instruction, jump to <address> if the
JPE <address>
compare was True.
Following a compare instruction, jump to <address> if the
JGE <address> content of ACC is greater than or equal to the number used in
the compare instruction.

© UCLES 2017 9608/33/O/N/17


13

Question 6(c) continues on the next page.

© UCLES 2017 9608/33/O/N/17 [Turn over


14

Part of the assembly language code for updating LOWREG is:

Label Op code 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

HEATON: LDD LOWREG

© UCLES 2017 9608/33/O/N/17


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 LOWREG COUNTER ACC IX

15 B00000000 1

[4]

© UCLES 2017 9608/33/O/N/17 [Turn over


16

(ii) 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/33/O/N/17


Cambridge International Examinations
Cambridge International Advanced Subsidiary and Advanced Level
* 0 5 8 6 8 0 7 3 7 9 *

COMPUTER SCIENCE 9608/32


Paper 3 Advanced Theory October/November 2017
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 15 printed pages and 1 blank page.

DC (ST/FC) 135014/3
© UCLES 2017 [Turn over
2

1 A Local Area Network (LAN) consists of three computers, one server and a router connected to
the Internet. The LAN uses a bus topology.

(a) Complete the following diagram to show how the computers, the server and the router could
be connected.

Router

Server Computer
A

Internet

Computer Computer
B C
[2]

(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 the router at the
same time.
Computer C uses the IP address of a web server to send a request for
a web page on the web server.
Computer B can read a packet sent from Computer A to Computer C.
The server can read all incoming packets from the Internet.
[4]

(c) The user on Computer A and the user on Computer B are both using the Internet at the same
time. On a few occasions, Computer A and Computer B start transmitting packets to the
router at exactly the same time. This causes a problem called a collision.

(i) Explain what is meant by a collision in this context.

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

.......................................................................................................................................[2]

© UCLES 2017 9608/32/O/N/17


3

(ii) As a result of the collision, both Computer A and Computer B stop transmitting.

Computer A must carry out a number of steps to ensure the successful transmission of
its packet.

Give two of the steps.

Step 1 ................................................................................................................................

Step 2 ................................................................................................................................
[2]

(d) The LAN topology is redesigned.

(i) Describe the changes that could be made to the LAN topology to overcome the problem
identified in part (c).

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

.......................................................................................................................................[2]

(ii) Explain how the redesign has overcome the problem.

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

.......................................................................................................................................[2]

© UCLES 2017 9608/32/O/N/17 [Turn over


4

2 (a) The following diagram shows four descriptions and two types of processor.

Draw lines to connect each description to the appropriate type of processor.

Description Type of processor

It has a simplified set of instructions.

Emphasis is on the hardware rather


CISC
than the software.

It makes extensive use of general


RISC
purpose registers.

Many instruction formats are available.


[4]

(b) In a RISC processor, instructions are processed using pipelining.

(i) Explain what is meant by pipelining.

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

.......................................................................................................................................[2]

(ii) The following table shows the five stages that occur when instructions are fetched and
executed. The table also shows a number of time intervals.

table shows that instruction E has been fetched in time interval 2.

Complete each row of the table.

Time interval
Stage 1 2 3 4 5 6 7 8

Fetch instruction E
Read registers and decode instruction
Execute instruction
Access operand in memory
Write result to register
[3]
© UCLES 2017 9608/32/O/N/17
5

(c) The instruction set for a RISC processor that allows pipelining includes the following
instruction.

Instruction
Explanation
Op code Operands
Add the integers in registers op1 and op2.
ADD <dest>, <op1>, <op2>
Place the result in register dest.

A program contains the following three instructions.

ADD r3, r2, r1

ADD r5, r4, r3

ADD r10, r9, r8

(i) Explain why pipelining fails for the first two instructions.

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

.......................................................................................................................................[2]

(ii) The instructions were produced by a compiler after translation of a high-level language
program.

The compiler is not capable of code optimisation.

State how the code from the compiler could have been optimised to overcome the
problem in part (c)(i).

...........................................................................................................................................

.......................................................................................................................................[1]

© UCLES 2017 9608/32/O/N/17 [Turn over


6

3 (a) This diagram shows how applications P, Q and a software development environment can be
run on a virtual machine system.

Software
Application P Application Q development
environment

.......A......operating
.......A......operating system 1
system 2

Virtual machine software / virtual machine monitor

.......B......operating system

Hardware

(i) State the operating systems labelled A and B in the diagram.

A ........................................................................................................................................

B ........................................................................................................................................
[2]

(ii) Application P is executing and requests data from a file.

Describe what happens after .......A......operating system 1 has received the data request
from the application.

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

.......................................................................................................................................[3]

© UCLES 2017 9608/32/O/N/17


7

(b) A software development company uses virtual machines to produce software.

(i) State one benefit to the company.

...........................................................................................................................................

.......................................................................................................................................[1]

(ii) Explain two limitations of this approach.

Limitation 1 ........................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

Limitation 2 ........................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................
[4]

© UCLES 2017 9608/32/O/N/17 [Turn over


8

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

• an unsigned number
• an unsigned integer
• a digit.

Unsigned number
Digit
Unsigned Unsigned
. 1
integer integer

3
Unsigned integer

4
Digit

(a) (i) Explain why 32 is a valid unsigned integer.

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

.......................................................................................................................................[2]

© UCLES 2017 9608/32/O/N/17


9

(ii) Explain why 32.5 is a valid unsigned number.

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

.......................................................................................................................................[2]

(b) Complete the Backus-Naur Form (BNF) for the syntax diagrams shown.

<unsigned_number> ::= ...................................................................................................

...................................................................................................................................................

<unsigned_integer> ::= .................................................................................................

...................................................................................................................................................

<digit> ::= .........................................................................................................................

...................................................................................................................................................
[5]

The format of an unsigned number is amended to include numbers with possible exponents.

If an unsigned number has an exponent, then the exponent part:



• and be completed by an unsigned integer.

32, 3.45E 2

(c) (i) Redraw the syntax diagram for unsigned number to include numbers that might have
exponents.

[4]

© UCLES 2017 9608/32/O/N/17 [Turn over


10

(ii) Use your syntax diagram from part (c)(i) to write the BNF for an unsigned number to
include numbers with exponents.

<unsigned_number> ::= ............................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

.......................................................................................................................................[4]

© UCLES 2017 9608/32/O/N/17


11

5 (a) Complete the truth table for this NOR gate:

A B X
0 0
A 0 1
X
B 1 0
1 1
[1]

A SR flip-flop is constructed using two NOR gates.

R
Q

Q
S

(b) Complete the truth table for the SR flip-flop:

S R Q Q
Initially 1 0 1 0
S changed to 0 0 0
R changed to 1 0 1
R changed to 0 0 0
S and R changed to 1 1 1
[4]

© UCLES 2017 9608/32/O/N/17 [Turn over


12

Another type of flip-flop is the JK flip-flop. The JK flip-flop is an improvement on the SR flip-flop.

(c) (i) The JK flip-flop has three inputs. Two of the inputs are the Set (J) and the Reset (K).

State the third input.

.......................................................................................................................................[1]

(ii) There are two problems with the SR flip-flop that the JK flip-flop overcomes.

State each problem and state why it does not occur for the JK flip-flop.

Problem 1 ..........................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

Problem 2 ..........................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................
[4]

© UCLES 2017 9608/32/O/N/17


13

6 The environment in a very large greenhouse is managed by a computer system. The system uses
a number of different sensors that include temperature sensors. In addition, the system controls a
number of heaters, windows and sprinklers.

(a) State one other type of sensor that could be used with this system.

Justify your choice.

Sensor ......................................................................................................................................

Justification ...............................................................................................................................

...................................................................................................................................................
[2]

(b) Describe why feedback is important in this system.

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...............................................................................................................................................[3]

(c) (i) The system makes use of a number of parameters. These parameters are used in the
code that runs the system.

State one of the parameters used in controlling the temperature in the greenhouse.

.......................................................................................................................................[1]

(ii) Explain how the parameter identified in part (c)(i) is used in the feedback process.

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

.......................................................................................................................................[2]

© UCLES 2017 9608/32/O/N/17 [Turn over


14

(d) There are eight temperature sensors numbered 1 to 8. Readings from these sensors are
stored in four 16-bit memory locations. The memory locations have addresses from 4000 to
4003. Each memory location stores two sensor readings as two unsigned binary integers.

Sensor 1 reading is stored in bits 8 to 15 of address 4000; Sensor 2 reading is stored in bits
0 to 7 of address 4000 and so on. The diagram shows that the current sensor 1 reading has
a value of 97.

15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0

4000 0 1 1 0 0 0 0 1 0 0 1 1 1 0 0 1
4001 1 1 0 0 0 0 0 0 1 0 1 0 0 0 0 0
4002 0 0 0 1 0 1 0 0 0 0 0 0 1 1 0 1
4003 1 0 0 0 0 0 1 0 1 1 0 0 0 1 0 1

(i) Give the denary value of the current reading for Sensor 5.

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

.......................................................................................................................................[1]

© UCLES 2017 9608/32/O/N/17


15

(ii) The following table shows part of the instruction set for a processor. The processor has
one general purpose register, the Accumulator (ACC).

Instruction
Explanation
Op code Operand
LDD <address> Direct addressing. Load the contents of the location at the given
address to ACC.
AND #n Bitwise AND operation of the contents of ACC with the operand.
AND <address> Bitwise AND operation of the contents of ACC with the contents of
<address>.
XOR #n Bitwise XOR operation of the contents of ACC with the operand.
XOR <address> Bitwise XOR operation of the contents of ACC with the contents of
<address>.
OR #n Bitwise OR operation of the contents of ACC with the operand.
OR <address> Bitwise OR operation of the contents of ACC with the contents of
<address>.

<address> can be an absolute address or a symbolic address.


LSL #n Bits in ACC are shifted n places to the left. Zeros are introduced
on the right hand end.
LSR #n Bits in ACC are shifted n places to the right. Zeros are introduced
on the left hand end.

The reading for Sensor 5 is used in a calculation. The calculation is carried out by two
assembly language instructions.

The first instruction loads the contents of the 16-bit location that contains the value for
Sensor 5.

The second instruction moves the bits in Sensor 5 so that the 16-bit value is the value of
Sensor 5.

Complete the two instructions in the following code. Use the instruction set provided.

LDD ............................ // load the contents of the 16-bit location


containing the value for Sensor 5 into the
Accumulator

.................................... // move the bits in the Accumulator so that the


Accumulator stores the value of Sensor 5 as an
unsigned 16-bit binary integer
[3]

© UCLES 2017 9608/32/O/N/17


16

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/O/N/17


Cambridge International Examinations
Cambridge International Advanced Subsidiary and Advanced Level
* 7 5 2 2 9 5 2 3 6 0 *

COMPUTER SCIENCE 9608/33


Paper 3 Advanced Theory May/June 2017
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/SG) 144531
© UCLES 2017 [Turn over
2

1 (a) Consider the following user-defined data type:

TYPE LibraryBookRecord
DECLARE ISBN : INTEGER
DECLARE Title : STRING
ENDTYPE

(i) Write a pseudocode statement to declare a variable, Book, of type LibraryBookRecord.

.......................................................................................................................................[1]

(ii) Title of Book.

.......................................................................................................................................[1]

(b) The user-defined data type LibraryBookRecord needs to be modified by adding the
following fields:

• Genre
• NumberOfLoans which can be an integer value in the range 1 to 99

Write the updated version of LibraryBookRecord.

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...............................................................................................................................................[3]

(c) A pointer is a variable that stores the address of a variable of a particular type.

Consider the code on page 3, which uses the following identifiers:

Identifier Data type Description


IntPointer ^INTEGER pointer to an integer
IntVar INTEGER an integer variable
Temp1 INTEGER an integer variable
Temp2 INTEGER an integer variable

© UCLES 2017 9608/33/M/J/17


3

IntVar 57 // assigns the value 57 to the integer


// variable IntVar
IntPointer @IntVar // assigns to IntPointer the address of the
// integer variable IntVar
Temp2 IntPointer^ // assigns to variable Temp2 the value at an
// address pointed at by IntPointer
IntPointer^ Temp1 // assigns the value in the variable Temp1 to
// the memory location pointed at by IntPointer

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

Memory
Variable Contents
address

...

8217
IntVar 8216 88
8215
8214

...

7307
IntPointer 7306 8216
7305

...

6717
Temp1 6716 88
Temp2 6715 57
6714

...

Use the diagram to state the current values of the following expressions:

(i) @Temp2 .........................................................................................................................[1]

(ii) IntPointer .................................................................................................................[1]

(iii) IntPointer^ ...............................................................................................................[1]

(iv) IntPointer^ = Temp2 + 6 .....................................................................................[1]

© UCLES 2017 9608/33/M/J/17 [Turn over


4

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

(i) Assign the value 22 to the variable Temp2.

.......................................................................................................................................[1]

(ii) Place the address of Temp1 in IntPointer.

.......................................................................................................................................[1]

(iii) Copy the value in Temp2 into the memory location currently pointed at by IntPointer.

.......................................................................................................................................[1]

© UCLES 2017 9608/33/M/J/17


5

2 The following incomplete table shows descriptions and terms relating to malware.

(a) Complete the table with appropriate description and terms.

Description Term
(i) A standalone piece of malicious software that can
replicate itself using a network. ...................................... [1]
(ii)
confidential data. ...................................... [1]
(iii)
.................................................................................

.................................................................................

.................................................................................
Virus
.................................................................................

.................................................................................

................................................................................. [2]

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

Vulnerability 1 ...........................................................................................................................

...................................................................................................................................................

Vulnerability 2 ...........................................................................................................................

...................................................................................................................................................
[2]

Question 2 continues on the next page.

© UCLES 2017 9608/33/M/J/17 [Turn over


6

(c) Anna has to send an email to Bob containing confidential information. Bob and Anna have
never sent emails to each other before.

Bob and Anna both have public and private keys.

The first step is for Anna to request that Bob sends her one of his keys.

(i) State the key that Bob sends. .......................................................................................[1]

(ii) Explain how Anna can be sure that it is Bob who has sent the key.

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

.......................................................................................................................................[2]

(iii) Anna has received the key from Bob.

The following incomplete table shows the sequence of actions between Anna and Bob to
communicate the confidential information.

Complete the table.

The person
performing the What that person does
action

Anna part (c)(i)> key.

Bob
..........................................................................................................

Anna
..........................................................................................................

Anna Sends the email to Bob.

..........................................................................................................
Bob
..........................................................................................................
[4]

© UCLES 2017 9608/33/M/J/17


7

Question 3 begins on page 8.

© UCLES 2017 9608/33/M/J/17 [Turn over


8

3 Consider the following logic circuit, which contains a redundant logic gate.

A
X

(a) Write the Boolean algebraic expression corresponding to this logic circuit.

X = ........................................................................................................................................[3]

(b) Complete the truth table for this logic circuit.

A B C Working space X

0 0 0

0 0 1

0 1 0

0 1 1

1 0 0

1 0 1

1 1 0

1 1 1
[2]

(c) (i) Complete the Karnaugh Map (K-map) for the truth table in part (b).
AB
00 01 11 10
0
C
1
[1]
The K-map can be used to simplify the expression in part (a).

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

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

X = .................................................................................................................................[2]

© UCLES 2017 9608/33/M/J/17


9

(d) One Boolean identity is:

A + A.B = A + B

Simplify the expression for X in part (a) to the expression for X in part (c)(iii). You should use
the given identity.

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...............................................................................................................................................[2]

© UCLES 2017 9608/33/M/J/17 [Turn over


10

4 A bank has 95 000 customers. Each customer has a unique ID.

When a customer uses an Automated Teller Machine (ATM) to obtain cash, their current balance
is checked. The balance is stored in a file which has the following fields:

• the customer ID (6-digit number in the range 100000 to 999999)


• an encrypted PIN
• the current balance

The file can store a maximum of 100 000 records.

(a) Give a reason why a random organisation would be appropriate for this file.

...................................................................................................................................................

...............................................................................................................................................[1]

(b) An algorithm for inserting a new record in this file uses the following hash function:

RecordKey CustomerID MOD 100000

where RecordKey is the record position in the file.

(i) Complete the table to show the values generated by the hash function for the given
customer IDs.

CustomerID RecordKey
802139 2139
700004
689998
102139
[1]

(ii) State the range of possible values for RecordKey.

Minimum value of RecordKey: .........................................................................................

Maximum value of RecordKey: ........................................................................................


[2]

© UCLES 2017 9608/33/M/J/17


11

(iii) A procedure is written to insert a new record into the file.

Complete the algorithm for this procedure.

PROCEDURE InsertRecord(CustomerID : INTEGER)


RecordKey CustomerID MOD 100000
Success FALSE
// Find position for new record and insert it
REPEAT
IF record at position RecordKey is ………………………
THEN
Insert new record at position RecordKey
Success TRUE
ELSE
IF RecordKey = ………………………
THEN
RecordKey ………………………
ELSE
RecordKey ……………………… + 1
ENDIF
ENDIF
UNTIL Success = TRUE
ENDPROCEDURE
[4]

(c) (i) Explain why an encrypted version of the PIN is stored in the file.

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

.......................................................................................................................................[2]

© UCLES 2017 9608/33/M/J/17 [Turn over


12

(ii) A customer attempts to withdraw cash from an ATM. An algorithm is used to check if the
customer has entered the correct PIN.

Complete the algorithm.

1. Customer ID is read from card.

2. Customer enters PIN.

3. Customer PIN is ...................................................................................................

4. ......................................................................................................................................

5. Customer record is located in file.

6. .....................................................................................................................................

7. If match then transaction can proceed.


[3]

© UCLES 2017 9608/33/M/J/17


13

5 (a) A web browser is used to request and display a page stored on an internet web server.

Explain how each of the following items is used in this event.

(i) Packet: ..............................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

.......................................................................................................................................[2]

(ii) Router: ...............................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

.......................................................................................................................................[2]

(iii) TCP/IP: ..............................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

.......................................................................................................................................[2]

(b) The Internet can be used for video conferencing. Data can be transmitted over the Internet
using either packet switching or circuit switching.

(i) State two problems that could arise if video conferencing were to use packet switching.

Problem 1 ..........................................................................................................................

...........................................................................................................................................

Problem 2 ..........................................................................................................................

...........................................................................................................................................
[2]

(ii) Explain what is meant by circuit switching.

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

.......................................................................................................................................[2]

© UCLES 2017 9608/33/M/J/17 [Turn over


14

(iii) Explain how the use of circuit switching overcomes the problems you have identified in
part (i).

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

.......................................................................................................................................[3]

6 A computer system is used to manage some of the functions in a vehicle. The vehicle has a
number of sensors and actuators. One sensor is used to monitor the moisture on the screen. If the
moisture exceeds a pre-set value, the windscreen wiper motor turns on automatically.

The software used in the computer system is dedicated to the sensor management functions.
When the system starts, the software runs some initial tasks. It then loops continuously until the
system is switched off.

(a) (i) State the name given to the type of system described.

.......................................................................................................................................[1]

(ii) Explain your answer to part (i).

...........................................................................................................................................

.......................................................................................................................................[1]

(b) Within the software loop, the value of each sensor is read in turn. The value read from the
sensor is then processed.

State two drawbacks with this method of reading and processing sensor data.

Drawback 1 ...............................................................................................................................

...................................................................................................................................................

Drawback 2 ...............................................................................................................................

...................................................................................................................................................
[2]

© UCLES 2017 9608/33/M/J/17


15

(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 6. Enable interrupts

(i) State the purpose of step 1.

...........................................................................................................................................

...........................................................................................................................................

.......................................................................................................................................[1]

(ii) State the purpose of step 6.

...........................................................................................................................................

...........................................................................................................................................

.......................................................................................................................................[1]

(iii) Explain how the current task is saved in step 2.

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

.......................................................................................................................................[2]

© UCLES 2017 9608/33/M/J/17 [Turn over


16

(iv) State two benefits of using interrupts to read and process the sensor data.

Benefit 1 ............................................................................................................................

...........................................................................................................................................

Benefit 2 ............................................................................................................................

...........................................................................................................................................
[2]

(v) The interrupt handler in step 3 has to test each bit of a 16-bit register to discover the
source of the interrupt.

The contents of the 16-bit register are loaded into the 16-bit accumulator:

Accumulator
Bit: 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0

0 0 0 0 0 0 1 0 1 0 1 0 1 0 0 0

An instruction is required to achieve the following:

• If bit 9 is zero, set the accumulator to zero.


• If bit 9 is one, set the accumulator to a non-zero value.

Write this instruction using an appropriate bitwise operation.

.......................................................................................................................................[2]

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


Cambridge International Examinations
Cambridge International Advanced Subsidiary and Advanced Level
* 0 4 7 4 7 0 1 1 7 5 *

COMPUTER SCIENCE 9608/32


Paper 3 Advanced Theory May/June 2017
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
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:

• Area which can take three values, uptown, downtown or midtown


• 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 Data type Description


IPointer ^INTEGER pointer to an integer
Sum INTEGER an integer variable
MyInt1 INTEGER an integer variable
MyInt2 INTEGER an integer variable

© UCLES 2017 9608/32/M/J/17


3

Sum 91 // assigns the value 91 to the integer variable Sum


IPointer @Sum // assigns to IPointer the address of the
// integer variable Sum
MyInt1 IPointer^ // assigns to variable MyInt1 the value at an
// address pointed at by IPointer
IPointer^ MyInt2 // 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.

Memory
Variable Contents
Address

...

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

(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 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 ...................................... [1]
site without their knowledge.
(ii) An attempt to acquire sensitive information, often
for malicious reasons, by trying to deceive the user ...................................... [1]
through the contents of an email.
(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

(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:

S
Q

(a) Write the Boolean algebraic expression corresponding to this logic circuit:

S = ........................................................................................................................................[4]

© UCLES 2017 9608/32/M/J/17


7

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

P Q R Working space S

0 0 0

0 0 1

0 1 0

0 1 1

1 0 0

1 0 1

1 1 0

1 1 1
[2]

(c) (i) Complete the Karnaugh Map (K-map) for the truth table in part (b).
PQ
00 01 11 10
0
R
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. [1]

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

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).

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

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

4 (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.

This data includes:

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

The computer system uses three files:

File Content Use


A Account number and meter readings Each time a customer submits their
for the current month. reading, a new record is added to the
file.
B 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.

© UCLES 2017 9608/32/M/J/17


9

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

(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 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) Complete the following pseudocode algorithm for the routine.

01 ForEver ...............................................................................................................
02 REPEAT
03 FOR FloorCounter 1 TO NumberOfFloors
04 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

(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 6. Enable interrupts

(i) 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


16

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


Cambridge International Examinations
Cambridge International Advanced Level
* 4 3 1 9 8 7 1 7 2 0 *

COMPUTER SCIENCE 9608/33


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 11 printed pages and 1 blank page.

DC (TN/AR) 131202
© UCLES 2016 [Turn over
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) Calculate the floating-point representation of + 2.5 in this system. Show your working.

Mantissa Exponent


...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

.............................................................................................................................................. [3]

(b) Calculate the floating-point representation of − 2.5 in this system. Show your working.

Mantissa Exponent


...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

.............................................................................................................................................. [3]

© UCLES 2016 9608/33/O/N/16


3

(c) Find the denary value for the following binary floating-point number. Show your working.

Mantissa Exponent

0
•0 1 1 0 0 0 0 0 0 0 0 0 0 1 1

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

.............................................................................................................................................. [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) The system changes so that it now allocates 8 bits to both the mantissa and the exponent.

State two effects this has on the numbers that can be represented.

1 ...............................................................................................................................................

...................................................................................................................................................

2 ...............................................................................................................................................

.............................................................................................................................................. [2]

© UCLES 2016 9608/33/O/N/16 [Turn over


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 removes any


comments in the program Lexical analysis
source code.

This stage could be


Syntax analysis
ignored.

This stage checks the


grammar of the program Code generation
source code.

This stage produces a


tokenised version of the Optimisation
program source code.

[4]

(b) Write the Reverse Polish Notation (RPN) for the following expressions.

(i) (A + B) * (C D)

...................................................................................................................................... [2]

(ii) A / B * 4 / (C D)

...................................................................................................................................... [3]

© UCLES 2016 9608/33/O/N/16


5

(c) An interpreter is executing a program. The program uses the variables w, x, y and z.

The program contains an expression written in infix form. The interpreter converts the infix
expression to RPN. The RPN expression is:

x w z + y *

The interpreter evaluates this RPN expression using a stack.

The current values of the variables are:

w = 1 x = 2 y = 3 z = 4

(i) Show the changing contents of the stack as the interpreter evaluates the expression.

The first entry on the stack has been done for you.

[4]

(ii) Convert back to its original infix form, the RPN expression:

x w z + y *

...........................................................................................................................................

...................................................................................................................................... [2]

(iii) Explain one advantage of using RPN for the evaluation of an expression.

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...................................................................................................................................... [2]

© UCLES 2016 9608/33/O/N/16 [Turn over


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 X.

Page Presence Page frame address Additional data


flag
1 1 132
2 1 245
3 1 232
4 0 0
5 1 542
6 0 0

135 0 0

When a particular page of the process is currently in main memory, the Presence flag entry in the
page table is set to 1.

If the page is not currently present in memory, the Presence flag is set to 0.

(a) The page frame address entry for Page 2 is 245.

State what the value 245 could represent.

.............................................................................................................................................. [1]

(b) Process X executes until the next instruction is the first instruction in Page 4. Page 4 is not
currently in main memory.

State a hardware device that could be storing this page.

.............................................................................................................................................. [1]

© UCLES 2016 9608/33/O/N/16


7

(c) When an instruction to be accessed is not present in main memory, its page must be loaded
into a page frame. If all page frames are currently in use, the contents of a page frame will be
overwritten with this new page.

The page that is to be replaced is determined by a page replacement algorithm.

One possible algorithm is to replace the page that has been resident in main memory for the
longest time.

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

...........................................................................................................................................

..................................................................................................................................... [1]

(ii) Complete the table entries below to show what happens when Page 4 is swapped into
main memory. Assume that Page 5 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 Page frame address Additional data


flag

4
............... .................... .....................................

[3]

An alternative algorithm is to replace the page that has been used least.

(iii) Give the different additional data that the page table would now need to store.

...........................................................................................................................................

...................................................................................................................................... [1]

(iv) In the following table, complete the missing data to show what happens when Page 3 is
swapped into main memory. 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)(iii).

Page Presence Page frame address Additional data


flag

3
............... .................... .....................................

[3]
© UCLES 2016 9608/33/O/N/16 [Turn over
8

(d) Explain why the algorithms given in part (c) may not be the best choice for efficient memory
management.

Longest resident .......................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

Least used ................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

.............................................................................................................................................. [4]

4 (a) (i) Complete the truth table for this logic circuit.

X Input Output
A X Y A B
Y 0 0
0 1
1 0
B 1 1

[2]

(ii) State the name given to this logic circuit.

...................................................................................................................................... [1]

(iii) Name the labels usually given to A and B.

Label A ..............................................................................................................................

Label B ..............................................................................................................................

Explain why your answers are more appropriate for the A and B labels.

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...................................................................................................................................... [4]

© UCLES 2016 9608/33/O/N/16


9

(b) (i) Write the Boolean expression corresponding to the following logic circuit:

B
X

...................................................................................................................................... [2]

(ii) Use Boolean algebra to simplify the expression that you gave in part (b)(i).

Show your working.

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...................................................................................................................................... [3]

© UCLES 2016 9608/33/O/N/16 [Turn over


10

5 The TCP/IP protocol suite can be viewed as a stack with four layers.

(a) (i) Complete the stack by inserting the names of the three missing layers.

Transport

[3]

(ii) State how each layer of the stack is implemented.

...................................................................................................................................... [1]

(b) A computer is currently running two processes:

• Process 1 is downloading a web page.


• Process 2 is downloading an email.

(i) Describe two tasks that the Transport layer performs to ensure that the incoming data is
downloaded correctly.

1 .......................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

2 .......................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...................................................................................................................................... [4]

(ii) Name a protocol that will be used by Process 1.

...................................................................................................................................... [1]

(iii) Name a protocol that will be used by Process 2.

...................................................................................................................................... [1]

© UCLES 2016 9608/33/O/N/16


11

6 (a) The table below gives descriptions of three types of malware.

Description Term
Malware that attaches itself to another program.

Malware that redirects the web browser to a fake website.

Email that encourages the receiver to access a website and


give their banking details.

Complete the table by adding the correct terms. [3]

(b) Ben wants to send a highly confidential email to Mariah so that only she can read it. Plain text
and cipher text will be used in this communication.

(i) Explain the terms plain text and cipher text.

Plain text ............................................................................................................................

...........................................................................................................................................

Cipher text .........................................................................................................................

...................................................................................................................................... [2]

(ii) Explain how the use of asymmetric key cryptography ensures that only Mariah can read
the email.

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...................................................................................................................................... [4]

© UCLES 2016 9608/33/O/N/16


12

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 2016 9608/33/O/N/16


Cambridge International Examinations
Cambridge International Advanced Level
* 7 0 9 8 8 8 7 8 6 9 *

COMPUTER SCIENCE 9608/32


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


3

(c) Find the denary value for the following binary floating-point number. Show your working.

Mantissa Exponent

0 1 1 1 0 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


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: Lexical analysis
x = y + 0

This stage produces object


Syntax analysis
code.

This stage makes use of tree


Code generation
data structures.

This stage enters symbols in


Optimisation
the symbol table.

[4]

(b) Write the Reverse Polish Notation (RPN) for the following expression.

P + Q – R / S

.............................................................................................................................................. [2]

© UCLES 2016 9608/32/O/N/16


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 b = 2 c = 1 d = 3

(i) 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


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 Page frame address Additional data


flag
1 1 221
2 1 222
3 0 0
4 0 0
5 1 542
6 0 0

249 0 0

(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
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 Page frame address Additional data


flag

6 …………. ………..…… …………………….……

[3]

© UCLES 2016 9608/32/O/N/16 [Turn over


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


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 A
J
HALF ADDER
Q Y B

X A
HALF ADDER
R Y B K

Complete the following truth table for this logic circuit.

Input Working space Output


P Q R J K
0 0 0

0 0 1

0 1 0

0 1 1

1 0 0

1 0 1

1 1 0

1 1 1
[2]

(ii) State the name given to this logic circuit.

...................................................................................................................................... [1]

© UCLES 2016 9608/32/O/N/16


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

...................................................................................................................................... [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


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 Computer Server


A B

Computer Computer Switch


C D [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


Cambridge International Examinations
Cambridge International Advanced Level
* 7 6 5 6 7 1 7 0 8 0 *

COMPUTER SCIENCE 9608/33


Paper 3 Advanced Theory May/June 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 15 printed pages and 1 blank page.

DC (ST/AR) 126658
© UCLES 2016 [Turn over
2

1 A Local Area Network (LAN) consists of four computers and one server. The LAN uses a bus
topology.

(a) Complete the diagram below to show how the computers and the File server could be
connected.

Computer
A

Computer File server Computer


D B

Computer
C
[2]

(b) Computer C sends a data packet to Computer A.

Three statements are given below.

Tick ( ) to show whether each statement is true or false.

Statement True False


Computer C uses the IP address of Computer A
to indicate that the packet is for Computer A.
Computer B can read the packet sent from
Computer C to Computer A.
The File server routes the packet to Computer A.
[3]

© UCLES 2016 9608/33/M/J/16


3

(c) Computer A starts transmitting a packet to Computer C. At exactly the same time, the File
server starts transmitting a packet to Computer D. This causes a problem.

(i) State the name given to this problem.

...........................................................................................................................................

.......................................................................................................................................[1]

(ii) Give three steps taken by both Computer A and the File server to allow them to transmit
their packets successfully.

Step 1 ................................................................................................................................

...........................................................................................................................................

Step 2 ................................................................................................................................

...........................................................................................................................................

Step 3 ................................................................................................................................

.......................................................................................................................................[3]

(d) Adding a switch to the LAN changes its topology. Explain how the use of a switch removes the
problem identified in part (c)(i).

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...............................................................................................................................................[4]

© UCLES 2016 9608/33/M/J/16 [Turn over


4

2 Digital certificates are used in Internet communications. A Certificate Authority (CA) is responsible
for issuing digital certificates.

(a) Name three data items present in a digital certificate.

1 ................................................................................................................................................

2 ................................................................................................................................................

3 ............................................................................................................................................[3]

(b) The method of issuing a digital certificate is as follows:

1 A user starts an application for a digital certificate using their computer. On this computer
a key pair is generated. This key pair consists of a public key and an associated private
key.

2 The user submits the application to the CA. The generated ........ (i) ........ key and
other application data are sent. The key and data are encrypted using
the CA’s ........ (ii) ........ key.

3 The CA creates a digital document containing all necessary data items and signs it using
the CA’s ........ (iii) ........ key.

4 The CA sends the digital certificate to the individual.

In the above method there are three missing words. Each missing word is either ‘public’ or
‘private’.

State the correct word. Justify your choice.

(i) ...........................................................................................................................................

Justification ........................................................................................................................

.......................................................................................................................................[2]

(ii) ...........................................................................................................................................

Justification ........................................................................................................................

.......................................................................................................................................[2]

(iii) ...........................................................................................................................................

Justification ........................................................................................................................

.......................................................................................................................................[2]

© UCLES 2016 9608/33/M/J/16


5

(c) Alexa sends an email to Beena.

Alexa’s email program:

• produces a message digest (hash)


• uses Alexa’s private key to encrypt the message digest
• adds the encrypted message digest to the plain text of her message
• encrypts the whole message with Beena’s public key
• sends the encrypted message with a copy of Alexa’s digital certificate

Beena’s email program decrypts the encrypted message using her private key.

(i) State the name given to the encrypted message digest.

.......................................................................................................................................[1]

(ii) Explain how Beena can be sure that she has received a message that is authentic (not
corrupted or tampered with) and that it came from Alexa.

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

.......................................................................................................................................[2]

(iii) Name two uses where encrypted message digests are advisable.

1 ........................................................................................................................................

2 ....................................................................................................................................[2]

© UCLES 2016 9608/33/M/J/16 [Turn over


6

3 (a) The following diagram shows how applications X, Y and Z can run on a virtual machine
system.

Application X Application Y Application Z

Guest operating
Guest operating system 1
system 2

Virtual machine software / virtual machine monitor

Host operating system

Hardware

(i) The virtual machine software undertakes many tasks.

Describe two of these tasks.

Task 1 ................................................................................................................................

...........................................................................................................................................

Task 2 ................................................................................................................................

.......................................................................................................................................[2]

(ii) Explain the difference between a guest operating system and a host operating
system.

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

.......................................................................................................................................[2]

© UCLES 2016 9608/33/M/J/16


7

(b) A company uses a computer as a web server. The manufacturer will no longer support the
computer’s operating system (OS) in six months’ time. The company will then need to decide
on a replacement OS.

The company is also considering changing the web server software when the OS is changed.

Whenever any changes are made, it is important that the web server service is not disrupted.

In developing these changes, the company could use virtual machines.

(i) Describe two possible uses of virtual machines by the company.

Use 1 .................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

Use 2 .................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

.......................................................................................................................................[4]

The web server often has to handle many simultaneous requests.

(ii) The company uses a virtual machine to test possible solutions to the changes that they
will need to make.

Explain one limitation of this approach.

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

.......................................................................................................................................[2]

© UCLES 2016 9608/33/M/J/16 [Turn over


8

4 (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 or
methods.

File organisation method File access method

serial direct

sequential sequential

random

[4]

© UCLES 2016 9608/33/M/J/16


9

(b) A bank has a very large number of customers. The bank stores data for each customer. This
includes:

• unique customer number


• personal data (name, address, telephone number)
• transactions

The bank computer system makes use of three files:

• A – a file that stores customer personal data. This file is used at the end of each month
for the production of the monthly statement.
• B – a file that stores encrypted personal identification numbers (PINs) for customer bank
cards. This file is accessed when the customer attempts to withdraw cash at a cash
machine (ATM).
• C – a file that stores all customer transaction records for the current month. Every time
the customer makes a transaction, a new record is created.

For each of the files A, B and C, state an appropriate method of organisation. Justify your
choice.

(i) File A organisation ............................................................................................................

Justification ........................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

.......................................................................................................................................[3]

(ii) File B organisation ............................................................................................................

Justification ........................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

.......................................................................................................................................[3]

(iii) File C organisation ............................................................................................................

Justification ........................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

.......................................................................................................................................[3]

© UCLES 2016 9608/33/M/J/16 [Turn over


10

5 (a) Complete the truth table for this NAND gate:

A B X

A 0 0

X 0 1
B 1 0
1 1

[1]

A SR flip-flop is constructed using two NAND gates.

S
Q

Q
R

(b) (i) Complete the truth table for the SR flip-flop.


S R Q Q
Initially 1 0 0 1
R changed to 1 1 1
S changed to 0 0 1
S changed to 1 1 1
S and R changed to 0 0 0
[4]

(ii) One of the combinations in the truth table should not be allowed to occur.

State the values of S and R that should not be allowed. Justify your choice.

S = .............................. R = ..............................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

.......................................................................................................................................[3]
© UCLES 2016 9608/33/M/J/16
11

Another type of flip-flop is the JK flip-flop.

(c) (i) Give one extra input present in the JK flip-flop.

...........................................................................................................................................

.......................................................................................................................................[1]

(ii) Give one advantage of the JK flip-flop.

...........................................................................................................................................

.......................................................................................................................................[1]

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

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...............................................................................................................................................[2]

© UCLES 2016 9608/33/M/J/16 [Turn over


12

6 An intruder detection system for a large house has four sensors. An 8-bit memory location stores
the output from each sensor in its own bit position.

The bit value for each sensor shows:

• 1 – the sensor has been triggered


• 0 – the sensor has not been triggered

The bit positions are used as follows:

Not used Sensor 4 Sensor 3 Sensor 2 Sensor 1

The output from the intruder detection system is a loud alarm.

(a) (i) State the name of the type of system to which intruder detection systems belong.

.......................................................................................................................................[1]

(ii) Justify your answer to part (i).

...........................................................................................................................................

.......................................................................................................................................[1]

(b) Name two sensors that could be used in this intruder detection system. Give a reason for
your choice.

Sensor 1 ...................................................................................................................................

Reason .....................................................................................................................................

...................................................................................................................................................

Sensor 2 ...................................................................................................................................

Reason .....................................................................................................................................

...............................................................................................................................................[4]

© UCLES 2016 9608/33/M/J/16


13

The intruder system is set up so that the alarm will only sound if two or more sensors have been
triggered.
An assembly language program has been written to process the contents of the memory location.

The table shows part of the instruction set for the processor used.

Instruction
Explanation
Op code Operand
Direct addressing. Load the contents of the given address to
LDD <address>
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 contents of ACC
Bitwise AND operation of the contents of ACC with the
AND <address>
contents of <address>
CMP #n Compare the contents of ACC with the number n
JMP <address> Jump to the given address
Following a compare instruction, jump to <address> if the
JPE <address>
compare was True
Following a compare instruction, jump to <address> if the
JGT <address> content of ACC is greater than the number used in the
compare instruction
END End the program and return to the operating system

© UCLES 2016 9608/33/M/J/16 [Turn over


14

(c) Part of the assembly code is:

Op code Operand
SENSORS: B00001010
COUNT: 0
VALUE: 1
LOOP: LDD SENSORS
AND VALUE
CMP #0
JPE ZERO
LDD COUNT
INC ACC
STO COUNT
ZERO: LDD VALUE
CMP #8
JPE EXIT
ADD VALUE
STO VALUE
JMP LOOP
EXIT: LDD COUNT
TEST: CMP …
JGT ALARM

© UCLES 2016 9608/33/M/J/16


15

(i) Dry run the assembly language code. Start at LOOP and finish when EXIT is reached.

BITREG COUNT VALUE ACC


B00001010 0 1

[4]

(ii) The operand for the instruction labelled TEST is missing.

State the missing operand.

.......................................................................................................................................[1]

(iii) The intruder detection system is improved and now has eight sensors.

One instruction in the assembly language code will need to be amended.

Identify this instruction .......................................................................................................

Write the amended instruction ......................................................................................[2]

© UCLES 2016 9608/33/M/J/16


16

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 2016 9608/33/M/J/16


Cambridge International Examinations
Cambridge International Advanced Level
* 6 9 4 8 8 4 1 8 3 2 *

COMPUTER SCIENCE 9608/32


Paper 3 Advanced Theory May/June 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 15 printed pages and 1 blank page.

DC (ST/AR) 126657
© UCLES 2016 [Turn over
2

1 A Local Area Network (LAN) consists of four computers and one server. The LAN uses a bus
topology.

(a) Complete the diagram below to show how the computers and the File server could be
connected.

Computer
A

Computer File server Computer


D B

Computer
C
[2]

(b) Computer C sends a data packet to Computer A.

Three statements are given below.

Tick ( ) to show whether each statement is true or false.

Statement True False


Computer C uses the IP address of Computer A
to indicate that the packet is for Computer A.
Computer B can read the packet sent from
Computer C to Computer A.
The File server routes the packet to Computer A.
[3]

© UCLES 2016 9608/32/M/J/16


3

(c) Computer A starts transmitting a packet to Computer C. At exactly the same time, the File
server starts transmitting a packet to Computer D. This causes a problem.

(i) State the name given to this problem.

...........................................................................................................................................

.......................................................................................................................................[1]

(ii) Give three steps taken by both Computer A and the File server to allow them to transmit
their packets successfully.

Step 1 ................................................................................................................................

...........................................................................................................................................

Step 2 ................................................................................................................................

...........................................................................................................................................

Step 3 ................................................................................................................................

.......................................................................................................................................[3]

(d) Adding a switch to the LAN changes its topology. Explain how the use of a switch removes the
problem identified in part (c)(i).

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...............................................................................................................................................[4]

© UCLES 2016 9608/32/M/J/16 [Turn over


4

2 Digital certificates are used in Internet communications. A Certificate Authority (CA) is responsible
for issuing digital certificates.

(a) Name three data items present in a digital certificate.

1 ................................................................................................................................................

2 ................................................................................................................................................

3 ............................................................................................................................................[3]

(b) The method of issuing a digital certificate is as follows:

1 A user starts an application for a digital certificate using their computer. On this computer
a key pair is generated. This key pair consists of a public key and an associated private
key.

2 The user submits the application to the CA. The generated ........ (i) ........ key and
other application data are sent. The key and data are encrypted using
the CA’s ........ (ii) ........ key.

3 The CA creates a digital document containing all necessary data items and signs it using
the CA’s ........ (iii) ........ key.

4 The CA sends the digital certificate to the individual.

In the above method there are three missing words. Each missing word is either ‘public’ or
‘private’.

State the correct word. Justify your choice.

(i) ...........................................................................................................................................

Justification ........................................................................................................................

.......................................................................................................................................[2]

(ii) ...........................................................................................................................................

Justification ........................................................................................................................

.......................................................................................................................................[2]

(iii) ...........................................................................................................................................

Justification ........................................................................................................................

.......................................................................................................................................[2]

© UCLES 2016 9608/32/M/J/16


5

(c) Alexa sends an email to Beena.

Alexa’s email program:

• produces a message digest (hash)


• uses Alexa’s private key to encrypt the message digest
• adds the encrypted message digest to the plain text of her message
• encrypts the whole message with Beena’s public key
• sends the encrypted message with a copy of Alexa’s digital certificate

Beena’s email program decrypts the encrypted message using her private key.

(i) State the name given to the encrypted message digest.

.......................................................................................................................................[1]

(ii) Explain how Beena can be sure that she has received a message that is authentic (not
corrupted or tampered with) and that it came from Alexa.

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

.......................................................................................................................................[2]

(iii) Name two uses where encrypted message digests are advisable.

1 ........................................................................................................................................

2 ....................................................................................................................................[2]

© UCLES 2016 9608/32/M/J/16 [Turn over


6

3 (a) The following diagram shows how applications X, Y and Z can run on a virtual machine
system.

Application X Application Y Application Z

Guest operating
Guest operating system 1
system 2

Virtual machine software / virtual machine monitor

Host operating system

Hardware

(i) The virtual machine software undertakes many tasks.

Describe two of these tasks.

Task 1 ................................................................................................................................

...........................................................................................................................................

Task 2 ................................................................................................................................

.......................................................................................................................................[2]

(ii) Explain the difference between a guest operating system and a host operating
system.

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

.......................................................................................................................................[2]

© UCLES 2016 9608/32/M/J/16


7

(b) A company uses a computer as a web server. The manufacturer will no longer support the
computer’s operating system (OS) in six months’ time. The company will then need to decide
on a replacement OS.

The company is also considering changing the web server software when the OS is changed.

Whenever any changes are made, it is important that the web server service is not disrupted.

In developing these changes, the company could use virtual machines.

(i) Describe two possible uses of virtual machines by the company.

Use 1 .................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

Use 2 .................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

.......................................................................................................................................[4]

The web server often has to handle many simultaneous requests.

(ii) The company uses a virtual machine to test possible solutions to the changes that they
will need to make.

Explain one limitation of this approach.

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

.......................................................................................................................................[2]

© UCLES 2016 9608/32/M/J/16 [Turn over


8

4 (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 or
methods.

File organisation method File access method

serial direct

sequential sequential

random

[4]

© UCLES 2016 9608/32/M/J/16


9

(b) A bank has a very large number of customers. The bank stores data for each customer. This
includes:

• unique customer number


• personal data (name, address, telephone number)
• transactions

The bank computer system makes use of three files:

• A – a file that stores customer personal data. This file is used at the end of each month
for the production of the monthly statement.
• B – a file that stores encrypted personal identification numbers (PINs) for customer bank
cards. This file is accessed when the customer attempts to withdraw cash at a cash
machine (ATM).
• C – a file that stores all customer transaction records for the current month. Every time
the customer makes a transaction, a new record is created.

For each of the files A, B and C, state an appropriate method of organisation. Justify your
choice.

(i) File A organisation ............................................................................................................

Justification ........................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

.......................................................................................................................................[3]

(ii) File B organisation ............................................................................................................

Justification ........................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

.......................................................................................................................................[3]

(iii) File C organisation ............................................................................................................

Justification ........................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

.......................................................................................................................................[3]

© UCLES 2016 9608/32/M/J/16 [Turn over


10

5 (a) Complete the truth table for this NAND gate:

A B X

A 0 0

X 0 1
B 1 0
1 1

[1]

A SR flip-flop is constructed using two NAND gates.

S
Q

Q
R

(b) (i) Complete the truth table for the SR flip-flop.


S R Q Q
Initially 1 0 0 1
R changed to 1 1 1
S changed to 0 0 1
S changed to 1 1 1
S and R changed to 0 0 0
[4]

(ii) One of the combinations in the truth table should not be allowed to occur.

State the values of S and R that should not be allowed. Justify your choice.

S = .............................. R = ..............................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

.......................................................................................................................................[3]
© UCLES 2016 9608/32/M/J/16
11

Another type of flip-flop is the JK flip-flop.

(c) (i) Give one extra input present in the JK flip-flop.

...........................................................................................................................................

.......................................................................................................................................[1]

(ii) Give one advantage of the JK flip-flop.

...........................................................................................................................................

.......................................................................................................................................[1]

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

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...............................................................................................................................................[2]

© UCLES 2016 9608/32/M/J/16 [Turn over


12

6 An intruder detection system for a large house has four sensors. An 8-bit memory location stores
the output from each sensor in its own bit position.

The bit value for each sensor shows:

• 1 – the sensor has been triggered


• 0 – the sensor has not been triggered

The bit positions are used as follows:

Not used Sensor 4 Sensor 3 Sensor 2 Sensor 1

The output from the intruder detection system is a loud alarm.

(a) (i) State the name of the type of system to which intruder detection systems belong.

.......................................................................................................................................[1]

(ii) Justify your answer to part (i).

...........................................................................................................................................

.......................................................................................................................................[1]

(b) Name two sensors that could be used in this intruder detection system. Give a reason for
your choice.

Sensor 1 ...................................................................................................................................

Reason .....................................................................................................................................

...................................................................................................................................................

Sensor 2 ...................................................................................................................................

Reason .....................................................................................................................................

...............................................................................................................................................[4]

© UCLES 2016 9608/32/M/J/16


13

The intruder system is set up so that the alarm will only sound if two or more sensors have been
triggered.
An assembly language program has been written to process the contents of the memory location.

The table shows part of the instruction set for the processor used.

Instruction
Explanation
Op code Operand
Direct addressing. Load the contents of the given address to
LDD <address>
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 contents of ACC
Bitwise AND operation of the contents of ACC with the
AND <address>
contents of <address>
CMP #n Compare the contents of ACC with the number n
JMP <address> Jump to the given address
Following a compare instruction, jump to <address> if the
JPE <address>
compare was True
Following a compare instruction, jump to <address> if the
JGT <address> content of ACC is greater than the number used in the
compare instruction
END End the program and return to the operating system

© UCLES 2016 9608/32/M/J/16 [Turn over


14

(c) Part of the assembly code is:

Op code Operand
SENSORS: B00001010
COUNT: 0
VALUE: 1
LOOP: LDD SENSORS
AND VALUE
CMP #0
JPE ZERO
LDD COUNT
INC ACC
STO COUNT
ZERO: LDD VALUE
CMP #8
JPE EXIT
ADD VALUE
STO VALUE
JMP LOOP
EXIT: LDD COUNT
TEST: CMP …
JGT ALARM

© UCLES 2016 9608/32/M/J/16


15

(i) Dry run the assembly language code. Start at LOOP and finish when EXIT is reached.

BITREG COUNT VALUE ACC


B00001010 0 1

[4]

(ii) The operand for the instruction labelled TEST is missing.

State the missing operand.

.......................................................................................................................................[1]

(iii) The intruder detection system is improved and now has eight sensors.

One instruction in the assembly language code will need to be amended.

Identify this instruction .......................................................................................................

Write the amended instruction ......................................................................................[2]

© UCLES 2016 9608/32/M/J/16


16

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 2016 9608/32/M/J/16


Cambridge International Examinations
Cambridge International Advanced Level
* 8 5 0 9 4 8 0 5 0 2 *

COMPUTER SCIENCE 9608/33


Paper 3 Advanced Theory October/November 2015
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 (NH) 117457
© UCLES 2015 [Turn over
2

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

• 8 bits for the mantissa, followed by


• 8 bits for the exponent

Two’s complement form is used for both mantissa and exponent.

(a) (i) A real number is stored as the following two bytes:

Mantissa Exponent

0 0 1 0 1 0 0 0 0 0 0 0 0 0 1 1

Calculate the denary value of this number. Show your working.

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

.......................................................................................................................................[3]

(ii) Explain why the floating-point number in part (a)(i) is not normalised.

...........................................................................................................................................

.......................................................................................................................................[2]

(iii) Normalise the floating-point number in part (a)(i).

Mantissa Exponent

[2]

© UCLES 2015 9608/33/O/N/15


3

(b) (i) Write the largest positive number that can be written as a normalised floating-point
number in this format.

Mantissa Exponent

[2]

(ii) Write the smallest positive number that can be written as a normalised floating-point
number in this format.

Mantissa Exponent

[2]

(iii) If a positive number is added to the number in part (b)(i) explain what will happen.

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

.......................................................................................................................................[2]

(c) A student writes a program to output numbers using the following code:

X 0.0
FOR i 0 TO 1000
X X + 0.1
OUTPUT X
ENDFOR

The student is surprised to see that the program outputs the following sequence:

0.0 0.1 0.2 0.2999999 0.3999999 ……

Explain why this output has occurred.

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...............................................................................................................................................[3]

© UCLES 2015 9608/33/O/N/15 [Turn over


4

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

• Tokens for keywords are shown in hexadecimal.

• All the keyword tokens are in the range 00 – 5F.

Keyword Token
01
+ 02
= 03

IF 4A
THEN 4B
ENDIF 4C
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 piece of code:

Counter 1.5
INPUT Num1
// Check values
IF Counter = Num1
THEN
Num1 Num1 + 5.0
ENDIF

(a) Complete the symbol table below to show its contents after the lexical analysis stage.

Token
Symbol
Value Type
Counter 60 Variable
1.5 61 Constant

[3]
© UCLES 2015 9608/33/O/N/15
5

(b) Each cell below represents one byte of the output from the lexical analysis stage.

Using the keyword table and your answer to part (a) complete the output from the lexical
analysis.

60 01
[2]

(c) This line of code is to be compiled:

A B + C + D

After the syntax analysis stage, the compiler generates object code. The equivalent code, in
assembly language, is shown below:

LDD 234 //loads value B


ADD 235 //adds value C
STO 567 //stores result in temporary location
LDD 567 //loads value from temporary location
ADD 236 //adds value D
STO 233 //stores result in A

(i) Name the final stage in the compilation process that follows this code generation stage.

.......................................................................................................................................[1]

(ii) Rewrite the equivalent code given above to show the effect of it being processed through
this final stage.

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

.......................................................................................................................................[2]

(iii) State two benefits of the compilation process performing this final stage.

Benefit 1 ............................................................................................................................

...........................................................................................................................................

Benefit 2 ............................................................................................................................

.......................................................................................................................................[2]

© UCLES 2015 9608/33/O/N/15 [Turn over


6

3 An email is sent from one email server to another using packet switching.

(a) State two items that are contained in an email packet apart from the data.

1 ................................................................................................................................................

2 ............................................................................................................................................[2]

(b) Explain the role of routers in sending an email from one email server to another.

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...............................................................................................................................................[3]

(c) Sending an email message is an appropriate use of packet switching.

Explain why this is the case.

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...............................................................................................................................................[2]

(d) Packet switching is not always an appropriate solution.

Name an alternative communication method of transferring data in a digital network.

...............................................................................................................................................[1]

© UCLES 2015 9608/33/O/N/15


7

(e) Name an application for which the method identified in part (d) is an appropriate solution.
Justify your choice.

Application ................................................................................................................................

Justification ...............................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...............................................................................................................................................[3]

© UCLES 2015 9608/33/O/N/15 [Turn over


8

4 (a) Three descriptions and two types of processor are shown below.

Draw a line to connect each description to the appropriate type of processor.

Description Type of processor

Makes extensive use of


RISC
general purpose registers

Many addressing modes


CISC
are available

Has a simplified set of


instructions
[3]

(b) In a RISC processor three instructions (A followed by B, followed by C) are processed using
pipelining.

The following table shows the five stages that occur when instructions are fetched and
executed.

(i) The ‘A’ in the table indicates that instruction A has been fetched in time interval 1.

Complete the table to show the time interval in which each stage of each instruction (A,
B, C) is carried out.

Time interval
Stage 1 2 3 4 5 6 7 8 9
Fetch instruction A
Decode instruction
Execute instruction
Access operand in memory
Write result to register
[3]

(ii) The completed table 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 the use of pipelining in the above example.

Show your working.

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

.......................................................................................................................................[3]
© UCLES 2015 9608/33/O/N/15
9

5 (a) (i) Complete the Boolean function that corresponds to the following truth table.

INPUT OUTPUT

A B C X

0 0 0 0

0 0 1 0

0 1 0 0

0 1 1 1

1 0 0 0

1 0 1 0

1 1 0 1

1 1 1 1

X = A . B . C + ................................................................................................................[3]

The part to the right of the equals sign is known as the sum-of-products.

(ii) For the truth table above complete the Karnaugh Map (K-map).

AB

00 01 11 10

0
C
1
[1]

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

(iii) Draw loop(s) around appropriate groups of 1’s to produce an optimal sum-of-products.
[2]

(iv) Using your answer to part (a)(iii), write the simplified sum-of-products Boolean function.

X = .................................................................................................................................[2]

© UCLES 2015 9608/33/O/N/15 [Turn over


10

(b) The truth table for a logic circuit with four inputs is given below:

INPUT 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 1
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 0
1 1 1 0 1
1 1 1 1 1

(i) Complete the K-map corresponding to the truth table above.

AB

CD

[4]

(ii) Draw loop(s) around appropriate groups of 1’s to produce an optimal sum-of-products.
[2]

(iii) Using your answer to part (b)(ii), write the simplified sum-of-products Boolean function.

X = .................................................................................................................................[2]

© UCLES 2015 9608/33/O/N/15


11

6 A number of processes are being executed in a computer.

(a) Explain the difference between a program and a process.

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...............................................................................................................................................[2]

A process can be in one of three states: running, ready or blocked.

(b) For each of the following, the process is moved from the first state to the second state.
Describe the conditions that cause each of the following changes of the state of a process:

From running to ready ..............................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

From ready to running ..............................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

From running to blocked ...........................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...............................................................................................................................................[6]

© UCLES 2015 9608/33/O/N/15 [Turn over


12

(c) Explain why a process cannot be moved from the blocked state to the running state.

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...............................................................................................................................................[3]

(d) Explain the role of the high-level scheduler in a multiprogramming operating system.

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...............................................................................................................................................[2]

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 2015 9608/33/O/N/15


Cambridge International Examinations
Cambridge International Advanced Level
* 6 5 5 0 0 8 5 9 6 3 *

COMPUTER SCIENCE 9608/32


Paper 3 Advanced Theory October/November 2015
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 11 printed pages and 1 blank page.

DC (ST) 95544/3
© UCLES 2015 [Turn over
2

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

• 8 bits for the mantissa, followed by


• 4 bits for the exponent

Two’s complement form is used for both mantissa and exponent.

(a) (i) A real number is stored as the following 12-bit binary pattern:

0 1 1 0 1 0 0 0 0 0 1 1

Calculate the denary value of this number. Show your working.

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

.......................................................................................................................................[3]

(ii) Give the normalised binary pattern for +3.5. Show your working.

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

.......................................................................................................................................[3]

(iii) Give the normalised binary pattern for –3.5. Show your working.

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

.......................................................................................................................................[3]

© UCLES 2015 9608/32/O/N/15


3

The number of bits available to represent a real number is increased to 16.

(b) (i) If the system were to use the extra 4 bits for the mantissa, state what the effect would be
on the numbers that can be represented.

...........................................................................................................................................

.......................................................................................................................................[1]

(ii) If the system were to use the extra 4 bits for the exponent instead, state what the effect
would be on the numbers that can be represented.

...........................................................................................................................................

.......................................................................................................................................[1]

(c) A student enters the following expression into an interpreter:

OUTPUT (0.1 + 0.2)

The student is surprised to see the following output:

0.3000000000000001

Explain why this output has occurred.

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...............................................................................................................................................[3]

© UCLES 2015 9608/32/O/N/15 [Turn over


4

2 In this question, you are shown pseudocode in place of a real high-level language. A compiler
uses a keyword table and a symbol table. Part of the keyword table is shown below.

• Tokens for keywords are shown in hexadecimal.


• All the keyword tokens are in the range 00 to 5F.

Keyword Token
01
+ 02
= 03

IF 4A
THEN 4B
ENDIF 4C
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 piece of code:

Start 0.1
// Output values in loop
FOR Counter Start TO 10
OUTPUT Counter + Start
ENDFOR

(a) Complete the symbol table below to show its contents after the lexical analysis stage.

Token
Symbol
Value Type

Start 60 Variable

0.1 61 Constant

[3]
© UCLES 2015 9608/32/O/N/15
5

(b) Each cell below represents one byte of the output from the lexical analysis stage.

Using the keyword table and your answer to part (a) complete the output from the lexical
analysis.

60 01
[2]

(c) The compilation process has a number of stages. The output of the lexical analysis stage
forms the input to the next stage.

(i) Name this stage.

.......................................................................................................................................[1]

(ii) State two tasks that occur at this stage.

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

.......................................................................................................................................[2]

(d) The final stage of compilation is optimisation. There are a number of reasons for performing
optimisation. One reason is to produce code that minimises the amount of memory used.

(i) State another reason for the optimisation of code.

.......................................................................................................................................[1]

(ii) What could a compiler do to optimise the following expression?

A B + 2 * 6

...........................................................................................................................................

...........................................................................................................................................

.......................................................................................................................................[1]

© UCLES 2015 9608/32/O/N/15 [Turn over


6

(iii) These lines of code are to be compiled:

X A + B
Y A + B + C

Following the syntax analysis stage, object code is generated. The equivalent code, in
assembly language, is shown below:

LDD 436 //loads value A


ADD 437 //adds value B
STO 612 //stores result in X
LDD 436 //loads value A
ADD 437 //adds value B
ADD 438 //adds value C
STO 613 //stores result in Y

(iv) Rewrite the equivalent code, given above, following optimisation.

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

.......................................................................................................................................[3]

© UCLES 2015 9608/32/O/N/15


7

3 (a) Explain what is meant by circuit switching.

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...............................................................................................................................................[2]

(b) There are many applications in which digital data are transferred across a network. Video
conferencing is one of these.

For this application, circuit switching is preferable to the use of packet switching.

Explain why this is so.

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...............................................................................................................................................[6]

(c) A web page is transferred from a web server to a home computer using the Internet.

Explain how the web page is transferred using packet switching.

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...............................................................................................................................................[3]
© UCLES 2015 9608/32/O/N/15 [Turn over
8

4 (a) Four descriptions and four types of computer architecture are shown below.

Draw a line to connect each description to the appropriate type of computer architecture.

Description Computer architecture

A computer that does not have the ability for


SIMD
parallel processing.

The processor has several ALUs. Each ALU


executes the same instruction but on different MISD
data.

There are several processors. Each processor


executes different instructions drawn from a
SISD
common pool. Each processor operates on
different data drawn from a common pool.

There is only one processor executing one


MIMD
set of instructions on a single set of data.

[4]
(b) In a massively parallel computer explain what is meant by:

(i) Massive .............................................................................................................................

...........................................................................................................................................

.......................................................................................................................................[1]

(ii) Parallel ..............................................................................................................................

...........................................................................................................................................

.......................................................................................................................................[1]

(c) There are both hardware and software issues that have to be considered for parallel
processing to succeed.

Describe one hardware and one software issue.

Hardware ..................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

Software ....................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...............................................................................................................................................[4]
© UCLES 2015 9608/32/O/N/15
9

5 (a) (i) Complete the Boolean function that corresponds to the following truth table.

INPUT OUTPUT

P Q R Z

0 0 0 0

0 0 1 0

0 1 0 0

0 1 1 0

1 0 0 1

1 0 1 1

1 1 0 0

1 1 1 1

Z = P . Q . R + ................................................................................................................[3]

The part to the right of the equals sign is known as the sum-of-products.

(ii) For the truth table above complete the Karnaugh Map (K-map).

PQ

00 01 11 10

0
R
1
[1]

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

(iii) Draw loop(s) around appropriate groups of 1’s to produce an optimal sum-of-products.
[2]

(iv) Using your answer to part (a)(iii), write the simplified sum-of-products Boolean function.

Z = .................................................................................................................................[1]

© UCLES 2015 9608/32/O/N/15 [Turn over


10

(b) The truth table for a logic circuit with four inputs is given below:

INPUT OUTPUT
P Q R S Z
0 0 0 0 0
0 0 0 1 0
0 0 1 0 0
0 0 1 1 0
0 1 0 0 0
0 1 0 1 1
0 1 1 0 0
0 1 1 1 1
1 0 0 0 0
1 0 0 1 1
1 0 1 0 0
1 0 1 1 0
1 1 0 0 0
1 1 0 1 1
1 1 1 0 0
1 1 1 1 1

(i) Complete the K-map corresponding to the truth table above.

PQ

RS

[4]

(ii) Draw loop(s) around appropriate groups of 1’s to produce an optimal sum-of-products.
[2]

(iii) Using your answer to part (b)(ii), write the simplified sum-of-products Boolean function.

Z = .................................................................................................................................[2]

© UCLES 2015 9608/32/O/N/15


11

6 A number of processes are being executed in a computer.

A process can be in one of three states: running, ready or blocked.

(a) For each of the following, the process is moved from the first state to the second state.
Describe the conditions that cause each of the following changes of state of a process:

From blocked to ready ..............................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

From running to ready ..............................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...............................................................................................................................................[4]

(b) Explain why a process cannot move directly from the ready state to the blocked state.

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...............................................................................................................................................[3]

(c) A process in the running state can change its state to something which is neither the ready
state nor the blocked state.

(i) Name this state.

.......................................................................................................................................[1]

(ii) Identify when a process would enter this state.

.......................................................................................................................................[1]

(d) Explain the role of the low-level scheduler in a multiprogramming operating system.

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...............................................................................................................................................[2]
© UCLES 2015 9608/32/O/N/15
12

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 2015 9608/32/O/N/15


Cambridge International Examinations
Cambridge International Advanced Level
* 4 4 4 9 7 9 0 3 3 7 *

COMPUTER SCIENCE 9608/33


Paper 3 Advanced Theory May/June 2015
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) 95542/2
© UCLES 2015 [Turn over
2

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

• an assignment statement
• a variable
• a number
• a letter
• a digit
• an operator

Assignment statement
Variable := Variable Operator Number

Variable
Letter Number

Number
Digit

Letter
A

Digit
1

Operator
+

© UCLES 2015 9608/33/M/J/15


3

(a) The following assignment statements are invalid.

Give a reason in each case.

(i) A2 = B3 + 123

Reason ..............................................................................................................................

.......................................................................................................................................[1]

(ii) B3 := B3 – 203

Reason ..............................................................................................................................

.......................................................................................................................................[1]

(iii) A2414 := A3 * B

Reason ..............................................................................................................................

.......................................................................................................................................[1]

(b) Complete the Backus-Naur Form (BNF) for the syntax diagrams shown on the opposite page.

<letter> has been done for you.

<assignmentstatement> ::=

...................................................................................................................................................

<variable> ::=

...................................................................................................................................................

<number> ::=

...................................................................................................................................................

<letter> ::= A | B | C

<digit> ::=

...................................................................................................................................................

<operator> ::=

...................................................................................................................................................
[6]

© UCLES 2015 9608/33/M/J/15 [Turn over


4

(c) A company develops software. It provides virtual machines for its software developers. The
company has a large number of clients who use a wide range of hardware and software.

(i) Explain the term virtual machine. Ensure that your answer includes the terms hardware
and software.

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

.......................................................................................................................................[2]

(ii) Give one benefit to the company of using virtual machines.

...........................................................................................................................................

.......................................................................................................................................[1]

(iii) Give one drawback to the company of using virtual machines.

...........................................................................................................................................

.......................................................................................................................................[1]

© UCLES 2015 9608/33/M/J/15


5

2 (a) Four descriptions and three types of local area network (LAN) are shown below.

Draw a line to connect each description to the type of LAN it applies to.

Description Type of LAN

Any packet the listening computer receives Bus with terminators


may be part of a message for itself at each end

Connection provided through an access point Star

A process for handling collisions has to be


Wireless
implemented

Listening computer only receives packets that


are addressed to itself
[4]

(b) A user downloads a file using the FTP protocol.

Explain the function played by each of the following:

(i) Server ................................................................................................................................

...........................................................................................................................................

.......................................................................................................................................[2]

(ii) Command ..........................................................................................................................

...........................................................................................................................................

.......................................................................................................................................[2]

(iii) Anonymous .......................................................................................................................

...........................................................................................................................................

.......................................................................................................................................[2]

© UCLES 2015 9608/33/M/J/15 [Turn over


6

3 The incomplete table below shows descriptions and terms relating to malware.

(a) Complete the table with appropriate descriptions and terms.

Description Term

Sending emails which contain a link to a website that


A attempts to trick users into giving confidential personal
data. .....................................

It replicates by inserting itself into another piece of


B .....................................
software.

........................................................................................
C ........................................................................................ Worm

........................................................................................

........................................................................................
D ........................................................................................ Spam

........................................................................................

[4]

(b) Choose term A or term B and describe:

• a problem that might arise for a user


• a possible solution to the problem

Term .....................

Problem ....................................................................................................................................

...................................................................................................................................................

Solution .....................................................................................................................................

...............................................................................................................................................[2]

© UCLES 2015 9608/33/M/J/15


7

(c) Explain the following terms:

Cipher text ................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

Private key ................................................................................................................................

...................................................................................................................................................

...............................................................................................................................................[2]

(d) Bill, a manager of a company, sent an email with very sensitive information to a work
colleague, Alison. However, Bill also accidentally sent it to everybody in the company.

Describe the method used that ensured only Alison was able to read the original contents of
the email.

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...............................................................................................................................................[4]

© UCLES 2015 9608/33/M/J/15 [Turn over


8

4 (a) A particular programming language allows the programmer to define their own data types.

An example of a user-defined data type for an address is:

TYPE ThisAddress
DECLARE ThisHouseNo : INTEGER
DECLARE ThisStreet : STRING
DECLARE ThisTown : STRING
ENDTYPE

A variable of this new type is declared as follows:

DECLARE HomeAddress : ThisAddress

(i) Write the statement that assigns the house number 34 to HomeAddress.

.......................................................................................................................................[1]

(ii) The type definition for ThisAddress is to be changed.

Rewrite one line from the definition for each of the following changes.

House numbers are in the range from 1 to 10.

DECLARE ...........................................................................................................................

The possible towns are limited to: Brightown, Arunde and Shoram.

DECLARE .......................................................................................................................[2]

© UCLES 2015 9608/33/M/J/15


9

(b) Temperature data from a number of weather stations are to be processed by a program.

The following data are to be stored:

• weather station ID (a unique four-letter code)

• latitude (to 2 decimal places)

• average temperature (to the nearest whole number) for each year from 2001 to 2015
inclusive

A programmer designs a composite data type WeatherStation. A variable of this type can
be used to store all the data for one particular station.

(i) Write the definition for the user-defined data type WeatherStation.

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

.......................................................................................................................................[5]

(ii) The programmer decides to store all the data in a file. The number of weather stations
could grow to reach 20000, but not all stations will be present at first.

The programmer decides on random organisation for the file.

Describe three steps which show how a new weather station record is added to the file.

1 ........................................................................................................................................

...........................................................................................................................................

2 ........................................................................................................................................

...........................................................................................................................................

3 ........................................................................................................................................

.......................................................................................................................................[3]

© UCLES 2015 9608/33/M/J/15 [Turn over


10

5 (a) (i) Complete the truth table for this logic circuit:

A
X

Working space
A B X
0 0
0 1
1 0
1 1
[1]

(ii) Complete the truth table for this logic circuit:

Working space
A B X
0 0
0 1
1 0
1 1
[1]

© UCLES 2015 9608/33/M/J/15


11

(b) A student decides to write an equation for X to represent the full behaviour of each logic
circuit.

(i) Write the Boolean expression that will complete the required equation for X for each
circuit:

Circuit 1: X = ......................................................................................................................

Circuit 2: X = ..................................................................................................................[2]

(ii) Write the De Morgan’s Law which is shown by your answers to part (a) and part (b)(i).

.......................................................................................................................................[1]

(c) Write the Boolean algebraic expression corresponding to the following logic circuit:

A
B

...............................................................................................................................................[3]

(d) Using De Morgan’s laws and Boolean algebra, simplify your answer to part (c).

Show all your working.

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...............................................................................................................................................[3]

© UCLES 2015 9608/33/M/J/15 [Turn over


12

6 A company grows vegetables in a number of large greenhouses. For the vegetables to grow well,
the temperature, light level and soil moisture need to always be within certain ranges.

The company installs a computerised system to keep these three growing conditions within the
best ranges. Sensors are used for collecting data about the temperature, light level, and moisture
content of the soil.

(a) Name the type of system described.

...............................................................................................................................................[1]

(b) Give three items of hardware that would be needed for this system. Justify your choice.
Do not include sensors in your answer.

Item 1 ........................................................................................................................................

Justification ...............................................................................................................................

...................................................................................................................................................

Item 2 ........................................................................................................................................

Justification ...............................................................................................................................

...................................................................................................................................................

Item 3 ........................................................................................................................................

Justification ...............................................................................................................................

...............................................................................................................................................[6]

(c) (i) Describe what is meant by feedback in the above system.

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

.......................................................................................................................................[3]

(ii) When the system was designed, various parameters for temperature were set.

Name one of these parameters.

...........................................................................................................................................

.......................................................................................................................................[1]

© UCLES 2015 9608/33/M/J/15


13

(iii) Explain how this parameter value is used by the feedback system.

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

.......................................................................................................................................[2]

Question 6 continues on page 14.

© UCLES 2015 9608/33/M/J/15 [Turn over


14

Each greenhouse has eight sensors (numbered 1–8).

• The byte at address 150 is used to store eight 1-bit flags.

• A flag is set to indicate whether its associated sensor reading is waiting to be processed.

• More than one sensor reading may be waiting to be processed at any particular moment.

• Data received from the sensors is stored in a block of eight consecutive bytes (addresses
201–208).

• The data from sensor 1 is at address 201, the data from sensor 2 is at address 202, and
so on.

Sensor number
1 2 3 4 5 6 7 8
150 0 1 0 0 0 1 0 1

201 0 0 0 0 0 0 0 0
202 0 0 0 0 0 1 0 0
203 0 0 0 0 0 0 0 0
204 0 0 0 1 0 0 0 0
205 0 0 0 0 0 0 1 0
206 0 0 0 1 0 1 0 0
207 0 0 0 1 0 0 1 0
208 0 0 0 1 0 0 1 0

(d) (i) Interpret the current reading for sensor 2.

...........................................................................................................................................

.......................................................................................................................................[2]

(ii) The accumulator is loaded with the data from location 150.

Write the assembly language instruction to check whether there is a value waiting to be
processed for sensor 6.

LDD 150 // data loaded from address 150

.......................................................................................................................................[3]

© UCLES 2015 9608/33/M/J/15


15

BLANK PAGE

© UCLES 2015 9608/33/M/J/15


16

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 2015 9608/33/M/J/15


Cambridge International Examinations
Cambridge International Advanced Level
* 4 6 2 2 0 4 8 3 6 1 *

COMPUTER SCIENCE 9608/32


Paper 3 Advanced Theory May/June 2015
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 (FD) 110069
© UCLES 2015 [Turn over
2

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

• an assignment statement
• a variable
• a letter
• an operator

Assignment statement
Variable = Variable Operator Variable ;

Variable
Letter Letter Letter

Letter Operator
a +

b –

d ÷

(a) The following assignment statements are invalid.

Give the reason in each case.

(i) a = b + c

Reason ..............................................................................................................................

.......................................................................................................................................[1]

(ii) a = b – 2;

Reason ..............................................................................................................................

.......................................................................................................................................[1]

(iii) a = dd * cce;

Reason ..............................................................................................................................

.......................................................................................................................................[1]

© UCLES 2015 9608/32/M/J/15


3

(b) Write the Backus-Naur Form (BNF) for the syntax diagrams shown on the opposite page.

<assignmentstatement> ::=

...................................................................................................................................................

<variable> ::=

...................................................................................................................................................

<letter> ::=

...................................................................................................................................................

<operator> ::=

...............................................................................................................................................[6]

(c) Rewrite the BNF rule for a variable so that it can be any number of letters.

<variable> ::=

...............................................................................................................................................[2]

(d) Programmers working for a software development company use both interpreters and
compilers.

(i) The programmers prefer to debug their programs using an interpreter.

Give one possible reason why.

...........................................................................................................................................

.......................................................................................................................................[1]

(ii) The company sells compiled versions of its programs.

Give a reason why this helps to protect the security of the source code.

...........................................................................................................................................

.......................................................................................................................................[1]

© UCLES 2015 9608/32/M/J/15 [Turn over


4

2 The incomplete table below shows descriptions and terms relating to malware.

(a) Complete the table with appropriate descriptions and terms.

Description Term

Unsolicited emails containing advertising material sent to a


A
distribution list. ...........................

A standalone piece of malicious software that can reproduce


B
itself automatically. ...........................

..................................................................................................

..................................................................................................
C .................................................................................................. Pharming

..................................................................................................

..................................................................................................

..................................................................................................

..................................................................................................
D .................................................................................................. Phishing

..................................................................................................

..................................................................................................

[4]

(b) For one of the terms, describe:

• a problem that might arise for a user


• a possible solution to the problem

Choose between the terms:

A / B (circle your choice)

Problem ....................................................................................................................................

...................................................................................................................................................

Solution .....................................................................................................................................

...............................................................................................................................................[2]

© UCLES 2015 9608/32/M/J/15


5

(c) Explain the following terms:

Encryption .................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

Public key ..................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...............................................................................................................................................[2]

(d) A user downloads software from the Internet.

(i) State what should be part of the download to provide proof that the software is authentic.

.......................................................................................................................................[1]

(ii) Describe the process for ensuring that the software is both authentic and has not been
altered.

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

.......................................................................................................................................[4]

© UCLES 2015 9608/32/M/J/15 [Turn over


6

3 (a) A particular programming language allows the programmer to define their own data types.

ThisDate is an example of a user-defined structured data type.

TYPE ThisDate
DECLARE ThisDay : (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12,
13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23,
24, 25, 26, 27, 28, 29, 30, 31)
DECLARE ThisMonth : (Jan, Feb, Mar, Apr, May, Jun, Jul, Aug,
Sep, Oct, Nov, Dec)
DECLARE ThisYear : INTEGER
ENDTYPE

A variable of this new type is declared as follows:

DECLARE DateOfBirth : ThisDate

(i) Name the non-composite data type used in the ThisDay and ThisMonth declarations.

.......................................................................................................................................[1]

(ii) Name the data type of ThisDate.

.......................................................................................................................................[1]

(iii) The month value of DateOfBirth needs to be assigned to the variable


MyMonthOfBirth.

Write the required statement.

.......................................................................................................................................[1]

© UCLES 2015 9608/32/M/J/15


7

(b) Annual rainfall data from a number of locations are to be processed in a program.

The following data are to be stored:

• location name
• height above sea level (to the nearest metre)
• total rainfall for each month of the year (centimetres to 1 decimal place)

A user-defined, composite data type is needed. The programmer chooses


LocationRainfall as the name of this data type.

A variable of this type can be used to store all the data for one particular location.

(i) Write the definition for the data type LocationRainfall.

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

.......................................................................................................................................[5]

(ii) The programmer decides to store all the data in a file. Initially, data from 27 locations will
be stored. More rainfall locations will be added over time and will never exceed 100.

The programmer has to choose between two types of file organisation. The two types are
serial and sequential.

Give two reasons for choosing serial file organisation.

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

.......................................................................................................................................[2]

© UCLES 2015 9608/32/M/J/15 [Turn over


8

4 (a) (i) Complete the truth table for this logic circuit:

A
X

Working space
A B X
0 0
0 1
1 0
1 1
[1]

(ii) Complete the truth table for this logic circuit:

Working space
A B X
0 0
0 1
1 0
1 1
[1]

© UCLES 2015 9608/32/M/J/15


9

(b) A student decides to write an equation for X to represent the full behaviour of each logic
circuit.

(i) Write the Boolean expression that will complete the required equation for X for each
circuit:

Circuit 1: X = ......................................................................................................................

Circuit 2: X = ..................................................................................................................[2]

(ii) Write the De Morgan’s Law which is shown by your answers to part (a) and part (b)(i).

.......................................................................................................................................[1]

(c) Write the Boolean algebraic expression corresponding to the following logic circuit:

A
B

...............................................................................................................................................[3]

(d) Using De Morgan’s laws and Boolean algebra, simplify your answer to part (c).

Show all your working.

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...............................................................................................................................................[3]

© UCLES 2015 9608/32/M/J/15 [Turn over


10

5 A gardener grows vegetables in a greenhouse. For the vegetables to grow well, the temperature
needs to always be within a particular range.

The gardener is not sure about the actual temperatures in the greenhouse during the growing
season. The gardener installs some equipment. This records the temperature every hour during
the growing season.

(a) Name the type of system described.

...............................................................................................................................................[1]

(b) Identify three items of hardware that would be needed to acquire and record the temperature
data. Justify your choice for each.

Item 1 ........................................................................................................................................

Justification ...............................................................................................................................

...................................................................................................................................................

Item 2 ........................................................................................................................................

Justification ...............................................................................................................................

...................................................................................................................................................

Item 3 ........................................................................................................................................

Justification ................................................................................................................................

...............................................................................................................................................[6]

(c) The equipment records temperatures in the greenhouse. It does this for seven locations.

Each recording is stored as two successive bytes. The format is shown below:

Greenhouse location Temperature reading

7 6 5 4 3 2 1 0

Byte 1 Byte 2

The location is indicated by the setting of one of the seven bits in byte 1. For example,
location 4 is indicated by setting bit 4.

Bit 0 of byte 1 acts as a flag:

• the initial value is zero


• when the reading has been processed it is set to 1

Byte 2 contains the temperature reading (two’s complement integer).

© UCLES 2015 9608/32/M/J/15


11

(i) Interpret the data in byte 1 shown below:

7 6 5 4 3 2 1 0
0 0 1 0 0 0 0 1 0 0 0 1 1 0 0 0

Byte 1 Byte 2

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

.......................................................................................................................................[2]

(ii) The system receives a temperature reading of –5 degrees from sensor 6.

Complete the boxes below to show the two bytes for this recording. The reading has not
yet been processed.

7 6 5 4 3 2 1 0

Byte 1 Byte 2

[2]

(d) (i) The accumulator is loaded with the value of byte 1 from location 106.

Write the assembly language instruction to check whether the reading in byte 2 came
from location 4.

LDD 106 // data loaded from address 106

.......................................................................................................................................[4]

(ii) Write the assembly language instruction to set the flag (bit 0) of the byte contained in the
accumulator to 1.

.......................................................................................................................................[2]

© UCLES 2015 9608/32/M/J/15 [Turn over


12

6 (a) Four descriptions and three protocols are shown below.

Draw a line to connect each description to the appropriate protocol.

Description Protocol used

email client downloads an email from an email


HTTP
server

email is transferred from one email server to


POP3
another email server

email client sends email to email server SMTP

browser sends a request for a web page to a


web server

[4]

(b) Downloading a file can use the client-server model. Alternatively, a file can be downloaded
using the BitTorrent protocol.

Name the model used.

...............................................................................................................................................[1]

(c) For the BitTorrent protocol, explain the function of each of the following:

(i) Tracker ...............................................................................................................................

...........................................................................................................................................

.......................................................................................................................................[2]

(ii) Seed ..................................................................................................................................

...........................................................................................................................................

.......................................................................................................................................[2]

(iii) Swarm ...............................................................................................................................

...........................................................................................................................................

.......................................................................................................................................[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 2015 9608/32/M/J/15

You might also like