Computer Science (9608) · Oct/Nov 2018 · Question paper 12
Cambridge Computer Science (9608) question paper for paper 12, Oct/Nov 2018 — 9608/12/O/N/18, file 9608_w18_qp_12.pdf.
Text of this paper
www.dynamicpapers.com
Cambridge International Examinations
Cambridge International Advanced Subsidiary and Advanced Level
* 6 0 5 4 1 9 8 9 6 8 *
9608/12
COMPUTER SCIENCE
Paper 1 Theory Fundamentals
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 (NF/CGW) 144492/3
© UCLES 2018
[Turn over
www.dynamicpapers.com
2
1
A company is designing a website.
(a) The company creates a 4-colour bitmap image for the website as shown.
Each colour is represented by a letter, for example, G = grey, K = black.
(i)
G
R
G
K
W
R
G
R
G
K
W
R
G
R
G
K
W
R
G
R
G
K
W
R
G
G
G
K
K
R
W
W
W
W
K
R
State the minimum number of bits needed to represent each pixel in the image in part (a).
[1]
(ii)
Calculate the minimum file size of the image shown in part (a). Show your working.
Working
File size
[3]
(b) The company takes a photograph of their office to put on the website. The photograph has
a resolution of 1000 pixels by 1000 pixels. Two bytes per pixel are used to represent the
colours.
(i)
Estimate the file size of the photograph in megabytes. Show your working.
Working
Estimated file size
[4]
© UCLES 2018
9608/12/O/N/18
www.dynamicpapers.com
3
(ii)
The file size of the photograph needs to be reduced before it is placed on the website.
Draw lines to link each method of reducing the file size of the image to:
•
•
its description and
its compression type, where appropriate.
Description
Removes pixels
Reduces number of
pixels per inch
Uses fewer bits per
pixel
Stores colour code and
count of repetitions
Method
Compression type
Crop the
photograph
Use run-length
encoding
Use fewer
colours
Lossy
Lossless
[5]
(c) The company has created a logo for the website. The logo is a vector graphic.
Describe two reasons why a vector graphic is a sensible choice for the logo.
Reason 1
Reason 2
[4]
© UCLES 2018
9608/12/O/N/18
[Turn over
4
2
www.dynamicpapers.com
Gopal types the Uniform Resource Locator (URL) of a website into a web browser.
(a) The following sequence (1 to 5) describes the steps that take place. There are three missing
statements.
1
Gopal types into the web browser.
2
3
DNS looks up the URL in table
4
5
Three statements A, B and C are used to complete the sequence.
A
DNS finds corresponding IP address
B
Web browser sends URL to Domain Name Service (DNS)
C
DNS returns IP address to web browser
Write one of the letters A to C in the appropriate rows (2, 4 and 5) to complete the sequence.
[2]
(b) Describe the purpose of an IP address.
[2]
(c) A telecommunications operator has installed fibre-optic cables in Gopal’s neighbourhood.
(i)
Give three benefits of fibre-optic cable over copper cable.
1
2
3
[3]
© UCLES 2018
9608/12/O/N/18
5
(ii)
www.dynamicpapers.com
Give two drawbacks of fibre-optic cable over copper cable.
1
2
[2]
© UCLES 2018
9608/12/O/N/18
[Turn over
6
3
www.dynamicpapers.com
The following table shows assembly language instructions for a processor which has one general
purpose register, the Accumulator (ACC) and an Index Register (IX).
Instruction
Op code
Operand
LDD
<address>
LDX
<address>
LDR
STO
ADD
INC
DEC
CMP
JPE
JPN
JMP
#n
<address>
<address>
<register>
<register>
<address>
<address>
<address>
<address>
OUT
Explanation
Direct addressing. Load the contents of the location at the given address to
ACC.
Indexed addressing. Form the address from <address> + the contents of the
Index Register. Copy the contents of this calculated address to ACC.
Immediate addressing. Load the number n to IX.
Store contents of ACC at the given address.
Add the contents of the given address to ACC.
Add 1 to the contents of the register (ACC or IX).
Subtract 1 from the contents of the register (ACC or IX).
Compare contents of ACC with contents of <address>.
Following compare instruction, jump to <address> if the compare was True.
Following compare instruction, jump to <address> if the compare was False.
Jump to the given address.
Output to the screen the character whose ASCII value is stored in ACC.
Return control to the operating system.
END
(a) (i)
State what is meant by absolute addressing and symbolic addressing.
Absolute addressing
Symbolic addressing
[2]
(ii)
Give an example of an ADD instruction using both absolute addressing and symbolic
addressing.
Absolute addressing
Symbolic addressing
[2]
© UCLES 2018
9608/12/O/N/18
www.dynamicpapers.com
7
(b) (i)
State what is meant by indexed addressing and immediate addressing.
Indexed addressing
Immediate addressing
[2]
(ii)
Give an example of an instruction that uses:
Indexed addressing
Immediate addressing
[2]
(c) The current contents of a general purpose register (X) are:
X
(i)
1
1
0
0
0
0
0
1
The contents of X represent an unsigned binary integer.
Convert the value in X into denary.
[1]
(ii)
The contents of X represent an unsigned binary integer.
Convert the value in X into hexadecimal.
[1]
(iii)
The contents of X represent a two’s complement binary integer.
Convert the value in X into denary.
[1]
© UCLES 2018
9608/12/O/N/18
[Turn over
www.dynamicpapers.com
8
(d) The current contents of the main memory, Index Register (IX) and selected values from the
ASCII character set are:
Address
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
Instruction
LDD 100
CMP 104
JPE 54
LDX 100
CMP 105
JPN 47
OUT
LDD 100
DEC ACC
STO 100
INC IX
JMP 41
ASCII code table (selected codes only)
ASCII code
300
301
302
303
304
305
Character
/
*
+
^
=
END
…
100
101
102
103
104
105
IX
2
302
303
303
0
303
1
This is a copy of the instruction set.
Instruction
Op code
Operand
LDD
<address>
LDX
<address>
LDR
STO
ADD
INC
DEC
CMP
JPE
JPN
JMP
#n
<address>
<address>
<register>
<register>
<address>
<address>
<address>
<address>
OUT
END
© UCLES 2018
Explanation
Direct addressing. Load the contents of the location at the given address to
ACC.
Indexed addressing. Form the address from <address> + the contents of the
Index Register. Copy the contents of this calculated address to ACC.
Immediate addressing. Load the number n to IX.
Store contents of ACC at the given address.
Add the contents of the given address to ACC.
Add 1 to the contents of the register (ACC or IX).
Subtract 1 from the contents of the register (ACC or IX).
Compare contents of ACC with contents of <address>.
Following a compare instruction, jump to <address> if the compare was True.
Following a compare instruction, jump to <address> if the compare was False.
Jump to the given address.
Output to the screen the character whose ASCII value is stored in ACC.
Return control to the operating system.
9608/12/O/N/18
www.dynamicpapers.com
9
Complete the trace table for the given assembly language program.
Instruction
address
ACC
Memory address
100
101
102
103
104
105
2
302
303
303
0
303
IX
OUTPUT
1
40
[7]
© UCLES 2018
9608/12/O/N/18
[Turn over
www.dynamicpapers.com
10
4
A student has written the steps of the fetch stage of the fetch-execute (FE) cycle in register transfer
notation. The student has made some errors.
[PC]
Line 1
MDR
Line 2
PC
Line 3
MDR
[MAR]
Line 4
CIR
PC
PC + 1
(a) Identify the line numbers of three errors that the student has made. Write the correct notation
for each error.
Line number of error
Correct notation
[3]
(b) One stage of the FE cycle includes checking for interrupts.
(i)
Give three different events that can generate an interrupt.
1
2
3
[3]
(ii)
Explain how interrupts are handled during the fetch-execute cycle.
[5]
© UCLES 2018
9608/12/O/N/18
11
www.dynamicpapers.com
(c) The processor uses buses in the FE cycle.
The diagram shows three buses and two descriptions.
Draw one line from each bus to its appropriate description.
Bus
Description
Control bus
Unidirectional
(one direction)
Address bus
Bidirectional
(two directions)
Data bus
[2]
5
This question presents three scenarios. For each scenario, tick (✓) one box to show whether you
think the person’s behaviour is ethical or unethical. Justify your choice.
(a) Wendy is a software engineer who is developing a program for her company. Her friend,
Noah, is developing a program for a different company. Wendy looks at the code that Noah is
writing to get ideas for her own program.
Ethical
Unethical
Justification
[2]
© UCLES 2018
9608/12/O/N/18
[Turn over
12
www.dynamicpapers.com
(b) Amit is fixing some bugs in the computer system of a large multinational company. He is
asked to sign a confidentiality agreement. He sees some confidential information which
contains the names of other multinational companies that have broken the law. He copies this
information and releases it on the Internet.
Ethical
Unethical
Justification
[2]
(c) Farah is providing a company with an estimate for the cost of writing a program. The company
she works for is in financial difficulty so she increases the estimate by 10%.
Ethical
Unethical
Justification
[2]
6
Kim is using her laptop computer to write a program in a high-level language.
(a) Kim needs to make sure the program is secure against unauthorised access. She has already
set up a username and password on her laptop.
Identify two additional electronic measures that Kim can use to keep the program secure.
1
2
[2]
(b) Kim will use library routines in her program.
(i)
Describe what is meant by a library routine.
[2]
© UCLES 2018
9608/12/O/N/18
13
(ii)
www.dynamicpapers.com
Describe one benefit and one drawback of using library routines.
Benefit
Drawback
[4]
(c) Kim develops her program and makes it ready for use. To do this, she uses first an interpreter
and then a compiler.
Explain why Kim needs to use both an interpreter and a compiler.
Interpreter
Compiler
[4]
© UCLES 2018
9608/12/O/N/18
14
BLANK PAGE
© UCLES 2018
9608/12/O/N/18
www.dynamicpapers.com
15
BLANK PAGE
© UCLES 2018
9608/12/O/N/18
www.dynamicpapers.com
16
www.dynamicpapers.com
BLANK PAGE
Permission to reproduce items where third-party owned material protected by copyright is included has been sought and cleared where possible. Every
reasonable effort has been made by the publisher (UCLES) to trace copyright holders, but if any items requiring clearance have unwittingly been included, the
publisher will be pleased to make amends at the earliest possible opportunity.
To avoid the issue of disclosure of answer-related information to candidates, all copyright acknowledgements are reproduced online in the Cambridge International
Examinations Copyright Acknowledgements Booklet. This is produced for each series of examinations and is freely available to download at www.cie.org.uk after
the live examination series.
Cambridge International Examinations is part of the Cambridge Assessment Group. Cambridge Assessment is the brand name of University of Cambridge Local
Examinations Syndicate (UCLES), which is itself a department of the University of Cambridge.
© UCLES 2018
9608/12/O/N/18