Oxford Cambridge and Rsa Examinations: © OCR 2022 (601/4911/5) DC (ST) 318444/1
Oxford Cambridge and Rsa Examinations: © OCR 2022 (601/4911/5) DC (ST) 318444/1
INFORMATION
The total mark for this paper is 140.
The marks for each question are shown in
brackets [ ].
Quality of extended response will be
assessed in questions marked with an
asterisk (*).
ADVICE
Read each question carefully before you
start your answer.
2
BLANK PAGE
3
Answer ALL questions.
____________________________
____________________________
____________________________
_________________________ [2]
4
(ii) Give ONE way that the Harvard
architecture differs from the Von
Neumann architecture.
____________________________
_________________________ [1]
1 _____________________________
_______________________________
2 _____________________________
_______________________________
[2]
5
(c) FIG. 1 shows assembly code written
using the Little Man Computer
(LMC). The program calculates
and outputs the total amount that
is donated to the charity in any
particular day. Depending on the
amount, an additional bonus may be
added to each amount donated.
6
FIG. 1
start INP
STA donation
SUB hundred
BRP bonus
nobonus LDA total
ADD donation
STA total
OUT
BRA start
bonus LDA total
ADD donation
ADD twenty
STA total
OUT
BRA start
hundred DAT 100
twenty DAT 20
donation DAT 0
total DAT 0
7
(i) The program shown in FIG. 1 is
run ONCE using THREE different
inputs. Therefore, while the
program is running once, it will
output the updated total three
times.
8
(ii) Write LMC code that will reset
the value of the memory location
labelled total to zero and then
stop the program.
____________________________
____________________________
____________________________
____________________________
____________________________
____________________________
____________________________
_________________________ [4]
9
(iii) This program is run on a
processor that allows pipelining.
____________________________
____________________________
____________________________
____________________________
____________________________
_________________________ [3]
____________________________
____________________________
____________________________
_________________________ [2]
10
(d) The processor contains registers
including the accumulator and the
program counter. The contents of
these registers are modified during
the Fetch-Decode-Execute cycle.
____________________________
____________________________
____________________________
_________________________ [2]
____________________________
____________________________
____________________________
_________________________ [2]
11
(iii) State the name of THREE other
registers that are used during
the Fetch-Decode-Execute cycle.
1 __________________________
____________________________
2 __________________________
____________________________
3 __________________________
____________________________
[3]
_______________________________
_______________________________
_______________________________
_______________________________
_______________________________
_______________________________
_______________________________
_______________________________
_______________________________
_______________________________
13
_______________________________
_______________________________
_______________________________
_______________________________
_______________________________
_______________________________
_______________________________
_______________________________
_______________________________
_______________________________
_______________________________
_______________________________
_______________________________
_______________________________
14
_______________________________
_______________________________
_______________________________
_______________________________
_______________________________
_______________________________
_______________________________
_______________________________
_______________________________
_______________________________
_______________________________
_______________________________
_______________________________
_______________________________
15
_______________________________
_______________________________
_______________________________
_______________________________
_______________________________
_______________________________
_______________________________
_______________________________
_______________________________
_______________________________
_______________________________
16
BLANK PAGE
17
2 A video streaming service uses a
relational database. An extract of the
data from two tables from this database
is shown in FIG. 2.
____________________________
_________________________ [1]
____________________________
____________________________
[2]
18
FIG. 2
19
Membership
____________________________
_________________________ [1]
____________________________
_________________________ [1]
20
(b) The Adverts field indicates if
customers will be shown adverts.
true indicates that customers
will be shown adverts, and false
indicates that adverts are not shown.
Method _____________________
____________________________
Suitability __________________
____________________________
____________________________
____________________________
[3]
22
(ii) Sometimes the company may
need to move or backup its data
they hold about customers.
1 __________________________
____________________________
2 __________________________
____________________________
[2]
23
(d) The database supports ACID
transactions. ACID stands for
Atomicity, Consistency, Isolation
and Durability.
____________________________
____________________________
____________________________
_________________________ [2]
____________________________
_________________________ [1]
24
(iii) Explain how record locking can
be used to ensure that the ACID
principle of isolation is achieved
when carrying out multiple
transactions.
____________________________
____________________________
____________________________
____________________________
____________________________
_________________________ [3]
____________________________
_________________________ [1]
25
(e) The Copyright Designs and Patents
Act 1988 applies to all videos that
are streamed.
_______________________________
_______________________________
_______________________________
____________________________ [2]
26
(f) All videos that are streamed are
compressed. Customers have the
option to choose from watching the
videos with lossy compression or
lossless compression.
_______________________________
_______________________________
_______________________________
_______________________________
_______________________________
_______________________________
_______________________________
_______________________________
_______________________________
____________________________ [5]
27
(g) A program is written using an
object-oriented programming
paradigm and uses a class called
video to organise the videos that
are streamed to customers.
name
number of views
star rating.
28
(i) Write program code or
pseudocode to declare the class
video and initialise the required
attributes as private.
____________________________
____________________________
____________________________
____________________________
____________________________
____________________________
____________________________
____________________________
____________________________
29
____________________________
____________________________
____________________________
____________________________
____________________________
____________________________
____________________________
____________________________
_________________________ [2]
30
3 (a) (i) Convert the hexadecimal value
B7E to a binary number.
____________________________
_________________________ [1]
____________________________
_________________________ [1]
31
(iii) Complete this binary
subtraction. Both numbers are
8-bit integer values represented
using two’s complement.
0110 1101 –
0011 0100
____________________________
____________________________
____________________________
____________________________
____________________________
_________________________ [3]
32
(b) The normalised floating point
number 1010 1110 is stored using
4 bits for the mantissa and 4 bits
for the exponent, both in two’s
complement.
_______________________________
_______________________________
_______________________________
_______________________________
_______________________________
_______________________________
_______________________________
____________________________ [4]
33
(c) TABLE 3 here shows floating point
numbers that are stored using 6
bits for the mantissa and 3 bits
for the exponent, both in two’s
complement.
TABLE 3
Binary Not
Normalised
number normalised
010101 100
110101 111
011010 010
101010 110
34
4* Amit is studying Computer Science at
university. He has been asked to write
an assignment on Artificial Intelligence
(AI).
the meaning of AI
examples of when AI may be affected
by bias
the measures that can be taken to
prevent people being affected by bias
in AI.
__________________________________
__________________________________
__________________________________
__________________________________
35
__________________________________
__________________________________
__________________________________
__________________________________
__________________________________
__________________________________
__________________________________
__________________________________
__________________________________
__________________________________
__________________________________
__________________________________
__________________________________
__________________________________
36
__________________________________
__________________________________
__________________________________
__________________________________
__________________________________
__________________________________
__________________________________
__________________________________
__________________________________
__________________________________
__________________________________
__________________________________
__________________________________
__________________________________
37
__________________________________
__________________________________
__________________________________
__________________________________
__________________________________
__________________________________
38
BLANK PAGE
39
5 A programmer creates this function
shown in FIG. 5 using a high-level
language.
FIG. 5
function mystery(x,y)
total = x + y
x = x – 10
y = y – 10
total = total + x + y
endwhile
return total
endfunction
40
(a) (i) State the value output by the line
print(mystery(10,20))
____________________________
_________________________ [1]
____________________________
_________________________ [1]
____________________________
_________________________ [1]
41
(b) Before the code in FIG. 5 can be
executed, a translator must be used.
____________________________
_________________________ [1]
Difference 1 _________________
____________________________
____________________________
____________________________
Difference 2 _________________
____________________________
____________________________
____________________________
[4]
42
(c) For each statement shown in
TABLE 5, tick (3) ONE box in each
row to indicate which stage of
compilation each action takes place
at. [5]
TABLE 5
Lexical Syntax Code
analysis analysis generation
Comments
and
whitespace
are removed
Keywords
are replaced
with tokens
Object code
is created
Symbol
table
created for
variables
Builds an
abstract
syntax tree
43
(d) Describe the purpose of code
optimisation.
_______________________________
_______________________________
_______________________________
____________________________ [2]
44
function countCapitals(text)
// initialise counter to 0
capCount = 0
// loop through each character in the string
passed in
for x = 0 to text.length-1
c = text.subString(x, 1)
45
// check if character is a capital
if asc(c) >= 65 ………………………………………………………
// if so, increment counter
………………………………………………………
endif
next x
………………………………………………………
endfunction
(ii) Give ONE similarity between
ASCII and Unicode.
____________________________
_________________________ [1]
Difference 1 _________________
____________________________
Difference 2 _________________
____________________________
[2]
46
(f)* The programmer has been asked
by a client to create a complex
computer program. Compare the
spiral model and waterfall lifecycle
methodologies for this task. [9]
_______________________________
_______________________________
_______________________________
_______________________________
_______________________________
_______________________________
47
_______________________________
_______________________________
_______________________________
_______________________________
_______________________________
_______________________________
_______________________________
_______________________________
_______________________________
_______________________________
_______________________________
_______________________________
_______________________________
_______________________________
_______________________________
48
_______________________________
_______________________________
_______________________________
_______________________________
_______________________________
_______________________________
_______________________________
_______________________________
_______________________________
_______________________________
_______________________________
_______________________________
_______________________________
_______________________________
_______________________________
49
6 Anika’s computer runs a multi-tasking
operating system. She has access
to a printer and a broadband internet
connection through a wireless
connection. The operating system uses
scheduling algorithms such as first
come first served and round-robin.
____________________________
____________________________
____________________________
_________________________ [2]
50
(ii) Explain why the computer’s
operating system uses a
round-robin algorithm for
allocating processor time.
____________________________
____________________________
____________________________
____________________________
____________________________
_________________________ [3]
____________________________
____________________________
____________________________
_________________________ [2]
51
(b) Anika uses an encrypted messaging
program to communicate with her
friends. The computer uses the
TCP/IP stack.
____________________________
____________________________
____________________________
____________________________
____________________________
____________________________
____________________________
____________________________
____________________________
_________________________ [5]
52
(ii) Explain what happens at the
link layer (sometimes referred
to as the “network interface
layer”, “network access layer”
or simply the “network layer”) of
the TCP/IP stack when using this
program.
____________________________
____________________________
____________________________
_________________________ [2]
53
ADDITIONAL ANSWER SPACE
_____________________________________
_____________________________________
_____________________________________
_____________________________________
_____________________________________
_____________________________________
_____________________________________
_____________________________________
_____________________________________
_____________________________________
_____________________________________
54
_____________________________________
_____________________________________
_____________________________________
_____________________________________
_____________________________________
_____________________________________
_____________________________________
_____________________________________
_____________________________________
_____________________________________
_____________________________________
_____________________________________
_____________________________________
_____________________________________
55
_____________________________________
_____________________________________
_____________________________________
_____________________________________
_____________________________________
_____________________________________
_____________________________________
_____________________________________
_____________________________________
_____________________________________
_____________________________________
_____________________________________
_____________________________________
_____________________________________
56
_____________________________________
_____________________________________
_____________________________________
_____________________________________
_____________________________________
_____________________________________
_____________________________________
_____________________________________
_____________________________________
_____________________________________
_____________________________________
_____________________________________
_____________________________________
_____________________________________
57
_____________________________________
_____________________________________
_____________________________________
_____________________________________
_____________________________________
_____________________________________
_____________________________________
_____________________________________
_____________________________________
_____________________________________
_____________________________________
_____________________________________
_____________________________________
_____________________________________
58
_____________________________________
_____________________________________
_____________________________________
_____________________________________
_____________________________________
_____________________________________
_____________________________________
_____________________________________
_____________________________________
_____________________________________
_____________________________________
_____________________________________
_____________________________________
_____________________________________
59
_____________________________________
_____________________________________
_____________________________________
_____________________________________
_____________________________________
_____________________________________
_____________________________________
_____________________________________
Copyright Information
OCR is committed to seeking permission to reproduce all third-party
content that it uses in its assessment materials. OCR has attempted
to identify and contact all copyright holders whose work is used in this
paper. To avoid the issue of disclosure of answer-related information to
candidates, all copyright acknowledgements are reproduced in the OCR
Copyright Acknowledgements Booklet. This is produced for each series of
examinations and is freely available to download from our public website
(www.ocr.org.uk) after the live examination series.
If OCR has unwittingly failed to correctly acknowledge or clear any
third-party content in this assessment material, OCR will be happy to correct
its mistake at the earliest possible opportunity.
For queries or further information please contact The OCR Copyright Team,
The Triangle Building, Shaftesbury Road, Cambridge CB2 8EA.
OCR is part of Cambridge University Press & Assessment, which is itself a
department of the University of Cambridge.
60