Past paper – A Level Computer Science (old syllabus, to 2021) (9608)
Cambridge International AS & A Level · 9608
Computer Science (old syllabus, to 2021) · Paper 12
Oct/Nov 2018 · 9608/12/O/N/18
Answer on paper, open each mark scheme and give yourself marks, then open the Summary.
Question text
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.
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
(i)
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]
(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
Method
Compression type
Removes pixels
Crop the
photograph
Reduces number of
Lossy
pixels per inch
Use run-length
encoding
Uses fewer bits per
Lossless
pixel
Use fewer
colours
Stores colour code and
count of repetitions
[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 …
…
…
…
Question text
2
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]
(ii)
Give two drawbacks of fibre-optic cable over copper cable.
1 …
…
2 …
…
[2]
Question text
3
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
Explanation
Op code
Operand
Direct addressing. Load the contents of the location at the given address to
LDD
<address>
ACC.
Indexed addressing. Form the address from <address> + the contents of the
LDX
<address>
Index Register. Copy the contents of this calculated address to ACC.
Immediate addressing. Load the number n to IX.
LDR
#n
Store contents of ACC at the given address.
STO
<address>
Add the contents of the given address to ACC.
ADD
<address>
Add 1 to the contents of the register (ACC or IX).
INC
<register>
Subtract 1 from the contents of the register (ACC or IX).
DEC
<register>
Compare contents of ACC with contents of <address>.
CMP
<address>
Following compare instruction, jump to <address> if the compare was True.
JPE
<address>
Following compare instruction, jump to <address> if the compare was False.
JPN
<address>
JMP
<address>
Jump to the given address.
OUT
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]
(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
1
1
0
0
0
0
0
1
(i)
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]
(d) The current contents of the main memory, Index Register (IX) and selected values from the
ASCI
Question text
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
PC + 1
Line 2
PC
[MAR]
Line 3
MDR
PC
Line 4
CIR
(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]
(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]
Question text
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]
(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]
Question text
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]
(ii)
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]
Permission to reproduce items where third-party owned material protected by copyright is included has been sought and cleared where possible. Every
publ