2024 Computer QP & MS
2024 Computer QP & MS
Luke Skelly
Please note that you may see slight differences between
this paper and the original.
Duration: Not set
Candidates answer on the Question paper.
INSTRUCTIONS TO CANDIDATES
• Write your name, centre number and candidate number in the boxes above. Please write clearly and in capital letters.
• Use black ink. HB pencil may be used for graphs and diagrams only.
• Answer all the questions, unless your teacher tells you otherwise.
• Read each question carefully. Make sure you know what you have to do before starting your answer.
• Where space is provided below the question, please write your answer there.
• You may use additional paper, or a specific Answer sheet if one is provided, but you must clearly show your candidate
number, centre number and question number(s).
p = random(1, 512)
a = ""
endwhile
[4]
The position of the character can only be between 1 and 512 inclusive.
endfunction
[6]
Students gain points depending on their result and the year group they are in. The points are added to
the team score.
The team with the most points at the end of the sports day wins.
Data about the teams and students is stored in a sports day program.
(i) Identify the most appropriate data type for each variable used by the program.
teamName "Super-Team"
studentYearGroup 11
javelinThrow 18.2
[3]
(ii) The student names for a team are stored in an array with the identifier theTeam
A linear search function is used to find whether a student is in the team. The function:
function linearSearch(studentName)
return …………….….....……………
endif
next count
return False
endfunction
[4]
(b) This algorithm calculates the number of points a student gets for the distance they throw in the javelin:
04 score = 3
06 score = 2
07 else
08 score = 1
09 endif
10 if yearGroup != 11 then
11 score = score * 2
12 endif
Complete the trace table for the algorithm when a student in year 10 throws a distance of 14.3
You may not need to use all the rows in the table.
[4]
[4]
Complete the table to identify an example of test data for each type of test.
The database table TblResult stores the times of students in the 100 m race. Some of the data is
shown:
Complete the SQL statement to show the Student ID and team name of all students who are in year
group 11
FROM ..............................................................
...................................................................
[4]
(e) Abstraction and decomposition have been used in the design of the sports day program.
(i) Identify one way that abstraction has been used in the design of this program.
[1]
(ii) Identify one way that decomposition has been used in the design of this program.
[1]
[6]
Programming construct
Keyword
Selection Iteration
if
for
while
[3]
The flowchart statements have been written for the algorithm, but the flowchart is incomplete.
[4]
Definition
Example
[2]
Identify the line number of the two logic errors in the algorithm and refine the code to correct each
logic error.
Line number
Correction
Line number
Correction
[4]
(i) Show how a binary search will be used to find the number 10 in the following data set:
1 2 5 6 7 10 20
[3]
[1]
(iii) Tick (✓) one box to identify the name of the sorting algorithm that splits data into individual items
before recombining in order.
Bubble sort
Insertion sort
Merge sort
[1]
Input
Output [2]
(b) Describe one method of defensive design that can be used when creating the program.
[2]
A B C P
0 0 0
0 0 1
0 1 0
0 1 1
1 0 0
1 0 1
1 1 0
1 1 1
[4]
[3]
message = "abcd1234"
Complete the table to show the output when each statement executes.
Statement Output
print(message.length) 8
print(message.upper)
print(message.left(4))
print(int(message.right(4))*2)
[3]
[3]
9(a) Give two reasons why some programs are written in a low-level language.
[2]
(b) Describe the benefits of using a compiler instead of an interpreter when writing a program.
[3]
[2]
(b) Complete the table by writing the name of two registers used in the fetch-execute cycle and the
purpose of each register.
Register Purpose
[4]
(c) Give three characteristics of a CPU that can affect its performance.
3 [3]
Explain the reasons why the ‘Follow Me’ system is an example of an embedded system.
[3]
(i) State two items that will be stored in the ROM for the ‘Follow Me’ system.
2 [2]
(ii) The RAM will store currently running data and instructions.
State three items of data that will be stored in the RAM for the ‘Follow Me’ system.
3 [3]
(iii) Explain why the ‘Follow Me’ system does not need virtual memory.
[2]
11110000
105
00011110
[3]
(b) Complete the table by writing the answer to each statement.
Statement Answer
The smallest denary number that can be
represented by a 4-bit binary number
The largest denary number that can be
represented by a 6-bit binary number
The maximum number of different colours that
can be represented with a colour depth of 7-bits
The minimum number of bits needed to
represent 150 different characters in a character
set
[4]
(c) Show the result of a left binary shift of 4 places on the binary number 00001111.
[1]
[3]
(e) Add these two 8-bit binary numbers using binary addition.
[2]
(i) Give one valid example of an IPv4 address and one valid example of an IPv6 address.
IPv4
IPv6
[2]
[2]
(i) Describe two benefits to the airport of using wired connections in their network.
[4]
(ii) Explain the reasons why the airport should also allow the network to be accessed using a wireless
connection.
[3]
(i) Draw a diagram to show how the five computers, switch and two printers are connected in a star
topology.
[3]
(ii) Give one benefit and one drawback of the office using a star topology instead of a mesh topology.
Benefit
Drawback
[2]
14(a The table contains operating system functions and a task that each function performs.
)
Complete the table by writing the two missing function names and a task performed by the two given
functions.
Function Task
Peripheral management
folders
User interface
[4]
changed data is intercepted, it cannot be ................................................ This software does not stop
................................................ software analyses the data on a disk to find files that have been split
and stored in separate locations. The split files are moved to be ................................................ in
storage and the free space is moved together. This does not provide more storage space on the disk,
instead it makes the ................................................ of the data faster because the read head does not
Discuss the features, benefits and drawbacks of each type of licence for this program and make a
recommendation to the programmer.
[8]
(i) Tick (✓) one box to identify the correct description of sound sampling.
The frequency of the wave is measured a set number of times each second.
The digital sound wave is measured a set number of times each second.
[1]
(ii) Explain how changing the bit depth will affect the sound file.
[2]
(i) Identify whether the musician should buy a magnetic secondary storage device or a solid state
secondary storage device for their computer.
Type
Justification
[4]
[1]
(iii) Tick (✓) one box to identify the smallest secondary storage capacity.
2.1 GB
300 MB
200 000 KB
0.0021 TB
[1]
Calculate an estimate of the storage space in GB that the 1000 files will require, assuming they are
each 3 MB in size. Show your working out.
Working space:
Answer: ......................................... GB
[2]
Exemplar 2
Total 10
Examiner’s Comments
Ignore capitalisation.
Examiner’s Comments
Examiner’s Comments
Answer may include lines where no Trace tables have appeared multiple
changes or output happens (i.e. lines times in J277 examination papers now
3, 4, 5, 7, 8, 9, 10, 12). and candidates are hopefully familiar
with the expectations, which are
Where variable doesn't change, current consistent across series.
value may be repeated on subsequent
lines. Most candidates correctly traced
through the given algorithm, which was
more accessible than usual due to not
containing any loops. Where mistakes
were made, this was typically to do
with either incorrect line numbers being
given for each change (this was
penalised once only and then
subsequent mistakes with line numbers
followed through) or additional
incorrect output being given.
c i inputs a value from the user and 4 Answers using AND/OR for BP2 and
stores/uses (AO3) BP3 must be logically correct e.g. if
checks min value (>= 40.0 // < 40) height >=40 and height <=180.
checks max value (<=180.0 // > Do not accept if height >=40 and
180) <=180
…outputs both valid / not valid
correctly based on checks Answers using OR will reverse output
for BP4 (see examples).
Example 1 (checking for valid input)
h = input("Enter height BP4 needs reasonable attempt at
jumped") either BP2 or BP3. Need to be sure
if h >= 40 and h <= 180 then what is being checked to be able to
print("valid") decide which way around valid/invalid
else should be.
print("not valid")
endif Allow FT for BP4 if reasonable attempt
at validating (must include at least one
Example 2 (checking for invalid input) boundary)
h = input("Enter height
jumped") Ignore conversion to int on input.
if h < 40 or h > 180 then input cannot be used as a variable
print("not valid") name.
else
print("valid") Greater than / less than symbols must
endif be appropriate for a high-level
language / ERL. Do not accept =>
(wrong way around) or > (not available
on keyboard). No obvious spaces in
variable names. Penalise once and
then FT.
Examiner’s Comments
Examiner’s Comments
ii any example of breaking down the 1 Must be applicable to this program, not
program into sections/subroutines (AO3) a generic description of what
any example of breaking down the decomposition is. Give BOD where this
database into tables is unclear.
Examiner’s Comments
f Input team name AND score and 6 For BP3, allow "stop" to be entered for
store / use separately (AO3) either team name or score (or both).
Attempt at using iteration… Allow third input (e.g. "do you wish to
…to enter team/score until "stop" stop?")
entered
Calculates highest score Allow use of break (or equivalent) to
Calculates winning team name… exit loop for BP3.
…Outputs highest score and team
name Allow use of recursive function(s) for
BP2/3.
Example 1
highscore = 0 Initialisation of variables not needed -
while team != "stop" assume variables are 0 or empty string
team = input("enter team if not set.
name")
score = input("enter Ignore that multiple teams could get
score") the same high score, assume only one
if score > highscore then team has the highest score.
highscore = score
highteam = team BP4/5 could be done in many ways –
endif see examples. Allow any logically valid
endwhile method. Allow use of max/sum
print(highscore) functions and use of arrays/lists.
print(highteam)
FT for BP6 if attempt made at
Example 2 (alternative) calculating highest score/name
scores = []
teams = [] If answer simply asks for multiple
while team != "stop" entries (not using iteration), BP2 and 3
team = input("enter team cannot be accessed but all others
name") available.
score = input("enter
score") For minor syntax errors (e.g. missing
scores.append(score) quotation marks or == for assignment,
teams.append(team) spaces in variable names) penalise
endwhile once then FT.
highscore = max[scores]
highteam = teams[scores.index input cannot be used as a variable
(highscore)] name.
print(highscore)
print(highteam) Examiner’s Comments
Exemplar 3
Total 30
3 Keyword Programming 3
construct (AO1) Examiner’s Comments
Selection Iteration
This question was answered very well
if ✓ by the majority of candidates, showing
for ✓ a good understanding of the difference
while ✓ between the key programming
constructs of selection and iteration.
Total 3
4 Correct shape for all three inputs 4 No need for arrows – lines are
AND outputs (parallelogram) (AO2) acceptable.
Correct shape for decision
(diamond) BOD for correct answers that include a
True and False // Yes and No loop back to the start
labelled correctly (true/Yes linking
to “Even”) Examiner’s Comments
All lines joined up correctly and link
to End. The majority of candidates recognised
the correct flowchart shapes to be
used for a decision and many also
were able to use the parallelogram
shape for inputs and outputs. However,
fewer correctly connected up the boxes
to make sure that all paths started and
ended at appropriate points and even
fewer candidates labelled up the
decision box appropriately with
True/False or Yes/No. These labels are
crucial to be able to follow the path of
the algorithm when a decision is made.
Total 4
5 a Max 1 mark for definition that is clearly 2 BOD code/program etc for BP1
different from a logic error. (AO1)
Do not allow answers linked to data
(an error that) breaks the types.
rules/grammar of the programming
language "incorrect grammar" by itself is NE
Stops the program from running //
does not allow program to run // Do not allow “stop working”, "does not
crashes the program // does not work", etc – TV.
allow program to translate
Do not accept missing quotation marks
Suitable example for 1 mark, e.g. e.g. print(hello) (could be a
variable name)
misspelling key word (e.g. printt
instead of print) BOD given code that could cause a
Missing / extra symbol (e.g. missing syntax error in a high-level language.
bracket, missing semicolon)
Mismatched quotes Examiner’s Comments
Invalid variable or function names
(e.g. variable starting with a number This question firstly asked for a
or including a space) definition of the term ‘syntax error’.
Incorrect use of operators Although many candidates were
Use of reserved keywords for correctly able to do this in terms of
variables (e.g. print = 3) rules of the programming language
Incorrect capitalisation of keywords being broken, many instead gave
(e.g. Print instead of print) examples of issues that would cause
Incorrect indentation (of code syntax errors, such as ‘where a bracket
blocks) is missing’. This would indeed cause a
Missing concatenation (e.g. syntax error in many high-level
print(score x) ) languages but is not a definition in
general and so was not credited by
examiners for this part of the question.
Misconception
Allow other logical equivalent code e.g. Ignore missing then from line 04.
total = int(num1) + int(num2)
if 10 <= total <= 20 Ignore capitalisation.
Examiner’s Comments
Exemplar 1
Total 11
Total 4
Examiner’s Comments
Total 7
Examiner’s Comments
Total 6
Total 5
b 1 mark for naming register, 1 for 4 Careful that the purpose is not an
matching purpose action such as fetches, takes,
retrieves.
Program counter // PC
Stores the address of the Read full purpose and award a correct
current/next instruction to be point
fetched // stores the address of the
instruction for the current/next FE Accept
cycle
Current instruction
Memory address register // MAR register//CIR//Instruction
Stores the address of the register//IR
current/next instruction/data to be Stores the instruction currently
fetched // stores the address where being executed
data/instruction is to be stored
BOD memory buffer register for MDR.
Memory data register // MDR
Stores the data/instruction fetched If there is no register but the register is
from memory // stores given in the purpose column, award
data/instruction to be stored in the purpose if accurate.
memory // stores the If the answer in the register column is
data/instruction located in the incorrect, do not mark purpose.
memory location in the MAR
Misconception
Total 9
Only stores a small amount of data Many candidates were able to identify
in RAM // only stores specific/few that VM is used when a system is short
items in RAM of RAM, they were then able to apply
… unlikely to run out of RAM // this to the given system, i.e. that the
there is enough space in RAM current system will not run out of RAM.
No secondary storage to Some candidates expanded this by
use/needed as VM also identifying that very few data
Few/one program/instructions items would be stored in RAM.
running at a time // no memory
intensive tasks Some of the stronger responses
Dedicated hardware will be included an acknowledgement that the
optimised for system // RAM is embedded system is unlikely to have
designed to meet the system's secondary storage and therefore
requirements cannot create VM.
Total 10
Examiner’s Comments
Examiner’s Comments
d 1 mark for an example 2-digit hex 3 No marks for converting denary to hex.
number correctly converted into
denary. If the example has an inaccurate
result, for example they have
1 mark each to max 2 for converted A to 11. They can still get
describing/showing each stage. the method marks.
Either:
Multiplying: No requirement to show how letters are
used.
Multiply the left/first digit by 16
Add value of second digit (without Examiner’s Comments
additional calculation)
Candidates that did well on this
Or: question used the example to show
Converting: how they converted a value from
hexadecimal to denary. They included
Convert each digit into 4-bit binary annotations to show what they were
Combine and convert the 8-bit doing at each stage. Candidates often
binary to denary chose a hexadecimal value that
included a letter. Some candidates
chose hexadecimal values that were
straightforward to convert, for example
A0 where they multiplied 16 by 10 and
then added 0. Some candidates chose
a more complicated calculation and did
not always calculate the correct result.
e 1 mark for correct working (4 carries) 2 Do not award working mark for
1 mark for answer 01111010 conversion to denary and back.
Examiner’s Comments
Total 13
(usually presented in) hexadecimal Allow both marks for a valid example.
/ denary / binary
6 groups of numbers // 12 (hex) NB '6 pairs of numbers' gets MP2 and
numbers MP3.
… each group has paired/2-digit '4 pairs of numbers' gets MP3
(hex) numbers / 8 bit binary number
48 bits long Examiner’s Comments
Separated by colons/hyphens
(The first half/part) contains the The most common responses given
manufacturer ID // (first half/part) marks included identifying that it is
identifies the manufacturer usually in hexadecimal and that the
(The second half/part) contains the groups are separated by colons or
serial number // (second half/part) hyphens. Some candidates identified
identifies the device the two separate parts of the MAC
address.
b i 1 mark each for benefit 1 for 4 Mark in pairs. Mark each benefit space
application to max 4 to the candidates' benefit. An
e.g. expansion/application for a benefit can
be awarded in the other answer space.
Examiner’s Comments
c i 1 mark each for drawing showing: 3 Allow any type of computer e.g. PC,
laptop.
5 computers, 2 printers and 1
switch all clearly labelled Do not accept client for computer.
All devices directly connected to the
switch // all computers connected to MP1 there must be at least 5
switch and each printer to a computers, at least 2 printers, at least
switch/computer(s) 1 switch
Only 8 devices and no additional
connections other than to the Examiner’s Comments
switch (or central device, or printers
to only one computer each) Many candidates were able to draw a
diagram that included the five
computers, the switch and the two
printers. Some candidates did not label
these items, instead drawing eight
boxes without identify which device
each one represented.
Misconception
Total 19
14 a 1 mark for function and 1 name for task 4 BOD storage for memory in the first
function.
Total 10
Total 8
b i No mark for type. Accept the type by 4 MP1 needs to be cost per unit e.g. it
example e.g. HDD for magnetic. costs less per GB than other storage
types. Not just 'it is cheap to buy'.
1 mark each for each point matching to
type given to max 4 Allow reverse argument for each e.g.
Magnetic e.g. for magnetic, why they have not
chosen solid state. For example:
(Usually) cheaper cost to purchase 'magnetic is not as robust but the
per unit of data computer will not be moved' gets 1
Sufficient/good durability for what is mark for the not moving, and 1 mark
needed for solid state's robustness is not
… computer unlikely to move required.
(regularly) // by example
Sufficient/fast speed of access If there is no type give on line 1. Read
… no significant delays in the answer to look for a type and then
storing/reading data award justification.
(Long-term) reliable // longevity
… unlikely to need to purchase If there is not type identified anywhere
another //unlikely to break from in the answer, 0 marks.
over-use
High capacity Examiner’s Comments
… e.g. file size of sound files can
be large // allows the musician to This question required candidates to
store files with higher bit depth identify which of the two choices they
would make and to justify their choice.
Solid state e.g. Either choice was appropriate and
candidates were given marks for
Cost often equates to magnetic per explaining why they had made the
quantity // not expensive per unit of choice they did.
data
Durable // robust // no moving parts There was no common choice with
… so computer can be moved both often being selected.
without risk of losing data
Fast speed of access of data Choices were often suitably justified.
… no significant delays in Common points included the amount of
storing/reading data // musician data that could be stored with some
does not have to wait for files to candidates also linking this to the need
load/store for sound files to have a high capacity.
High capacity // (nearly the) Candidates often identified that solid
same/higher capacity than state has a faster access speed than
magnetic magnetic, although some responses
… file size of sound can be large just stated that it was faster without
Small in physical size identifying what it was faster at.
… device is portable // can fit in a
smaller type of computer When justifying solid state candidates
Misconception
Examiner’s Comments
Examiner’s Comments
Examiner’s Comments
Total 11