Computer Science Topic 1.4 Questions
Computer Science Topic 1.4 Questions
Topic Questions
This document is to help consolidate knowledge and review topics after learning the
content. A time has been given if you want to time yourself you don’t need to and you
should do at your own pace if you wish. The time adds roughly 10 minutes extra just like
the exam. Aim for a mark a minute if doing this timed.
Some Questions may overlap with other topics. If you don’t know the
knowledge for that overlap question or cannot be asked just skip it.
I don’t have OCR ExamBuilder so I cannot do much about overlap questions
(same applies with the mark scheme at the end of the document)
Not all topics can be covered given the timeframe of papers I have used so it is still up to
you to go through the specification and practice content from the other papers.
2017 Questions 4
2 A coach company offers tours of the UK.
(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]
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]
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...................................................................................................................................... [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 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
2018 Questions 15
7 A taxi firm is investigating replacing its drivers with self-driving cars.
(a) Explain why the self-driving system will use a real-time operating system.
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
.............................................................................................................................................. [3]
endclass
(i) Write a line of code to create an object called bollard of type Obstacle which is not
moving and is 7.8 metres away in a direction of 8 degrees.
...........................................................................................................................................
...................................................................................................................................... [2]
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...................................................................................................................................... [2]
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...................................................................................................................................... [2]
© OCR 2018
17
(c) The self-driving program recognises people as a special type of obstacle and the class
Person should inherit the methods and attributes of Obstacle. People are treated like other
obstacles except:
• when the updateDistance method is called, if the person is more than 2 metres away
but is 5 metres (or less) away, the method Controls.beepHorn() is called.
• when the person is 2 metres away (or closer), the method Controls.applyBrakes()
is called as well as Controls.beepHorn().
....................................................................................................
....................................................................................................
....................................................................................................
....................................................................................................
....................................................................................................
....................................................................................................
....................................................................................................
....................................................................................................
....................................................................................................
....................................................................................................
....................................................................................................
distance=givenDistance
endprocedure
endclass [5]
(d) Give one advantage and one disadvantage to the customers of the taxi using self-driving
cars rather than drivers.
Advantage
...................................................................................................................................................
...................................................................................................................................................
Disadvantage
...................................................................................................................................................
...................................................................................................................................................
[2]
© OCR 2018 Turn over
22
9 (a) Demonstrate how the bytes below are added together. Show your working.
01101010
00111111+
[2]
(b) Demonstrate how the bottom byte below is subtracted from the top byte. Show your working.
11001111
00111001 -
[2]
0011011100001111
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
.............................................................................................................................................. [2]
(d) The number below is represented in floating point format with a 5-bit mantissa in two’s
complement followed by a 3-bit exponent in two’s complement. Calculate the denary value of
the number, showing your working.
01001 010
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
.............................................................................................................................................. [3]
© OCR 2018
23
(e) The numbers below are represented in floating point format with a 5-bit mantissa in two’s
complement followed by a 4-bit exponent in two’s complement. Normalise the numbers
shown below, showing your working.
00011 0010
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
.............................................................................................................................................. [2]
11100 0110
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
.............................................................................................................................................. [2]
(f) Show the byte below after having an AND applied with the masking byte.
Byte 1 0 1 1 1 0 0 1
AND 1 1 1 1 1 1 1 1
Result
[1]
(g) Show the byte below after having an OR applied with the masking byte.
Byte 1 0 1 1 1 0 0 1
OR 1 1 1 1 1 1 1 1
Result
[1]
Q ≡ ¬A0B
[2]
(b) Find the Boolean expression represented in the Karnaugh Map below. Show your working.
AB
00 01 11 10
00 1 1 1 1
CD 01 0 0 1 1
11 0 0 0 1
10 0 0 0 1
[5]
© OCR 2018
2019 Questions 10
5 A programmer is writing software for a firewall. She is writing code so that it keeps a track of
websites that users are permitted to visit. The software stores the websites’ addresses along with
details about who can view them and when.
So a website which is available to users of access level 2 and above, all the time, would have the
details [2, true] stored.
A website accessible to users of access level 3 and above, only outside of work hours, would have
the details [3, false] stored.
(a) State the name of a data structure that could be used to store a single site’s details.
...................................................................................................................................................
.............................................................................................................................................. [1]
The address of each website, along with the relevant details, are stored in a hash table.
The hash table’s hash function is carried out on the website’s address (which acts as the key).
The hash function works in the following way:
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90
Step 1:
ocr.org.uk
Step 2:
ocr
Step 3:
OCR
Step 4:
79+67+82 = 228
...................................................................................................................................................
.............................................................................................................................................. [1]
(c) Complete the function hash which takes in a string and returns the hashed value.
You can assume you have access to the following three functions.
• asc() – this takes in a character and returns its ASCII value. For example asc("A")
returns 65.
• locate() – this takes in a string and character and returns the location of the first
instance of the character (with the string starting at character 0). For example
locate("electricity","c") returns 3.
• upper() – this takes in a string and returns the UPPERCASE version. For example
upper("hello") returns "HELLO".
You should also assume that all given website names use letters but no numbers or symbols.
function hash(siteName)
endfunction
[5]
(d) Explain how a hash table can be used to handle collisions, referring to the example below.
227
228 www.ocr.org.uk : [1, true]
229
230 www.ppf.nz : [2, false]
231
232 www.ntf.biz : [4, true]
234
235
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
.............................................................................................................................................. [4]
© OCR 2019
13
The hash function is changed so there are no longer high numbers of collisions.
During busy periods the firewall is expected to check several addresses a second. It is anticipated
that roughly 10 new addresses will be added to a whitelist (list of acceptable addresses) each day.
There is a debate as to whether a hash table (with the new hash function) is the best approach, or
if the whitelist would be better stored in a linked list.
(e) *Discuss whether a hash table or linked list is better to store acceptable websites. You
should compare how each structure can be searched and has data added and come to a
recommendation as to which is better for the whitelist. [12]
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
© OCR 2019
22
10 (a) Show how the binary number 01011110 is represented in hexadecimal.
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
.............................................................................................................................................. [1]
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
.............................................................................................................................................. [2]
(c)
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
.............................................................................................................................................. [2]
01001001-
00101111
[2]
© OCR 2019
23
(e) The floating point binary number 010011 011 consists of a 6-bit mantissa and 3-bit exponent,
both represented in two’s complement. Convert the number to denary, showing your working.
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
.............................................................................................................................................. [3]
(f)
exponent in two’s complement, using as few bits as possible. Show your working.
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
.............................................................................................................................................. [4]
class ItemForSale
public itemName
public price
public discount
endclass
(a) The discount attribute represents a percentage discount on the price. The discount can be
between 0 and 50 (inclusive). All new items for sale initially have a discount value of 0.
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...................................................................................................................................... [4]
(ii) Write a line of code to create an object of type ItemForSale called mushypeas that
has a name of “mushy peas” and a price of £0.89
...........................................................................................................................................
...........................................................................................................................................
...................................................................................................................................... [3]
© OCR 2020
7
(iii) Write the calculatePrice() method, which applies the percentage discount to the
price and returns the new value.
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...................................................................................................................................... [3]
(b) The supermarket has previously had issues with discounts being set as values above 50.
Explain how encapsulation could be applied to the ItemForSale class to stop this problem
from occurring.
You are not expected to write any code in your answer to this question.
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
.............................................................................................................................................. [3]
(c) Explain how inheritance can be used to implement the above requirements.
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
.............................................................................................................................................. [4]
© OCR 2020
9
3 (a) (i) Convert the denary number −119 to an 8-bit binary number with two’s complement
representation.
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...................................................................................................................................... [1]
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...................................................................................................................................... [1]
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...................................................................................................................................... [1]
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...................................................................................................................................... [2]
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
.............................................................................................................................................. [5]
(c) (i) Show the result of applying an XOR mask of 1100 0111 to the byte 0101 1101.
[2]
(ii) Describe a mask that could be applied to an 8-bit number to ensure that:
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...................................................................................................................................... [2]
© OCR 2020
11
4 (a) (i) Complete the Karnaugh map below for the Boolean expression (¬ A ∧ ¬ B) ∨ ( A ∧ ¬ B)
AB
00 01 11 10
00
CD 01
11
10
[3]
(ii) Use the Karnaugh map to find a simplified Boolean expression that is equivalent to
(¬ A ∧ ¬ B) ∨ ( A ∧ ¬ B)
...........................................................................................................................................
...................................................................................................................................... [2]
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...................................................................................................................................... [2]
(ii) Describe the inputs and outputs used by a D-type flip-flop circuit, explaining how the
inputs are used to control the outputs.
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...................................................................................................................................... [4]
© OCR 2020
18
8* Procedural programming and object-oriented programming are two paradigms commonly used by
programmers when developing computer games.
Discuss the advantages of using object-oriented programming over procedural programming when
developing computer games. You should refer to inheritance, encapsulation and polymorphism in
your answer.
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
© OCR 2020
19
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
................................................................................................................................................... [12]
9 (a) Imogen buys a desktop computer. It comes with an operating system installed.
(i) Describe two ways that an operating system could manage physical memory.
1 ........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
2 ........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
[4]
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...................................................................................................................................... [2]
(iii) Describe how virtual memory allows a user to run programs when physical memory is
full.
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...................................................................................................................................... [2]
© OCR 2020 Turn over
2017 Mark Scheme
H446/01 Mark Scheme June 2017
Disadvantage:
- Central point of failure. (1)
iii Prevent unauthorised access to a network. (1) 1 Accept for MP1 malicious attacks/traffic
To restrict applications that are used internally that
have internet access. (1) (AO 1.2)
To restrict websites that can be accessed from within
the company. (1)
To protect the company’s data/intellectual property.
(1)
(Max 1)
5
H446/01 Mark Scheme June 2017
b A linked list requires every node to be checked (until 4 Some candidates may talk about time complexity: linked lists being
the desired record is found). (1) linear/O(n) and hash table being constant/O(1) Accept these as points 1& 2
A linked list will take longer to search (as more nodes (AO1.2 - 2 and 3 & 4 conjoined i.e. full marks.
are added). (1) marks
A hash table enables direct access to the location of
the record. (1) AO2.2 -
A hash table will take the same time to search (as
more nodes are added)/It takes no longer as more 2 marks)
records are added. (1)
3 a i Downloads quicker. (1) 1 Do not accept ‘saves the user space on their device’.
Saves user money by using less bandwidth/ on data
usage. (1)
(Max 1)
(AO1.2)
Ignore
6
H446/01 Mark Scheme June 2017
1 mark for the ∨ joining the two parts. Accept AB as (A.B) and CD as (C.D)
1 1 1 1 1 1 (AO1.2)
1 1 0 1 0 1
1 0 1 0 1 1
1 0 0 0 0 0
0 1 1 0 0 0
0 1 0 0 0 0
0 0 1 0 0 0
0 0 0 0 0 0
10
H446/01 Mark Scheme June 2017
ii (F∨G) ∧ E 2 Accept:
(AO2.2) (G∨F) ∧ E
Send the key/password out on the release date (1) (AO2.2) Use Digital Rights Management/DRM…
b i LDA (1) 1
SUB (1)
ADD (1) (AO1.2)
INP (1)
(Max 1)
11
H446/01 Mark Scheme June 2017
ii BRA (1) 1
BRP (1)
BRZ (1) (AO1.2)
(Max 1)
iii 20 1
(AO2.1)
iv 40 1
(AO2.1)
v Rounds up (the number input)… (1) 2 Rounds to multiple of ten gets one mark.
6 a i 10111100 1
(AO1.2)
2017 MS Continues Here
ii BC 1
(AO1.2)
b i 10101100 1
(AO1.2)
12
H446/01 Mark Scheme June 2017
ii 11010100 1
(AO1.2)
c Shift Right (1) 2 Allow one mark for correct number of places but wrong direction.
d Binary point: shifted four places gives: 6 Correct answer with clear binary subtraction/2’s complement addition
01001.0 (1) calculation gives full marks.
Binary point shifted two places gives: (AO1.2)
010.010 (1)
13
H446/01 Mark Scheme June 2017
Code generation is necessary to turn the code into a format that the
processor can understand (i.e. binary machine code).
The code optimisation whilst not necessary, does ensure the code runs
quicker or using less memory.
Linking is necessary to ensure the library code is incorporated into the final
program.
11 a - 3
(AO1,1)
22
H446/01 Mark Scheme June 2017
11 0 0 1 1
10 0 0 1 1
Or equivalent.
Or equivalent.
23
2018 Mark Scheme
H446/01 Mark Scheme June 2018
24
H446/01 Mark Scheme June 2018
25
H446/01 Mark Scheme June 2018
if givenDistance<=2 then
Controls.beepHorn()
Controls.applyBrakes()
elseif givenDistance<=5 then
Controls.beepHorn()
endif
26
H446/01 Mark Scheme June 2018
27
H446/01 Mark Scheme June 2018
c 370F 2
1 Mark for the first two digits (i.e. 37) (AO1.2)
1 Mark for the last two digit (i.e. 0F)
d -Exponent is 2 3
-Mantissa becomes 010.01 (AO1.2)
-Value is 2.25
(1 Mark per -, Max 3)
e 01100 0000 4
(AO1.2)
1 Mark for mantissa, 1 mark for exponent.
10000 0100
f 10111001 1 cao
(AO1.2)
g 11111111 1 cao
(AO1.2)
32
H446/01 Mark Scheme June 2018
33
2019 Mark Scheme
H446/01 Mark Scheme June 2019
(1 per -, max 3)
5 a tuple / record / list 1
AO2.1
Don't accept array
2019 MS Starts Here
b 228 1 cao
AO2.1
H446/01 Mark Scheme June 2019
(1 per -, max 5 )
H446/01 Mark Scheme June 2019
d 4
− rnd.com would cause a collision with AO1.2
ocr.org.uk/would has to the same
position as ocr.org.uk (228)
(1 per -, max 4)
H446/01 Mark Scheme June 2019
e Mark Band 3–High Level (9-12 marks) 12 Searching of a Linked list involves starting at the first node and following the pointers
The candidate demonstrates a thorough until either the desired value is found, or the end of the list is reached, meaning the
knowledge and understanding of storing and AO1.1 item isn’t in the list.
retrieving data from hash tables and linked (2)
lists. The material is generally accurate and AO1.2 The bigger the linked list grows, the longer it takes to search.
detailed. (2) If a linked list doubles in size it will, on average, take twice as long to search.
AO2.1 A list of size n takes on average n/2 checks.
The candidate is able to apply their knowledge (3) In Big O this is O(n), or linear complexity.
and understanding directly and consistently to AO3.3
the context provided. Evidence/examples will (5)
be explicitly relevant to the explanation. Searching of a hash table requires the key to be hashed and the correct location
accessed.
The candidate is able to weigh up both sides The time this takes is largely dependent on the time to create the hash.
of the argument which results in a supported If we ignore collisions, the time to find an item will stay the same regardless of the size
and realistic judgment as to which data of the white list.
structure is suitable. In other words it has O(1) or constant complexity.
Unfortunately as the white list grows collisions become more likely.
There is a well-developed line of reasoning Linear probing and chaining means that once a location has been found the time taken
which is clear and logically structured. The grows linearly with the number of collisions that have occurred for that location,
information presented is relevant and
substantiated. Nonetheless this is still going to perform significantly better than a linked list.
Mark Band 2-Mid Level (5-8 marks)
The candidate demonstrates reasonable If items are added to the end of the linked list then if the location of the last node is
knowledge and understanding of storing and stored, that location can be ready made to point at the new item.
retrieving data from hash tables or linked lists; The time to add items is constant.
the material is generally accurate but at times
underdeveloped. If they are added in some sort of order then the time to add items grows linearly due to
the time spent searching for the right position. (Storing in order has the advantage that
The candidate is able to apply their knowledge it is if an item isn’t in the list this can be deduced once its location is passed, rather
and understanding directly to the context than waiting until the end.)
provided although one or two opportunities are
missed. Evidence/examples are for the most Adding items to a hash table involves hashing the key and placing it in the correct
part implicitly relevant to the explanation. location.
This takes a constant amount of time..
The candidate makes a reasonable attempt to ..unless there are collisions then there is an overhead which grows with the number of
come to a conclusion showing some collisions for that location.
recognition of influencing factors that would
H446/01 Mark Scheme June 2019
c 11010111 2
(1 Mark for the left most 1, 1 mark for the AO1.2
remaining 7 bits)
d 1121 2
022022 AO1.2
01001001-
00101111
00011010
1 mark for correct answer
1 mark for valid method
e − Exponent is 3 3
− Mantissa becomes 0100.11 AO1.2
− Which is 4.75. (accept 4¾ )
(1 per -, max 3)
f − In fixed point is 1010.11 4 For MP3 any number of leading 0s is valid (including none)
− Mantissa becomes 1.01011 AO1.2
− Exponent of 3 / 11
− Giving answer of 101011 011 2019 MS Ends Here
(1 per -, max 4)
2020 Mark Scheme
H446-01 Mark Scheme November 2020
this.itemname = itemName
(ii) • 1 mark for creating object with identifier 3 Example answers
mushypeas = mushypeas=new ItemForSale("mushy peas",
• 1 mark for creating object as type AO3.2 0.89)
ItemForSale
• mark for parameters passed in as needed ItemForSale mushypeas =
ItemForSale(“mushy peas”,0.89);
mushypeas=ItemForSale((“mushy
peas”,0.89);
Do not penalise for use of self parameter as used by
languages such as Python.
Must be correct case and spelling
(iii) • method definition for calculatePrice() 3 Percentage discount must be applied correctly.
• applies percentage discount
AO3.2 Example answer
• …returns calculated value
function calculatePrice()
newPrice = price – (price * discount/100)
return newPrice
end function
2 (b) • discount attribute made private 3
• Set method created
AO2.2
• …that restricts value to maximum 50%
AO1.2
3 ii 6D 1 Correct answer only
AO1.2
3 iii AB 1 Correct answer only
AO1.2
3 iv 1010 0110 2 Correct answer only
3 (c) (i) • 1001 1010 2 1 mark per nibble, mark left to right
AO1.2
(ii) • 1000 0000 2
• OR
AO2.2
H446-01 Mark Scheme November 2020
4 ii 2
• ¬ B / NOT B
• Karnaugh map used to show 1s highlighted with AO2.2
overlap
The candidate provides a sound discussion, the OO is an abstraction of a real world problem, with
majority of which is focused. Evaluative comments are classes for each type of things to be modelled and
for the most part appropriate, although one or two objects for each instance of these.
opportunities for development are missed.
OO has advantages in data security in that
encapsulation forces developers/users to use methods
H446-01 Mark Scheme November 2020
There is a line of reasoning presented with some (with their built in validation) to access/amend data
structure. The information presented is in the most part stored in attributes.
relevant and supported by some evidence.
OO has advantages in efficiency of design where
Mark Band 1-Low Level (1-4 marks) classes can be reused and can inherit from one
The candidate demonstrates a basic knowledge of another. Procedural programming struggles to support
procedural or object oriented programming; the material this.
is basic and contains some inaccuracies. The candidate
makes a limited attempt to apply acquired knowledge OO also offers flexibility through polymorphism.
and understanding to the context provided.