Computing (9691) · May/June 2012 · Question paper 32

Cambridge Computing (9691) question paper for paper 32, May/June 2012 — 9691/32/M/J/12, file 9691_s12_qp_32.pdf.

Advertisement
Loading the paper…

More Computing (9691) papers

Paper 32 in other years

All Computing papers
Text of this paper

w

w
ap
eP

m

e
tr
.X

w
om
.c

s
er

UNIVERSITY OF CAMBRIDGE INTERNATIONAL EXAMINATIONS
General Certificate of Education Advanced Level

*6373916302*

9691/32

COMPUTING

May/June 2012

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 16 printed pages.
IB12 06_9691_32/FP
© UCLES 2012

[Turn over

2
1

A database is designed to store data about students at a college and the subjects that they
study.
•
•
•
•

All students are based in a tutor group
A tutor supervises all the students in their tutor group
Each subject has one subject teacher only
Students study a number of subjects

The following table StudentSubjects was a first attempt at the database design.
Table: StudentSubjects
StudentName
Tom

TutorGroup
6

Tutor
SAN

Joe

7

MEB

Samir

6

SAN

Subject
Physics
Chemistry
Gen. Studies
Geography
French
Computing
Chemistry
Maths
Gen. Studies

Level SubjectTeacher
A
SAN
A
MEB
AS
DIL
AS
ROG
AS
HEN
A
VAR
A
MEB
A
COR
A
DIL

(a) (i) Explain why the table is not in First Normal Form (1NF).

[1]
(ii) Explain your answer by referring to the above data.

[1]

(b) The design is changed to the following:
Student (StudentName, TutorGroup, Tutor)
StudentSubjectChoices (StudentName, Subject, Level, SubjectTeacher)

© UCLES 2012

9691/32/M/J/12

For
Examiner's
Use

3
Using the data given in the original table, show how this data is now stored in the
revised table designs.

For
Examiner's
Use

Table: Student
StudentName

TutorGroup

Tutor

Table: StudentSubjectChoices
StudentName

Subject

Level

SubjectTeacher

[3]

(c) (i) Explain what is meant by a primary key.

[2]
(ii) A student is not allowed to choose the same subject at A Level and AS.
What is the primary key of table StudentSubjectChoices?
[1]

© UCLES 2012

9691/32/M/J/12

[Turn over

4
(iii) There is a relationship between tables Student and StudentSubjectChoices.
Explain how the relationship is established using a primary key and foreign key.

[2]

(d) The design of table StudentSubjectChoices is:
StudentSubjectChoices (StudentName, Subject, Level, SubjectTeacher)
Explain why this table is not in Second Normal Form (2NF).

[2]

(e) The design of table Student is:
Student (StudentName, TutorGroup, Tutor)
Explain why this table is not in Third Normal Form (3NF).

[2]

© UCLES 2012

9691/32/M/J/12

For
Examiner's
Use

5
2

A binary pattern can be used to represent different data used in a computer system.

For
Examiner's
Use

(a) Consider the binary pattern: 0101 0011
The pattern represents an integer.
What number is this in denary?

[1]

(b) Consider the binary pattern: 0001 0101 0011
The pattern represents a Binary Coded Decimal (BCD) number.
What number is this in denary?

[1]

(c) Consider the binary pattern: 1001 0010
This represents a two’s complement integer.
What number is this in denary?

[1]

© UCLES 2012

9691/32/M/J/12

[Turn over

6
(d) Floating point is to be used to represent real numbers with:
•
•
•

For
Examiner's
Use

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

(i) Consider the 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 (d)(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:

© UCLES 2012

[3]

9691/32/M/J/12

7
(e) 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.

For
Examiner's
Use

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

9691/32/M/J/12

[Turn over

8
3

(a) 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.
Study the table and the algorithm and fill in the gaps.
Identifier

Data Type

Customer

ARRAY[2000] OF STRING

Index

INTEGER

Description
The customer names
Index position in the customer array

IsFound
SearchName

The requested customer name

STRING

//Serial search algorithm
INPUT
IsFound ← FALSE

Index ← 1
REPEAT
IF Customer [

] = SearchName

THEN
IsFound ← TRUE
OUTPUT “FOUND – at position ” Index “ in the array”
ELSE
Index ←
ENDIF
UNTIL (IsFound = TRUE) OR
IF
THEN
OUTPUT “Customer name was NOT FOUND”
[7]

ENDIF

(b) Comment on the efficiency of the serial search algorithm in part (a) for retrieving a data
item from an array with 2000 items.

[2]

© UCLES 2012

9691/32/M/J/12

For
Examiner's
Use

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

For
Examiner's
Use

(i) Describe how this algorithm works. (Do not attempt to write the pseudocode.)

[4]
(ii) A binary search is made to locate Cherry.
1
2
3
4
5
6
7

Apple
Banana
Cherry
Kiwi
Lemon
Mango
Plum

List, in order, the comparisons which are made.

[3]

© UCLES 2012

9691/32/M/J/12

[Turn over

10
4

Expressions can be written in either infix or reverse Polish notation.

For
Examiner's
Use

(a) Evaluate this reverse Polish expression:
4 6 * 3 –
[1]

(b) Write the following infix expressions in reverse Polish.
(i) (a-5)/(b+c)

[1]
(ii) 2 * 3 + 6 / 2

[2]

(c) Describe one benefit of storing an expression in reverse Polish.

[1]

(d) An expression in reverse Polish can be evaluated on a computer system using a stack.
(i) Describe the operation of a stack.

[1]
(ii) A stack is to be implemented as an array with an integer variable to point to the
‘top of stack’ index position.
State whether this is a static data structure or a dynamic data structure and explain
your choice.

[2]

© UCLES 2012

9691/32/M/J/12

11
(iii) The reverse Polish expression 3 7 * 6 + 9 / is to be evaluated using a stack.
The first available location on the stack is 1.

For
Examiner's
Use

Show how the contents of the stack change as this expression is evaluated.
5
4
3
2
1
[4]

© UCLES 2012

9691/32/M/J/12

[Turn over

12
5

The table shows the assembly language instructions for a processor which has one general
purpose register – the Accumulator.
Instruction
Op Code

Explanation

Operand

LDD

<address>

Load using direct addressing

STO

<address>

Store the contents of the Accumulator at the given address

LDI

<address>

Load using indirect addressing

LDX

<address>

Load using indexed addressing

INC

Add 1 to the contents of the Accumulator

END

End the program and return to the operating system

(a) Write on the diagram to explain the instruction shown.
Show the contents of the Accumulator after the execution of the instruction.
LDD 105

Accumulator

100
101
102
103
104
105
106
107

Main memory
0100 0000
0110 1000
1111 1110
1111 1010
0101 1101
0001 0001
1010 1000
1100 0001

200

1001 1111
[2]

(b) Write on the diagram to explain the instruction shown.
Show the contents of the registers after the execution of the instruction.
LDX 101

Accumulator

Index Register
0000 0011

100
101
102
103
104
105
106
107

Main memory
0100 0000
0110 1000
1111 1110
1111 1010
0101 1101
0001 0001
1010 1000
1100 0001

200

1001 1111
[4]

© UCLES 2012

9691/32/M/J/12

For
Examiner's
Use

13
(c) Trace this assembly language program using the trace table below.
500
501
502
503
504
505
506
507
508
509
510

Accumulator

LDD
INC
STO
LDD
INC
STO
END
22
170
0
0

For
Examiner's
Use

507
509
508
510

507
22

Memory Address
508
509
170

0

510
0

[5]

(d) Explain the relationship between assembly language instructions and machine code
instructions.

[1]

© UCLES 2012

9691/32/M/J/12

[Turn over

14
6

In a multiprogramming environment the operating system includes a scheduler.

For
Examiner's
Use

(a) Explain the purpose of the scheduler.

[2]

(b) A process will at any time be in one of three states.
(i) Name and describe each possible state.
1

2

3

[6]
(ii) How will the operating system keep details about the state of all processes?

[1]

© UCLES 2012

9691/32/M/J/12

15
(c) Any process can be described as either ‘processor bound’ or ‘input/output bound’.

For
Examiner's
Use

(i) Explain what is meant by these terms and give a typical application of each.
Processor bound

Application which is processor bound

Input/Output bound

Application which is I/O bound
[4]
(ii) A particular scheduler allocates a priority to each process for the use of the
processor.
State which type of process – processor bound or I/O bound – would be given
higher priority for the use of the processor. Explain why.

[2]

© UCLES 2012

9691/32/M/J/12

[Turn over

16
7

(a) Define what is meant by the term computer simulation.

For
Examiner's
Use

[2]

(b) Give two reasons why a computer system is particularly suited to carrying out a
simulation.
1

2
[2]

(c) A supermarket is about to open a new branch and is to use a computer simulation to
estimate the number of checkouts which will be required.
Identify three variables which need to be controlled by the software simulation of the
checkout operation.
1
2
3

[3]

(d) The values input to the simulation will affect the outputs produced.
Give one example for this checkout scenario of a change to an input which will directly
affect the output.
Input change

Effect on the output
[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.
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 2012

9691/32/M/J/12

Advertisement