Computing (9691) · Oct/Nov 2013 · Question paper 32

Cambridge Computing (9691) question paper for paper 32, Oct/Nov 2013 — 9691/32/O/N/13, file 9691_w13_qp_32.pdf.

Advertisement
Loading the paper…

More Computing (9691) papers

Paper 32 in other years

All Computing papers
Text of this paper

UNIVERSITY OF CAMBRIDGE INTERNATIONAL EXAMINATIONS
General Certificate of Education Advanced Level

*2685241834*

9691/32

COMPUTING

October/November 2013

Paper 3

2 hours
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 on all the work you hand in.
Write in dark blue or black pen.
You may use a soft pencil for any diagrams, graphs or rough working.
Do not use staples, paper clips, highlighters, glue or correction fluid.
DO NOT WRITE IN ANY BARCODES.
Answer all questions.
No marks will be awarded for using brand names for 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.

This document consists of 19 printed pages and 1 blank page.
IB13 11_9691_32/7RP
© UCLES 2013

[Turn over

2
1

(a) Convert the following infix expressions into reverse Polish notation:

For
Examiner's
Use

(i) (x - y) / 5

[1]
(ii) 2 / (4 * a + 1)

[2]

(b) What is the value of this reverse Polish expression:
a b + c d - /
for a = 7, b = 5, c = 8 and d = 2 ?
Show your working.

[2]

© UCLES 2013

9691/32/O/N/13

3
(c) A binary tree can be used to represent an expression or a statement.

For
Examiner's
Use

*
*
/
1

h
b

2

The diagram shows the binary tree for the infix expression:
1 / 2 * b * h
(i) Explain how the infix form for this expression is produced using a tree traversal.

[1]
(ii) What is the reverse Polish notation for this expression?

[1]
(iii) Explain how the reverse Polish notation is produced using a tree traversal.

[1]

© UCLES 2013

9691/32/O/N/13

[Turn over

4
2

Customers order products from a website.
•
•
•
•
•

For
Examiner's
Use

An order contains one or more products.
Over time, a customer places many orders.
A product will appear on many customer orders.
Each product is sourced from a single supplier and a number of suppliers are used.
A supplier can supply more than one product.

At present the company stores and manages all the data using flat files.
(a) Describe three advantages that a relational database would have over the use of flat
files.
1

2

3
[3]

(b) (i) What is the relationship between product and supplier?
[1]
(ii) What is the relationship between product and order?
[1]

(c) A database solution is to be developed.
Two of the tables are PRODUCT and ORDER.
(i) Draw an entity-relationship (E-R) diagram showing a database design which can
be produced so that the product and order data are fully normalised.

[2]

© UCLES 2013

9691/32/O/N/13

5
(ii) Explain how the relationships are implemented.

For
Examiner's
Use

[2]

(d) The following table design is suggested for PRODUCT.
PRODUCT(ProductID, ProductDescription, RetailPrice, SupplierID,
SupplierName, SupplierTelNumber)
This is poorly designed.
(i) Is this table in First Norm Form (1NF)?
Explain.

[1]
(ii) Is this table in Second Normal form (2NF)?
Explain.

[1]
(iii) The table is not in Third Normal Form (3NF).
Explain.

[1]
(iv) Using only the attributes given in the PRODUCT table above, produce a new design
which is fully normalised.
The table descriptions should be expressed as:
TableName(Attribute1, Attribute2, Attribute3, ...)

[2]

© UCLES 2013

9691/32/O/N/13

[Turn over

6
(e) Explain why all tables in the final design should be fully normalised.

For
Examiner's
Use

[2]

(f) The table to store the order data has the following design:
ORDER(OrderNo, OrderDate, OrderTime, IsPaid, OrderAmountPaid,
PaymentMethod, CustomerID)
•
•

IsPaid has data type Boolean
PaymentMethod has data type Char with possible values: C - credit card,
D - debit card, A - account customer

Write a Data Manipulation Language (DML) query to report orders which were placed
on the 15 January 2013 and paid for using a debit card. Show the customer ID and
order number only.
Use the keywords SELECT, FROM, WHERE.

[3]

3

(a) Describe what is meant by a register.

[2]

(b) (i) Convert the denary number 60 into hexadecimal.
[1]
(ii) Convert the hexadecimal number 10F into denary.
[1]

© UCLES 2013

9691/32/O/N/13

7
(iii) Why do computer scientists often write binary numbers in hexadecimal?

For
Examiner's
Use

[1]

(c) The diagram shows a program loaded into main memory starting at memory address
30 Hex.

Address

Main memory
(contents shown in
Hex.)

30
31
32
33

2150
A351
A552
FFFF

58
59
5A

003C
103C
010B

(i) How many bytes are used to store each program instruction?
[1]
(ii) Describe the steps in the fetch stage of the fetch-execute cycle.
Refer to the instruction at address 30 to illustrate your answer.

[5]

© UCLES 2013

9691/32/O/N/13

[Turn over

8
(d) The following table shows some of a processor’s instruction set in assembly language.
Instruction
Explanation
Op Code

Operand

LIX <address>

Load the contents of the address to the Index register (IX)

LDX <address>

Indexed addressing. Form the address as <address> +
the contents of IX. Copy the contents of this 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 (ACC or IX)

JMP <address>

Jump to the given address

The following program is to be executed.
Shown are:
•
•

the first six instructions of this program
the memory locations which will be accessed by this program.

Address

© UCLES 2013

Main memory
contents

100
101
102
103
104
105

LIX 200
LDX 200
ADD 204
STO 204
INC IX
JMP 101

200
201
202
203
204

1
13
14
22
0

9691/32/O/N/13

For
Examiner's
Use

9
Complete the trace table below for three iterations of the loop.

For
Examiner's
Use

Show each change to the contents of the registers and memory location 204.

ACC

IX

Main memory
address 204
0

[4]

4

Object-oriented programming is one programming paradigm.
(a) Explain the difference between a class and an object.

[3]

© UCLES 2013

9691/32/O/N/13

[Turn over

10
(b) The following scenario is to be implemented with object-oriented programming.
A software company stores data for all employees (EMPLOYEE). The company employs
admin staff (ADMIN) and project staff (PROJECTSTAFF). Project staff are either
programmers (PROGRAMMER) or technical authors (TECHAUTHOR).
Data stored will include:
•
•
•
•
•
•
•

employee ID for employees
specialist programming language for programmers
software specialism for technical authors
full time or part time indicator
department for admin staff
salary grade
the project team that project staff are assigned to

Complete the class diagram showing the classes and properties only for the data given
above.
EMPLOYEE
EmployeeID: INTEGER

[8]

© UCLES 2013

9691/32/O/N/13

For
Examiner's
Use

11
(c) Explain what is meant by encapsulation.

For
Examiner's
Use

[2]

© UCLES 2013

9691/32/O/N/13

[Turn over

12
5

Customer names are stored in the array Customer.
An algorithm is to be designed to perform a serial search of the array for a requested
customer name.
The algorithm will use the variables shown in the table.
(a) Study the table and the algorithm and fill in the gaps.
Identifier
Customer
Index

Data Type
ARRAY[100] OF STRING
INTEGER

Description
Array of customer names
Used to index the array elements

IsFound
SearchName

© UCLES 2013

The requested customer name

STRING

9691/32/O/N/13

For
Examiner's
Use

13
//Serial search algorithm

For
Examiner's
Use

INPUT
IsFound ← FALSE
Index ← 1

REPEAT
IF

= SearchName
THEN
IsFound ← TRUE
OUTPUT "Found at position " Index
ELSE

ENDIF
UNTIL (IsFound = TRUE) OR

IF
THEN
OUTPUT "Customer name was NOT FOUND"
[7]

ENDIF

(b) How many comparisons on average will be needed to find a requested customer from
the Customer array?
[1]

© UCLES 2013

9691/32/O/N/13

[Turn over

14
(c) A binary search may be an alternative algorithm to a serial search.

For
Examiner's
Use

(i) What condition is put on the Customer array for a binary search to be used?
[1]
The following recursive function is for the binary search algorithm.
FUNCTION BinarySearch(ThisArray, FindValue, Low, High) : INTEGER
IF High < Low
THEN
RETURN -1 // not found
ELSE
Middle ← INT((High + Low) / 2)
IF ThisArray[Middle] > FindValue
THEN
BinarySearch(ThisArray, FindValue, Low,
Middle – 1)
ELSE
IF (ThisArray[Middle] < FindValue)
THEN
BinarySearch(ThisArray, FindValue,
Middle + 1, High)
ELSE
RETURN Middle // found
ENDIF
ENDIF
ENDIF
ENDFUNCTION
(ii) How can you recognise that the function is recursive?
[1]

© UCLES 2013

9691/32/O/N/13

15
(iii) A binary search is carried out on the data in the Surname array shown.

1
2
3
4
5
6
7
8
9
10
11

For
Examiner's
Use

Surname
Ban
Chae
Dang
Hwang
Jeong
Jin
Jo
Ju
Ma
So
Song

Complete the trace table below for the following function call:
BinarySearch(Surname, "Hwang", 1, 11)

Low

High

1

11

Middle

RETURN

[4]

© UCLES 2013

9691/32/O/N/13

[Turn over

16
6

(a) The integers -126 and -5 are to be added.
Write the binary for -126 and -5 using two’s complement. Show the addition in binary
including any carry bits.
-126
-5

+

Comment on the answer.

[4]

(b) Real numbers are to be stored using floating point representation with:
•
•
•

8 bits for the mantissa, followed by,
4 bits for the exponent
two’s-complement is used for both the mantissa and exponent

(i) Consider the binary pattern:
0

1

1

0

1

0

0

0

0

0

1

1

What number is this in denary? Show your working.

[3]
(ii) Explain how you can recognise that the above number is normalised.

[1]

© UCLES 2013

9691/32/O/N/13

For
Examiner's
Use

17
(iii) The representation used 8 bits for the mantissa and 4 bits for the exponent. This is
to be redesigned. The number of bits used for the mantissa and the exponent is
changed, but the total number of bits remains 12.

For
Examiner's
Use

What implications does this have for the range and precision of numbers that can
be represented?

[2]

© UCLES 2013

9691/32/O/N/13

[Turn over

18
7

The encryption of data is widely used in computing.

For
Examiner's
Use

(a) One application is online banking.
State two other applications where encryption is used.
Describe the reason for encrypting the data for each application.
Application 1
Reason

Application 2
Reason
[4]

(b) Explain the terms plain text and cipher text.
Plain text

Cipher text
[2]

(c) Symmetric encryption uses a single key.
Explain how a message is encrypted and decrypted using symmetric encryption.

[3]

© UCLES 2013

9691/32/O/N/13

19
(d) Authorisation and authentication are processes designed to protect the computer
system and data.
Give one technique used for each.
Authorisation

Authentication
[2]

© UCLES 2013

9691/32/O/N/13

For
Examiner's
Use

20
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.
University of 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 2013

9691/32/O/N/13

Advertisement