Computer Science (9608) · May/June 2017 · Question paper 12
Cambridge Computer Science (9608) question paper for paper 12, May/June 2017 — 9608/12/M/J/17, file 9608_s17_qp_12.pdf.
Text of this paper
www.dynamicpapers.com
Cambridge International Examinations
Cambridge International Advanced Subsidiary and Advanced Level
* 0 2 1 5 2 4 6 1 4 4 *
9608/12
COMPUTER SCIENCE
May/June 2017
Paper 1 Theory Fundamentals
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 (CE/FC) 129908/3
© UCLES 2017
[Turn over
2
1
www.dynamicpapers.com
Some shops belong to the Rainbow Retail buying group. They buy their goods from one or more
suppliers.
Each shop has:
•
•
a unique shop ID
a single retail specialism (for example, food, electrical, garden).
Each supplier has:
•
•
a unique supplier ID
a similar single specialism recorded.
Rainbow Retail creates a relational database to record data about the shops and their suppliers.
The entity-relationship (E-R) diagram for the relationship between the SHOP and SUPPLIER tables
is shown.
SHOP
SUPPLIER
(a) Explain what the degree of relationship is between the entities SHOP and SUPPLIER.
[1]
The database design is as follows:
SHOP(ShopID, ShopName, Location, RetailSpecialism)
SUPPLIER(SupplierID, SupplierName, ContactPerson, RetailSpecialism)
SHOP-SUPPLIER(ShopID, SupplierID)
The SHOP–SUPPLIER table stores the suppliers that each shop has previously used.
Primary keys are not shown.
(b) (i)
Label the entities and draw the relationships to complete the revised E-R diagram.
SUPPLIER
[3]
© UCLES 2017
9608/12/M/J/17
3
(ii)
www.dynamicpapers.com
Complete the following table to show for each database table:
•
•
•
the primary key
the foreign key(s) (if any):
° Each table may contain none, one or more foreign key(s).
° For a table with no foreign key, write ‘None’.
an explanation for the use of any foreign key.
Table
Primary key
Foreign key(s)
(if any)
Explanation
SHOP
SUPPLIER
SHOP–SUPPLIER
[5]
(iii)
The database designer has implemented SUPPLIER.ContactPerson as a secondary
key.
Describe the reason for this.
[2]
(c) (i)
Write an SQL query to display the shop ID and location of all shops with a ‘GROCERY’
specialism.
[3]
(ii)
The existing shop with ID 8765 has just used the existing supplier SUP89 for the first
time.
Write an SQL script to add this data to the database.
[3]
© UCLES 2017
9608/12/M/J/17
[Turn over
4
2
www.dynamicpapers.com
(a) The first column of the following table gives features of different types of printer.
Put a tick (3) in the cells to show which features describe a laser and an inkjet printer.
Type of printer
Laser
Inkjet
Impact printer
Non-impact printer
Line printer
Page printer
[2]
(b) Two of the components of an inkjet printer are a stepper motor and a print head.
Describe how each component is used when printing a page.
(i)
Print head
[5]
(ii)
Stepper motor
[2]
© UCLES 2017
9608/12/M/J/17
5
www.dynamicpapers.com
(c) A student has an old working laptop computer. It has a small capacity internal disk drive with
almost all the storage space taken up by the operating system and application programs.
She needs to buy an external storage device to store her data files.
(i)
List two suitable devices.
Device 1
Device 2
[2]
(ii)
Describe one advantage of choosing one of the devices.
Advantage of choosing device 1 / 2 (circle)
[1]
© UCLES 2017
9608/12/M/J/17
[Turn over
6
3
www.dynamicpapers.com
(a) A computer has a microphone and captures a voice recording using sound editing software.
The user can select the sampling resolution before making a recording.
Define the term sampling resolution. Explain how the sampling resolution will affect the
accuracy of the digitised sound.
Sampling resolution
Explanation
[3]
(b) The computer also has bitmap software.
(i)
Define the term image resolution.
[1]
(ii)
A picture is drawn and is saved as a 16-colour bitmap image.
State how many bits are used to encode the data for one pixel.
[1]
(iii)
A second picture has width 8192 pixels and height 256 pixels. It is saved as a 256-colour
bitmap.
Calculate the file size in kilobytes.
Show your working.
[3]
(iv)
The actual bitmap file size will be larger than your calculated value as a bitmap file has a
file header.
State two items of data that are stored in the file header.
1
2 [2]
© UCLES 2017
9608/12/M/J/17
7
4
(a) (i)
www.dynamicpapers.com
Explain why a personal computer (PC) needs an operating system (OS).
[2]
(ii)
One of the tasks carried out by the OS is the management of the use of the processor.
Name and describe two other management tasks that the OS performs.
1
2
[4]
(b) A user has the following issues with the use of their personal computer (PC).
For each case, state the utility software which should provide a solution.
(i)
The user wants to send a large file as an attachment to an email. The user knows that
the recipient’s Internet Service Provider (ISP) has a limit of 2MB for file attachments.
Utility software solution: [1]
(ii)
The user is writing a book and is worried that the document files could get damaged or
deleted.
Utility software solution: [1]
(iii)
The computer has recently been slow to load large files. The user has deleted a large
number of small files to try to solve the problem. A friend has advised that there is a
procedure which should be regularly carried out to reorganise file storage on the hard
disk.
Utility software solution: [1]
(iv)
The user clicked on an attachment in an unsolicited email. Since then, the computer has
shown some unexplained behaviours.
Utility software solution: [1]
© UCLES 2017
9608/12/M/J/17
[Turn over
www.dynamicpapers.com
8
5
The following table shows part of the instruction set for a processor. The processor has one
general purpose register, the Accumulator (ACC), and an Index Register (IX).
Instruction
Op code
(mnemonic)
Operand
Explanation
Op code
(binary)
LDD
<address>
0001 0011
Direct addressing. Load the contents of
the location at the given address to the
Accumulator (ACC).
LDI
<address>
0001 0100
Indirect addressing. The address to be used is
at the given address. Load the contents of this
second address to ACC.
LDX
<address>
0001 0101
Indexed addressing. Form the address from
<address> + the contents of the Index
Register. Copy the contents of this calculated
address to ACC.
LDM
#n
0001 0010
Immediate addressing. Load the denary
number n to ACC.
LDR
#n
0001 0110
Immediate addressing. Load denary number n
to the Index Register (IX).
STO
<address>
0000 0111
Store the contents of ACC at the given
address.
The following diagram shows the contents of a section of main memory and the Index Register (IX).
(a) Show the contents of the Accumulator (ACC) after each instruction is executed.
IX
(i)
[1]
0
[1]
LDI 355
ACC
Address
0
351
86
353
354
355
[1]
9608/12/M/J/17
351
356
358
1
Main
memory
contents
350
357
© UCLES 2017
0
352
LDX 351
ACC
(iv)
[1]
LDM #355
ACC
(iii)
0
LDD 355
ACC
(ii)
0
22
1
0
www.dynamicpapers.com
9
(b) Each machine code instruction is encoded as 16 bits (8-bit op code followed by an 8-bit
operand).
Write the machine code for these instructions:
LDM #67
LDX #7
[3]
(c) Computer scientists often write binary representations in hexadecimal.
(i)
0
Write the hexadecimal representation for the following instruction.
0
0
1
0
1
0
0
0
1
0
1
1
1
1
0
[2]
(ii)
A second instruction has been written in hexadecimal as:
16 4D
Write the assembly language for this instruction with the operand in denary.
[2]
© UCLES 2017
9608/12/M/J/17
[Turn over
10
6
www.dynamicpapers.com
Downloading a file from a website is an example of a client-server application.
(a) Describe what is meant by the term client-server for this application.
[2]
(b) The following sequence of steps (1 to 5) describes what happens when someone uses their
personal computer (PC) to request a web page. The web page consists of HTML tags and
text content only. Four of the statements from A, B, C, D, E and F are used to complete the
sequence.
A
Browser software interprets the script, renders the page and displays.
B
Browser software renders the page and displays.
C
Browser software compiles the script, renders the page and displays.
D
The web server retrieves the page.
E
The Domain Name Service (DNS) uses the domain name from the
browser to look up the IP address of the web server.
F
The web server sends the web page content to the browser.
Write one of the letters A to F in the appropriate row to complete the sequence.
1.
The user keys in the Uniform Resource Locator (URL) into the browser software.
2.
3.
4.
5.
© UCLES 2017
[4]
9608/12/M/J/17
11
www.dynamicpapers.com
Question 6(c) begins on the next page.
© UCLES 2017
9608/12/M/J/17
[Turn over
12
www.dynamicpapers.com
(c) The following web page used for data capture consists of:
•
•
two text boxes for the entry of:
° a race runner’s ID code
° their finishing position in a race.
a button that the user clicks to submit this runner’s result.
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
32
33
34
35
36
37
38
39
40
© UCLES 2017
<html>
<head>
<title>Untitled Document</title>
<script language="JavaScript">
function myButton_onmousedown()
{
var Output1 = "Runner ID OK";
var Output2 = "ERROR – entry refused";
var Runner ID = document.forms["form1"]["txtRunnerID"].value;
//
|| in Javascript is the 'OR' operator
if (RunnerID.substr(0,3) == "VAR" || RunnerID.substr(0,3) == "CAM")
{
alert(Output1)
}
else
{
alert(Output2)
}
}
</script>
</head>
<body>
<form name = form1>
<label>Runner ID: </label>
<input type="text" name="txtRunnerID" >
<label>Position: </label>
<input type="text" name="txtPosition" size = "5" >
<p>
<label>Save data: </label>
<input type="button" name="btnSubmit" Value = "Submit"
onMouseDown = "myButton_onmousedown()" >
</p>
</form>
</body>
</html>
9608/12/M/J/17
13
(i)
(ii)
www.dynamicpapers.com
The developer has used three variables in the JavaScript code. State the identifiers
used.
1.
2.
3.
[2]
The button has an event whose identifier is onMouseDown. When the mouse button is
clicked, some code is run.
State the line numbers which contain this code.
From line to line
(iii)
[1]
The JavaScript code uses a selection statement.
State the line number which contains its condition.
Line number:
(iv)
[1]
Describe the purpose of the validation check that the code performs.
[1]
(v)
Name and describe two other types of validation check which could be appropriate for
this data capture form.
Validation check:
Description
Validation check:
Description
[4]
© UCLES 2017
9608/12/M/J/17
14
BLANK PAGE
© UCLES 2017
9608/12/M/J/17
www.dynamicpapers.com
15
BLANK PAGE
© UCLES 2017
9608/12/M/J/17
www.dynamicpapers.com
16
www.dynamicpapers.com
BLANK PAGE
Permission to reproduce items where third-party owned material protected by copyright is included has been sought and cleared where possible. Every
reasonable effort has been made by the publisher (UCLES) to trace copyright holders, but if any items requiring clearance have unwittingly been included, the
publisher will be pleased to make amends at the earliest possible opportunity.
To avoid the issue of disclosure of answer-related information to candidates, all copyright acknowledgements are reproduced online in the Cambridge International
Examinations Copyright Acknowledgements Booklet. This is produced for each series of examinations and is freely available to download at www.cie.org.uk after
the live examination series.
Cambridge International Examinations is part of the Cambridge Assessment Group. Cambridge Assessment is the brand name of University of Cambridge Local
Examinations Syndicate (UCLES), which is itself a department of the University of Cambridge.
© UCLES 2017
9608/12/M/J/17