h446 01 Computer Systems
h446 01 Computer Systems
h446 01 Computer Systems
Do not use:
• a calculator
* H 4 4 6 0 1 *
First name
Last name
Centre Candidate
number number
INSTRUCTIONS
• Use black ink.
• Complete the boxes above with your name, centre number and candidate number.
• Answer all the questions.
• Write your answer to each question in the space provided. Additional paper may be
used if required but you must clearly show your candidate number, centre number and
question number(s).
• Do not write in the barcodes.
INFORMATION
• The total mark for this paper is 140.
• The marks for each question are shown in brackets [ ].
• Quality of extended responses will be assessed in questions marked with an
asterisk (*).
• This document consists of 28 pages.
(a) The firm uses high end computers with high performance CPUs, GPUs and large amounts of
RAM.
(i) Give one use the firm might have for GPUs.
...........................................................................................................................................
...................................................................................................................................... [1]
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...................................................................................................................................... [2]
...................................................................................................................................... [1]
(i) State the name of and describe two methods that the operating system can use to divide
the contents of RAM.
Method 1
Name .................................................................................................................................
Description ........................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
Method 2
Name .................................................................................................................................
Description ........................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
[4]
© OCR 2017
3
(ii) Explain, giving an example, why the firm’s computers use operating systems capable of
multi-tasking.
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...................................................................................................................................... [2]
(c) The computers in the office are connected to a LAN which is connected to the Internet.
Give one advantage and one disadvantage to the architects’ firm of a client-server set
up rather than a peer to peer setup.
Advantage .........................................................................................................................
...........................................................................................................................................
Disadvantage ....................................................................................................................
...........................................................................................................................................
[2]
(ii) The LAN is connected to the Internet via a firewall. Describe the term ‘firewall’.
...........................................................................................................................................
...........................................................................................................................................
...................................................................................................................................... [1]
...........................................................................................................................................
...................................................................................................................................... [1]
(a) A linked list stores the names of cities on a coach tour in the order they are visited.
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...................................................................................................................................... [3]
(ii) The tour is amended. The new itinerary is: London, Oxford, Manchester then York.
Explain how Birmingham is removed from the linked list and how York is added. You may
use the diagram below to illustrate your answer.
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...................................................................................................................................... [4]
© OCR 2017
5
The program stores records about its customers.
(b) Often an individual customer’s record needs to be accessed. This is done by searching using
the Customer ID. Explain why a hash table is better suited than a linked list to store the
customer records, particularly as the company acquires more customers.
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
.............................................................................................................................................. [4]
(a) The organisation decides to make a copy of Shakespeare’s entire works available as a
downloadable text file from its website. It further decides to compress the file before making it
available to download.
(i) State an advantage to the website’s visitors of the file being compressed.
...........................................................................................................................................
...........................................................................................................................................
...................................................................................................................................... [1]
(ii) Explain why the company should use lossless and not lossy compression.
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...................................................................................................................................... [3]
(b)* The organisation looks at using either run length encoding or dictionary encoding to compress
the file described in part (a).
Discuss the two compression methods and justify which you would recommend. You may
refer to the extract of text below to illustrate your argument.
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
© OCR 2017
7
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
Let:
A be Customer is under 18
C be Customer is over 60
D be Customer has ID
Q≡ .......................................................................................................................
[3]
(b) The cinema has a voucher which promises free popcorn when the voucher is produced whilst
buying a soft drink or bottle of water.
Let:
E be Voucher is shown
R ≡ (E/F) 0 (E/G)
© OCR 2017
9
(i) Complete the truth table below.
(E/F) 0 (E/G)
...........................................................................................................................................
...................................................................................................................................... [2]
Most films are now distributed to cinemas digitally. A studio allows cinemas to download its latest
film 5 days before the release date via a private download. It wants to ensure that no cinema
shows it before the release date.
(c) Describe one technical measure the studio could use to ensure that films are not shown
early.
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
.............................................................................................................................................. [2]
ten DAT 10
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...................................................................................................................................... [3]
(ii) Complete the table below determining whether the program branches to pass or fail
given the following values in the Accumulator when it is run.
© OCR 2017
11
(b) The complete program is shown below:
INP
main STA entry
BRA test
fail LDA entry
ADD one
BRA main
entry DAT
ten DAT 10
one DAT 1
(i) Give one instruction in the program that when executed, changes the value in the
Accumulator.
...........................................................................................................................................
...................................................................................................................................... [1]
(ii) Give one instruction in the program that when executed, changes the value in the Program
Counter.
...........................................................................................................................................
...................................................................................................................................... [1]
(iii) State the value the code outputs for the input 18.
...........................................................................................................................................
...................................................................................................................................... [1]
(iv) State the value the code outputs for the input 37.
...........................................................................................................................................
...................................................................................................................................... [1]
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...................................................................................................................................... [2]
© OCR 2017 Turn over
12
6 (a) (i) Convert the denary number 188 to an unsigned 8-bit binary number.
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...................................................................................................................................... [1]
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...................................................................................................................................... [1]
(b) (i) Convert the denary number −44 to an 8-bit binary number with sign and magnitude
representation.
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...................................................................................................................................... [1]
(ii) Convert the denary number −44 to an 8-bit binary number with two’s complement
representation.
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...................................................................................................................................... [1]
(c) Explain how, using bit shift, the unsigned binary number 00101100 can be divided by 4.
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
.............................................................................................................................................. [2]
© OCR 2017
13
(d) Demonstrate subtraction on the two numbers below, both stored in normalised floating point
format, using 6 bits for their mantissa and 4 for their exponent. Show the result in the same
format. Show your working.
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
.............................................................................................................................................. [6]
(a) The forum stores details of its users in the table called Users. An extract of Users is shown
below.
Describe what is meant by the term ‘primary key’, giving an example from the table above.
...................................................................................................................................................
.............................................................................................................................................. [2]
(b) The user’s password is passed to a function that generates a hash and the result is stored in
passwordHash.
...........................................................................................................................................
...........................................................................................................................................
...................................................................................................................................... [1]
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...................................................................................................................................... [2]
© OCR 2017
15
(c) Write an SQL statement to get just the passwordHash and locked values of the user
Apollo.
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
.............................................................................................................................................. [3]
(d) Sometimes users can have their accounts locked if they behave inappropriately. When this is
the case the locked field is set to 1 rather than 0.
Write an SQL statement that locks the account of the user Hades
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
.............................................................................................................................................. [3]
passwordHash and locked have already been extracted from the database before being
passed to the function. It should return the value true if a user should be allowed access to
a system and false if they aren’t.
Your function should make use of the pre-written function hash() which takes in a string and
returns the hash of that string.
e.g.
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
endfunction
[4]
© OCR 2017
17
8* “Developments in Artificial Intelligence mean that in twenty years time most people will be
unemployed.”
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..................................................................................................................................................... [9]
<html>
<head>
<title>Boris' Cake Shop</title>
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
<h1>Boris' Cake Shop</h1>
<p id="intro">
Welcome to Boris' cake shop.
<script>
var hour = new Date().getHours();//gets the hour value of the
current time
if(hour>9 && hour<17)
{
document.write("We are currently open.");
}
else
{
document.write("We are closed, come visit us when we are
open (09:00 - 17:00).");
}
</script>
</p>
<div class="customerQuote">
Boris makes the best cupcakes I have ever tasted.
</div>
</body>
</html>
(a) Explain the difference between a HTML id attribute and a HTML class attribute.
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
.............................................................................................................................................. [2]
© OCR 2017
19
(b) The html file is linked to the CSS file style.css
The introduction text should be dark red (using the named colour darkRed).
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
.............................................................................................................................................. [6]
(c) The code between the script tags is supposed to display a different message during the
shop’s opening hours of 09:00 and 17:00.
(i) State the name of the language used between the script tags.
...................................................................................................................................... [1]
Some users have reported that there is a bug and the site says the shop is closed when they
log on between 9 and 10 in the morning.
...........................................................................................................................................
...................................................................................................................................... [1]
(iii) Give one disadvantage of this code being run client side rather than server side.
...........................................................................................................................................
...................................................................................................................................... [1]
© OCR 2017 Turn over
20
10 A software development team is writing a word game.
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
.............................................................................................................................................. [4]
Players are given 10 random letters and asked to find the largest word they can make from those
letters. Each letter can only be used once. The length of the word determines the number of points
awarded. e.g. a word with 6 letters would mean 6 points are awarded.
The function validateAnswer takes in the randomLetters as an array of letters and the
player’s answer as a string. It then checks if the word the player has entered only contains letters
from the 10 random letters with each letter being used only once. (At this stage the program
doesn’t check if the answer provided is an actual word.) It then returns a score, out of 10, for a
valid word or 0 for an invalid word.
Example
OPXCMURETN
Whereas
And
The word RETURN returns 0 (there is only one R in the random letters).
© OCR 2017
21
(b) Complete the function validateAnswer
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
endFunction
[6]
(c) Code is to be added to check if the word is an actual English word. All English words are
stored in a binary search tree.
Give one advantage of storing the words in a binary search tree over an array.
.............................................................................................................................................. [1]
1 ........................................................................................................................................
...........................................................................................................................................
2 ........................................................................................................................................
...........................................................................................................................................
[2]
© OCR 2017
23
(ii)* The program is compiled. Explain the process of compilation including how code from
the library becomes part of the finished program, justifying why each stage is necessary.
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...................................................................................................................................... [9]
A B Sum Carry
1 1 0 1
1 0 1 0
0 1 1 0
0 0 0 0
[3]
© OCR 2017
25
(b) Draw the logic gates represented by the Karnaugh Map below. Show your working.
AB
00 01 11 10
00 1 1 0 0
CD 01 1 1 0 0
11 0 0 1 1
10 0 0 1 1
[4]
© OCR 2017
26
BLANK PAGE
© OCR 2017
27
BLANK PAGE
© OCR 2017
28
© OCR 2017