AQA CS 2024 Exam Questions Guide
AQA CS 2024 Exam Questions Guide
Date: ________________________
Comments:
C ← "0"
R ← ""
FOR J = 0 TO 5
X ←5-J
D1 ← S1[X]
D2 ← S2[X]
IF C = "0" THEN
IF D1 = D2 THEN
S ← "0"
C ← D1
ELSE
S "1"←
ENDIF
ELSE
IF D1 = D2 THEN
S ← "1"
C ← D1
ELSE
S ← "0"
ENDIF
ENDIF
R ←
CONCATENATE(S, R)
ENDFOR
OUTPUT R
The function CONCATENATE(X, Y) returns the string formed by concatenating the string Y to the
end of string X. For example, CONCATENATE("cat", "dog") returns "catdog".
You may not need to use all the rows in the table.
The first row of the table has already been completed for you.
S1 S2 C R J X D1 D2 S
OUTPUT:
(Total 5 marks)
___________________________________________________________________
___________________________________________________________________
___________________________________________________________________
___________________________________________________________________
(2)
(b) Give two reasons why it is good practice to use local variables.
___________________________________________________________________
___________________________________________________________________
___________________________________________________________________
___________________________________________________________________
(2)
(Total 4 marks)
_______________________________________________________________________
_______________________________________________________________________
_______________________________________________________________________
_______________________________________________________________________
_______________________________________________________________________
_______________________________________________________________________
(Total 3 marks)
The OUT_NOLF command displays the output without a line feed. The following series of
OUT_NOLF commands will display ABC:
OUT_NOLF "A"
OUT_NOLF "B"
OUT_NOLF "C"
The table below lists the MOD and DIV operators for each of the available programming
languages. You should refer to the row for your programming language.
C# % /
Java % /
Python % //
[Link] Mod \
Task 1
Write a program to implement the algorithm in the figure above.
Task 2
Test that your program works:
• run your program
• enter 4
• enter 99
(a) State the most appropriate data type to use for numbers with a fractional part, for example
5. 12.79.
___________________________________________________________________
___________________________________________________________________
(1)
(b) State the identifier of a variable in the Skeleton Program that is used to hold a number
with a fractional part.
___________________________________________________________________
___________________________________________________________________
(1)
(Total 2 marks)
(a) State the most appropriate data type to use for values that may consist of more than one
6. character.
___________________________________________________________________
___________________________________________________________________
(1)
(b) State the identifier of a variable in the Skeleton Program that is used to hold more than
one character.
___________________________________________________________________
___________________________________________________________________
(1)
(Total 2 marks)
State the name of an identifier for a subroutine defined in the Skeleton Program that returns a
7. single digit number.
_______________________________________________________________________
_______________________________________________________________________
(Total 1 mark)
_______________________________________________________________________
_______________________________________________________________________
(Total 1 mark)
_______________________________________________________________________
_______________________________________________________________________
_______________________________________________________________________
_______________________________________________________________________
(Total 2 marks)
(a) Explain what is meant by composition and give an example where composition is used in
10. the Skeleton Program.
___________________________________________________________________
___________________________________________________________________
___________________________________________________________________
___________________________________________________________________
(2)
(b) Describe two reasons why composition is used in the Skeleton Program.
___________________________________________________________________
___________________________________________________________________
___________________________________________________________________
___________________________________________________________________
(2)
(Total 4 marks)
What is the named constant TIME_SERVING used for and what is the benefit of using a named
11. constant in this way?
_______________________________________________________________________
_______________________________________________________________________
_______________________________________________________________________
_______________________________________________________________________
(Total 2 marks)
___________________________________________________________________
___________________________________________________________________
___________________________________________________________________
___________________________________________________________________
(2)
(b) What aspect of a shop do the FOR loop and the statements inside it simulate?
___________________________________________________________________
___________________________________________________________________
(1)
(Total 3 marks)
(a) Describe how some of the values in Stats are used to calculate the average queue length
in the subroutine OutputStats.
___________________________________________________________________
___________________________________________________________________
(1)
(b) Describe how the relevant values in Stats are updated in the subroutine Serving to
enable the calculation in the subroutine OutputStats to produce the correct result.
___________________________________________________________________
___________________________________________________________________
___________________________________________________________________
___________________________________________________________________
(2)
(Total 3 marks)
In the Skeleton Program buyers join a single queue and are then served at one of several tills.
14.
Outline the design changes needed for buyers to form a separate queue for each till.
_______________________________________________________________________
_______________________________________________________________________
_______________________________________________________________________
_______________________________________________________________________
(Total 2 marks)
The Skeleton Program is to be changed so that a buyer shunning the queue will cause the shop
to open another till, subject to the maximum number of tills available not being exceeded.
The subroutine BuyerArrives needs to be modified so that a buyer arriving when the queue
length is 5 will not join the queue. A running total of the number of buyers shunning the queue is
to be kept.
After a buyer has shunned the queue, the shop will open another till, until the maximum number
of tills available have opened.
At the end of the simulation the number of buyers that have shunned the queue should be output
as part of the statistics.
Task 1
Create a constant value to use as an index for a previously unused element of the data structure
Stats in which to store the count of the number of shuns.
Task 2
Amend the subroutine BuyerArrives so that a buyer only joins the queue when fewer than 5
buyers are in the queue and shuns the queue if there are 5 buyers in the queue.
If a buyer shuns the queue, the number of shuns and the number of tills operating should be
updated as appropriate and a suitable message showing the ID of the buyer that has shunned
the queue should be displayed.
Task 3
Amend the subroutine OutputStats to output the total number of shuns with an appropriate
message.
Task 4
Test that the changes you have made work by conducting the following test:
• run your amended Skeleton Program
• enter Y
• enter 50
• enter 1
The SCREEN CAPTURE(S) only need to show the simulation statistics that are displayed
when the simulation finishes.
(1)
(Total 8 marks)
The simulation is to calculate the serving time for a buyer based upon the number of items in the
buyer’s basket and the speed of the till operator. The speed of each till operator needs to be
stored for each till.
Task 1
An extra value is required for each element of Tills, representing the speed of the operator at a
till. Amend the declaration for Tills.
Task 2
Amend the subroutine ResetDataStructures so that the extra values are set so that till 0 has an
operator speed of 7 and till 1 has an operator speed of 6. Each subsequent till should have its
operator speed set to a value 1 less than the previous till.
Task 3
Amend the subroutine ChangeSettings so that it requires the user to set the till speed of each till
in use. The user should be given information about which till they are setting the current till
operator speed of and the current default value. ChangeSettings will require Tills as a
parameter and, depending on your language, as a return value, so the call to this subroutine will
also need amending.
Task 4
Amend the subroutine CalculateServingTime so that the serving time depends on the speed of
the till operator at the till that is being used.
Task 5
Test that the changes you have made work by conducting the following test:
• run your amended Skeleton Program
• enter Y
• enter 6
• enter 3
• enter 3
• enter 2
• enter 1
(a) Your PROGRAM SOURCE CODE for the entire subroutine ResetDataStructures, the
entire subroutine ChangeSettings and the entire subroutine CalculateServingTime and
any code that you have changed or added to the Skeleton Program.
(8)
The SCREEN CAPTURE(S) only need to show the entire output for time unit 5.
(1)
(Total 9 marks)
If till 0 is idle, the next buyer in the queue with fewer than 10 items in their basket comes out of
the queue and gets served at till 0.
Task 1
Write a new subroutine ServeBuyerExpress that:
• finds the first buyer in the queue who has fewer than ten items in their basket and if there
is one:
◦ removes the buyer’s details from the queue
◦ closes the gap in the queue
◦ displays the buyer’s ID
◦ calls the UpdateStats subroutine for the express till
◦ calls the CalculateServingTime subroutine for the express till.
Task 2
Amend the subroutine Serving to check whether the express till is free and, if it is, call the
subroutine ServeBuyerExpress before checking the availability of other tills.
Task 3
Amend the subroutine OutputTillAndQueueStates to output the data for till 0 as well as the
data about the other tills which it already outputs.
Task 4
Test that the changes you have made work by conducting the following test:
• run your amended Skeleton Program
• enter N
(a) Your PROGRAM SOURCE CODE for the entire subroutine ServeBuyerExpress, the entire
subroutine Serving and the entire subroutine OutputTillAndQueueStates.
(12)
The SCREEN CAPTURE(S) only need to show the entire output for time unit 8.
(1)
(Total 13 marks)
_______________________________________________________________________
_______________________________________________________________________
(Total 1 mark)
Shade two lozenges to indicate which of the following statements are true.
C 5 is an irrational number
D 5 is a natural number
E 5 is a rational number
(Total 2 marks)
Shade one lozenge to indicate which of the symbols below represents the set of rational
20. numbers.
A ℂ
B ℕ
C ℚ
D ℝ
E ℤ
(Total 1 mark)
_______________________________________________________________________
_______________________________________________________________________
(Total 1 mark)
_______________________________________________________________________
_______________________________________________________________________
(Total 1 mark)
(Total 2 marks)
Show how the 8-bit two’s complement binary integer 00011100 can be subtracted from the
24. 8-bit two’s complement binary integer 00111011 without converting the numbers to decimal.
_______________________________________________________________________
_______________________________________________________________________
_______________________________________________________________________
_______________________________________________________________________
_______________________________________________________________________
_______________________________________________________________________
(Total 2 marks)
The bit pattern in the figure below represents a 10-bit unsigned fixed point binary number with
25. four bits before and six bits after the binary point.
_______________________________________________________________________
_______________________________________________________________________
_______________________________________________________________________
_______________________________________________________________________
(Total 2 marks)
State the name of the component on a sound card that transforms the continuous signal received
26. from a microphone to a form that can be stored by a computer.
_______________________________________________________________________
_______________________________________________________________________
_______________________________________________________________________
(Total 1 mark)
Calculate the maximum number of colours that could be used in the bitmap image.
_______________________________________________________________________
_______________________________________________________________________
_______________________________________________________________________
_______________________________________________________________________
_______________________________________________________________________
_______________________________________________________________________
(Total 2 marks)
When a bitmap image is stored in a file, additional information is stored as well as the colours of
28. the pixels. For example, the bitmap file might contain information on the date of creation, image
width and height.
State the name given to this additional information when storing a bitmap image.
_______________________________________________________________________
_______________________________________________________________________
_______________________________________________________________________
(Total 1 mark)
A sound is recorded with a sample rate of 96 000 Hz and a sample resolution of 24 bits. The file
29. size of the recording is 12 096 kilobytes.
A sample rate of 1 Hz means that one sample has been taken every second.
_______________________________________________________________________
_______________________________________________________________________
_______________________________________________________________________
_______________________________________________________________________
_______________________________________________________________________
_______________________________________________________________________
_______________________________________________________________________
_______________________________________________________________________
_______________________________________________________________________
(Total 3 marks)
_______________________________________________________________________
_______________________________________________________________________
_______________________________________________________________________
(Total 1 mark)
_______________________________________________________________________
_______________________________________________________________________
_______________________________________________________________________
_______________________________________________________________________
_______________________________________________________________________
_______________________________________________________________________
(Total 2 marks)
Explain one advantage of using MIDI instead of sampled sound to represent music.
32.
_______________________________________________________________________
_______________________________________________________________________
_______________________________________________________________________
(Total 1 mark)
A message is encrypted using a Caesar cipher that operates with a shift value of four. For
33. example, the letter A in plaintext would be represented by E in ciphertext.
_______________________________________________________________________
_______________________________________________________________________
_______________________________________________________________________
(Total 1 mark)
Explain two reasons why Caesar ciphers are vulnerable to being cracked.
34.
_______________________________________________________________________
_______________________________________________________________________
_______________________________________________________________________
_______________________________________________________________________
_______________________________________________________________________
_______________________________________________________________________
(Total 2 marks)
A Computer game
B Image editor
E Word processor
(Total 1 mark)
An operating system manages hardware resources, for example the I/O devices associated with
36. a computer system.
State two other examples of hardware resources that an operating system is responsible for
managing.
_______________________________________________________________________
_______________________________________________________________________
_______________________________________________________________________
_______________________________________________________________________
_______________________________________________________________________
_______________________________________________________________________
(Total 2 marks)
State the name of the logic gate shown in the figure above.
_______________________________________________________________________
(Total 1 mark)
Complete the truth table for the logic circuit in the figure above.
A B C L M Z
0 0 0
0 0 1
0 1 0
0 1 1
1 0 0
1 0 1
1 1 0
1 1 1
(Total 2 marks)
_______________________________________________________________________
_______________________________________________________________________
_______________________________________________________________________
(Total 3 marks)
_______________________________________________________________________
_______________________________________________________________________
_______________________________________________________________________
_______________________________________________________________________
_______________________________________________________________________
_______________________________________________________________________
_______________________________________________________________________
_______________________________________________________________________
_______________________________________________________________________
_______________________________________________________________________
_______________________________________________________________________
_______________________________________________________________________
_______________________________________________________________________
_______________________________________________________________________
_______________________________________________________________________
_______________________________________________________________________
_______________________________________________________________________
_______________________________________________________________________
_______________________________________________________________________
_______________________________________________________________________
_______________________________________________________________________
_______________________________________________________________________
State the name of the components that are labelled in the figure above with the numbers 1 to 4.
In the case of register names, the full names must be stated.
(Total 2 marks)
_______________________________________________________________________
_______________________________________________________________________
_______________________________________________________________________
_______________________________________________________________________
_______________________________________________________________________
(Total 2 marks)
In a particular processor instruction set, each instruction consists of an opcode and an operand.
43. An operand could be an immediate value to be used by a program.
_______________________________________________________________________
_______________________________________________________________________
_______________________________________________________________________
(Total 2 marks)
Explain why the larger cache and greater word length are possible factors for the performance
difference between Computer A and Computer B.
_______________________________________________________________________
_______________________________________________________________________
_______________________________________________________________________
_______________________________________________________________________
(Total 2 marks)
The table below shows the standard AQA assembly language instruction set that should be used
45. to answer this question
LDR Rd, <memory ref> Load the value stored in the memory location
specified by <memory ref> into register d.
STR Rd, <memory ref> Store the value that is in register d into the
memory location specified by <memory ref>.
ADD Rd, Rn, <operand2> Add the value specified in <operand2> to the
value in register n and store the result in register
d.
SUB Rd, Rn, <operand2> Subtract the value specified by <operand2> from
the value in register n and store the result in
register d.
CMP Rn, <operand2> Compare the value stored in register n with the
value specified by <operand2>.
EOR Rd, Rn, <operand2> Perform a bitwise logical XOR (exclusive or)
operation between the value in register n and
the value specified by <operand2> and store the
result in register d.
LSL Rd, Rn, <operand2> Logically shift left the value stored in register n
by the number of bits specified by <operand2>
and store the result in register d.
LSR Rd, Rn, <operand2> Logically shift right the value stored in register n
by the number of bits specified by <operand2>
Labels: A label is placed in the code by writing an identifier followed by a colon (:). To refer to a
label the identifier of the label is placed after the branch instruction.
Interpretation of <operand2>
<operand2> can be interpreted in two different ways, depending on whether the first character is
a # or an R:
1. # – use the decimal value specified after the #, eg #25 means use the decimal value 25
2. Rm – use the value stored in register m, eg R6 means use the value stored in register 6
The available general purpose registers that the programmer can use are numbered 0–12
Write a program using the standard AQA assembly language in the table above that will:
_______________________________________________________________________
_______________________________________________________________________
_______________________________________________________________________
_______________________________________________________________________
_______________________________________________________________________
_______________________________________________________________________
(Total 3 marks)
The company expects to sell hundreds of millions of devices. The data collected from each
device will be permanently kept in secondary storage on the company’s servers. The company is
planning to use solid-state drives in the servers that will hold device location data but is unsure
whether using solid-state drives is a good idea.
Discuss a range of moral, ethical, legal and cultural issues raised by the new device and explain
the properties of solid-state drives that the company should consider when deciding on a
secondary storage technology.
In your answer you will be assessed on your ability to follow a line of reasoning to produce a
coherent, relevant and structured response.
_______________________________________________________________________
_______________________________________________________________________
_______________________________________________________________________
_______________________________________________________________________
_______________________________________________________________________
_______________________________________________________________________
_______________________________________________________________________
_______________________________________________________________________
_______________________________________________________________________
_______________________________________________________________________
_______________________________________________________________________
_______________________________________________________________________
_______________________________________________________________________
_______________________________________________________________________
_______________________________________________________________________
_______________________________________________________________________
_______________________________________________________________________
(Total 12 marks)
_______________________________________________________________________
_______________________________________________________________________
_______________________________________________________________________
_______________________________________________________________________
_______________________________________________________________________
(Total 2 marks)
A photographer wants to create a large file sharing network to allow thousands of photographers
49. to share their photos with each other for free.
State two reasons why the photographer may choose to use a peer-to-peer network rather than
a client-server network.
_______________________________________________________________________
_______________________________________________________________________
_______________________________________________________________________
_______________________________________________________________________
_______________________________________________________________________
_______________________________________________________________________
(Total 2 marks)
_______________________________________________________________________
_______________________________________________________________________
(Total 1 mark)
Explain how disabling SSID broadcasting can increase the security of a wireless network.
51.
_______________________________________________________________________
_______________________________________________________________________
_______________________________________________________________________
_______________________________________________________________________
_______________________________________________________________________
_______________________________________________________________________
(Total 2 marks)
1 mark for each correct set of values in the correct sequence (boxed in red);
I. missing quotes
I. duplicated values in a column
If, after marking according to the boxed sections, fewer than 3 marks are awarded, 1 mark
can be awarded for each of the following, up to a maximum total of 3:
Max 2
2
Max 2
2
[4]
Max 3
[3]
Note to examiners:
If a language allows variables to be used without explicit declaration, (e.g. Python), then
this mark should be awarded if the correct variables exist in the program code and the first
value they are assigned is of the correct data type.
2. Correct prompts "Enter an integer: " and Number1 assigned integer value
entered by user and "Enter another integer: " and Number2 assigned integer
value entered by user;
3. Correct IF THEN ELSE statement syntax allowed by the programming language and
correct condition;
4. Correct assignments to Number in THEN and ELSE part;
5. Loop iterates correct number of times;
6. Correct condition to output X;
7. Correct condition to output V;
8. Correct output within loop without line feed;
Sub Main()
Dim Number1, Number2, Number, Count As Integer
[Link]("Enter an integer: ")
Number1 = [Link]() 'MP1
[Link]("Enter another integer: ")
Number2 = [Link]() 'MP2
If Number1 > Number2 Then 'MP3
Number = Number1 \ Number2
Else
Number = Number2 \ Number1 'MP4
End If
Count = 0
While Count <> Number 'MP5
Count = Count + 1
If (Count Mod 10) = 0 Then 'MP6
[Link]("X")
Else
If (Count Mod 5) = 0 Then 'MP7
[Link]("V")
Else
[Link]("/") 'MP8
End If
End If
End While
[Link]()
End Sub
Python 3
Python 2
import sys
Number1 = int(raw_input("Enter an integer: ")) # MP1
Number2 = int(raw_input("Enter another integer: ")) # MP2
if Number1 > Number2: # MP3
Number = Number1 // Number2
else:
Number = Number2 // Number1 # MP4
Count = 0
while Count != Number: # MP5
Count += 1
if Count % 10 == 0: # MP6
[Link]('X')
elif Count % 5 == 0: # MP7
[Link]('V')
else:
[Link]('/') # MP8
var
Number, Number1, Number2, Count: integer;
begin
write('Enter an integer: ');
readln(Number1); // MP1
write('Enter another integer: ');
readln(Number2); // MP2
if Number1 > Number2 then // MP3
Number := Number1 div Number2
else
Number := Number2 div Number1; // MP4
Count := 0;
while Count <> Number do // MP5
begin
inc(Count);
if Count mod 10 = 0 then // MP6
write('X')
else
if Count mod 5 = 0 then // MP7
write('V')
else
write('/'); // MP8
end;
readln;
end.
C#
Enter an integer: 4
Enter another integer: 99
////V////X////V////X////
1
[9]
AverageWaitingTime/AverageQLength;
A. str
A. an array/list of characters
I. case
1
Max 1
1
[2]
Max 1
[1]
Max 1
Data composition
Several records of type Q_Node are combined to form the compound data structure
BuyerQ // (three) values/data items are combined to make a Q_Node // BuyerID,
WaitingTime and ItemsInBasket are combined to make a Q_Node // arrays;
2
Procedural composition
Some groups of subroutines need to be called in two places/more than one place //
the group of subroutines in Serving need to be called during the main simulation
time and also after buyers stop arriving;
Less code is required if only one compound subroutine needs to be called;
It improves understanding of code;
Data composition
Max 2
Stats[TOTAL_Q] has the length of the queue added onto it (in each time unit that
there is a non-empty queue);
Stats[TOTAL_Q_OCCURRENCE] is incremented in each time unit that there is a
(non-empty) queue;
DPT within 14.2 reference to an index such as TOTAL_Q rather than the data to which
it points, such as Stats[TOTAL_Q]
2
[3]
Need code to allocate buyers to different queues // the code that moves someone out of
the queue to be served would need changing // the code that moves everyone in the queue
up would need changing // the code that displays the contents of the queue would need
changing;
[2]
1. Constant declared and used as index (any index between 6 and 9) for
Stats;
2. If queue length not less than 5 ... // if queue length equals 5 ...;
3. ... Increment count of shuns in Stats data structure; R. if not within a
selection structure.
4. ... Output buyer number and message; R. if not within a selection structure.
5. ... If number of tills is less than MAX_TILLS ...; R. if not within a selection
structure.
6. .... Increment NoOfTills; R. if not within a nested selection structure.
7. In OutputStats output number of total shuns with suitable message;
(a) 2 marks for AO3 (design) and 6 marks for AO3 (programming)
16.
Marking guidance:
1. Identify the need for a loop or equivalent to initialise the till speeds/re-use
loop in ResetDataStructures;
2. Recognise need to use Tills data structure to calculate serving time in
CalculateServingTime;
Note: AO3 (design) points are for selecting appropriate techniques to use to solve
the problem, so should be credited whether the syntax of programming language
statements is correct or not and regardless of whether the solution works.
Sub QueueSimulator()
Dim BuyerNumber As Integer = 0
Dim QLength As Integer = 0
Dim Stats(9) As Integer
Dim Tills(MAX_TILLS, 3) As Integer ' Q17 MP4
Python 3
def ResetDataStructures():
Stats = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
Tills = [[0, 0, 0, 0] for i in range(MAX_TILLS + 1)] # Q17 MP4
for Count in range(MAX_TILLS + 1): # Q17 MP1
Tills[Count][3] = 7 - Count # Q17 MP3
BuyerQ = [Q_Node() for i in range(MAX_Q_SIZE)]
return Stats, Tills, BuyerQ
def QueueSimulator():
BuyerNumber = 0
QLength = 0
Stats, Tills, BuyerQ = ResetDataStructures()
Tills, SimulationTime, NoOfTills = ChangeSettings(Tills) # Q17 MP5 part
Alternative answer
def ResetDataStructures():
Stats = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
Tills = [[0, 0, 0, 7 - i] for i in range(MAX_TILLS + 1)] # Q17 MP1 MP4
# Q17 MP3
BuyerQ = [Q_Node() for i in range(MAX_Q_SIZE)]
return Stats, Tills, BuyerQ
def ResetDataStructures():
Stats = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
Tills = [[0, 0, 0, 0] for i in range(MAX_TILLS + 1)] # Q17 MP4
for Count in range(MAX_TILLS + 1): # Q17 MP1
Tills[Count][3] = 7 - Count # Q17 MP3
BuyerQ = [Q_Node() for i in range(MAX_Q_SIZE)]
return Stats, Tills, BuyerQ
def QueueSimulator():
BuyerNumber = 0
QLength = 0
Stats, Tills, BuyerQ = ResetDataStructures()
Tills, SimulationTime, NoOfTills = ChangeSettings(Tills) # Q17 MP5 part
type
Q_Node = record
BuyerID: string;
WaitingTime: integer;
ItemsInBasket: integer;
end;
TStats = array[0 .. 9] of integer;
TTills = array[0 .. MAX_TILLS, 0 .. 3] of integer; // Q17 MP4
TBuyerQ = array[0 .. MAX_Q_SIZE - 1] of Q_Node;
TData = array[0 .. MAX_TIME, 0 .. 1] of integer
procedure QueueSimulator();
var
BuyerNumber, QLength, SimulationTime, NoOfTills, TimeToNextArrival,
TimeUnit, ExtraTime: integer;
Stats: TStats;
Tills: TTills;
BuyerQ: TBuyerQ;
Data: TData;
begin
BuyerNumber := 0;
QLength := 0;
ResetDataStructures(Stats, Tills, BuyerQ);
ChangeSettings(SimulationTime, NoOfTills, Tills); // Q17 MP5 part
public QueueSimulator() {
int buyerNumber = 0, qLength = 0, simulationTime, noOfTills,
extraTime;
int[] stats = new int[10];
int[][] tills = new int[MAX_TILLS+1][4]; // Q17 MP4
1
[9]
(a) 3 marks for AO3 (design) and 9 marks for AO3 (programming)
17.
Mark
Level Description
Range
Note: AO3 (design) points are for selecting appropriate techniques to use to solve
the problem, so should be credited whether the syntax of programming language
statements is correct or not and regardless of whether the solution works.
[Link]($"{BuyerQ(i).BuyerID,57}{BuyerQ(i).WaitingTime,7}{Buyer
Q(i).ItemsInBasket,6}")
Next
[Link]("
*** End of queue ***")
Python 3
print(f"{i:>36d}{Tills[i][TIME_IDLE]:>5d}{Tills[i][TIME_BUSY]:>5d}
{Tills[i][TIME_SERVING]:>6d}")
print(" ** Start of queue **")
for i in range(QLength):
print(f"{BuyerQ[i].BuyerID:>57s}{BuyerQ[i].WaitingTime:>7d}
{BuyerQ[i].ItemsInBasket:>6d}")
print(" *** End of queue ***")
print("------------------------------------------------------------------------")
[Link]($"{BuyerQ[i].BuyerID,57}{BuyerQ[i].WaitingTime,7}
{BuyerQ[i].ItemsInBasket,6}");
}
[Link](" *** End of queue ***");
[Link]("------------------------------------------------------------------------")
}
1
[13]
Max 1
[1]
D (5 is a natural number);
E (5 is a rational number);
The 1 carry bits (or some similar notation) must be shown in the correct columns (or correct
sequence) but 0 carry bits can be omitted.
[2]
1 mark for binary addition of 00111011 (59) to 11100100 (-28) to give 00011111
//
2 marks for a correct final answer provided relevant working is shown and the working
uses two's complement in an attempt to solve the problem
A. If no other marks awarded, award 1 mark for correct conversion of 00111011 (59) to
11000101 (-59)
1 mark for correct integer part (or a numerator that produces the correct integer part when
an improper fraction shown)
25 // 32
1 mark awarded for working out the colour depth (5) used in the bitmap image if the correct
answer is not shown
[2]
If answer is incorrect then award 1 method mark for two or three steps from the list below or 2
method marks for all four steps.
• multiplying by 8000
• multiplying by 12 096
• dividing by 24 // multiplying by 24 on same side of = as the time value
• dividing by 96 000 // multiplying by 96 000 on same side of = as the time value
The following method points are equivalent to performing two of the method points in the list
above:
Max 2
[2]
Max 1
[1]
The letters/characters in the ciphertext will have the same frequency as their corresponding
letters/characters in the plaintext (allowing the correspondence to be worked out given
enough ciphertext);
A. The ciphertext is susceptible to frequency analysis
There are a very small number of possible keys (25 A.26) (so it can be cracked by brute
force);
If a single mapping is known then the remaining (25) can be easily calculated;
Max 2
[2]
Cache;
A. Cache controller
Max 2
[2]
R. Entire column if more than one value shown in any cell of that column.
[2]
1 mark for using AND and NOT gates to combine and invert subexpressions
• Award marks for working out until an incorrect step has been made.
• If, in any one step, a candidate is simplifying different parts of an expression
simultaneously award all relevant marks for this multiple stage but don't award any
further marks for working in any parts simplified incorrectly. Example, if the
expression P.P.(P+Q) + P.P.1 was changed to P.(P+Q) + P.0, the candidate would get
one mark for simplifying the first part to P.(P+Q) and could get further marks for
correctly simplifying this part of the expression further but should not be awarded
marks for simplifying the incorrectly changed part P.0 (i.e. to 0).
Award up to 3 marks for working. 1 mark per application of a technique that produces a
simplified expression. Of the 3 working marks award at most 1 mark for correctly
applying the Distributive Law to expand or introduce brackets.
Note: A simpler expression is one that is logically equivalent to the original expression but
uses fewer logical operators.
Example working 1:
Example working 2 :
[4]
Max 2
[2]
Max 2
[2]
Allows for more bits to be simultaneously processed (in the execution of a single
instruction) // Allows for more bits to be simultaneously transferred (within the processor);
[2]
• Terminating with 1 stored in R2 when the greater number was in R1 and 3 stored in
R2 otherwise.
Max 3 marks for programming if any syntax incorrect or program does not work correctly
under all circumstances
Example 1
CMP R1, R3
BGT r1bigger
MOV R1, R3
MOV R2, #3
B Done
r1bigger: MOV R2, #1
done: HALT
Example 2
SUB R2, R1, R3
CMP R2, #0
BGT finish
MOV R2, #1
B done
finish: MOV R1, R3
MOV R2, #3
done: HALT
Example 3
MOV R2, #1
CMP R1, R3
BGT done
MOV R1, R3
MOV R2, #3
done: HALT
[4]
Note: Accept references to data, instead of radio waves, if it is made clear somewhere in
the response that radio waves/signals/frequencies are being used.
Max 3
[3]
Mark
Level Description
Range
Ethical (society)
• Right to privacy eroded as your movements are tracked by the company.
• "Big Brother" society where your every move is monitored and analysed.
• Could it be used to track people in a good way, for example elderly or ill patients.
• Individuals in some jurisdictions will have had to agree for their phones to relay
signals in support of the company's network but they may not want to or even know
that they have agreed to such terms.
Legal
• As the tag moves internationally through different countries different laws will exist
about data collection and privacy.
• Computer Misuse Act would be applied in the UK to prevent unauthorised access to
the tag and the location data.
• General Data Protection Regulation (GDPR) affords protections to data subjects and
provides rights relating to access, accuracy, deletion, etc.
Cultural (subgroups)
• Older people might be very distrustful or fearful of this technology.
• This tag would only work in an area with a high number of phones / phone coverage,
therefore it is not suitable for rural locations or places with few phone users for other
reasons.
• Different societies may have different views on the privacy issues related to location
tracking.
• Higher read and write speeds than hard disks (because there are no moving parts, it
means they'd be more likely to keep up with the requests).
• Less prone to (terminal) failure from dropping/collisions/movement (because there
are no moving parts or joints), which means there is less likelihood of costs being
incurred from damaged drives.
• Generally more energy efficient, which can lead to reduced costs (operational and/or
cooling), provide a cooler / more comfortable operating environment, and be more
environmentally friendly.
• Generally small in physical size, which means that the amount of space required to
house them / operational cost can be reduced.
• More expensive (per bit) for the same amount of memory, (which means that the
company would be investing more in the purchase of the drives initially).
• The lifetime of a solid-state drive is relatively fixed, due to there being an approximate
maximum number of writes before it becomes unreliable/unusable.
[12]
Only users who know the SSID of the network can connect // users who do not know the
SSID cannot connect // makes it harder for a (malicious) user to connect unless they know
the SSID;
This was a question on the differences between global and local variables, and responses varied
2. in quality significantly. A common error was to refer erroneously to the calling of variables, which
was the most common means by which a mark point was missed. A minority of students, below
10%, provided answers of extremely good quality, which provided far more detail than needed for
either of the two-mark parts to this question. This may have had an impact upon available time in
subsequent questions.
Most students - almost 90% - demonstrated some knowledge of the advantages of using
3. structured programming, the most common single-mark attempt (on a three-mark question) being
to address understandability. This question was a good discriminator of ability.
Students generally performed very well on the pseudocode-to-code question, with almost 90%
4. securing at least six of the eight available marks in part (a). The most commonly dropped mark
point was the final one, which required an output built up of individual characters to appear on a
single line. Approximately half of the students failed to correctly implement this, with their
(otherwise correct) output being generated one character per line. This was the most common
reason for the screen capture mark not being awarded.
This question required identification of a data type and identification of a corresponding variable
5. from the skeleton code. Most students picked up all marks here, although there was a higher
level of success in identifying a data type (this being knowledge) than in identifying a variable
(this being basic analysis).
This question required identification of a data type and identification of a corresponding variable
6. from the skeleton code. Most students picked up all marks here, although there was a higher
level of success in identifying a data type (this being knowledge) than in identifying a variable
(this being basic analysis).
This question required identification of a data type and identification of a corresponding variable
7. from the skeleton code. Most students picked up all marks here, although there was a higher
level of success in identifying a data type (this being knowledge) than in identifying a variable
(this being basic analysis).
This was the first question that required students to demonstrate meaningful analytical capability
8. in the context of the skeleton program. This question asked about the purpose of a particular line
of code. Slightly more than 50% of students picked up the mark for this question, which would
have required close analysis of the skeleton code in advance of the examination.
The focus here was to explain why the skeleton code was designed and developed in a particular
9. way. Success in this question was likely to have been determined by the nature of any exam
preparation as much as by exam technique. Levels of success in this question were comparable
to the previous question, which had a similar focus.
This was a four-mark question on composition, with two marks available for a general
10. description, and two for addressing why composition was used in the skeleton program. This was
a departure from questions on previous papers, with students more likely to expect a question on
decomposition than on composition, and the quality of responses varied widely. A common
mistake was to describe subroutines or modularity in a more general sense, and only around 1%
of students gained full marks here.
This question addressed the purpose of a particular loop within the skeleton program, which
12. proved a challenge for most students, with just over 50% gaining no marks on this question. This
question required students to address why a particular piece of code was written the way that it
was written, and this proved to be a challenge.
This was another question that addressed the code from an analytical standpoint, the focus here
13. being 'how does this work' rather than 'why was this approach taken'. This proved to be a
challenge and exposed a commonly held misconception: although a variable was involved in the
calculation of an average the variable itself was not an input to the calculation – the variable was
an index to an array element which was then the input to the calculation. This additional level of
complexity explains why fewer than a quarter of students gained full marks.
Here, students were required to suggest - but not implement - a change to the skeleton program.
14. For students who would have been able to implement the change, this question presented a
different challenge in that they were required to explain rather than program, demonstrating a
different skillset.
The first question of section C, in which modifications were to be made to the skeleton code. Of
15. the students who attempted this question, over 90% picked up some marks, and more than 50%
of students secured over half of the marks. Given the nature of any programming task, a wide
variety of mistakes and misconceptions was demonstrated, but most fell into one of two
categories. One common mistake was, when opening more tills in the simulation, to write code
that would allow more tills to open than actually existed. The instruction in the question paper
that provides this constraint was "...until the maximum number of tills available have opened".
Another equal common mistake was to use hard-coded values rather than variables.
This question was aimed at varying the speed at which different tills in the simulation operated,
16. and great diversity of quality was demonstrated among student answers. The most commonly
missed mark required students to provide code that wasn't explicitly requested, but that was
indicated in the question by way of "...and any code you have changed or added to the Skeleton
Program". Students generally included the required change to the parameter list of a subroutine,
but did not include evidence of the updated call to the subroutine.
By this point in the exam, a significant number of students appeared to be running low on time.
More than half of students did not submit the screen evidence required for question part (b),
which was typically indicative of a partial attempt at a question.
No student gained full marks in the final question of the paper, although every mark point on the
17. mark scheme was awarded. The most commonly missing mark was one for which students were
required to call a subroutine under two conditions, whereas only one condition appeared in their
code.
Nearly 75% of students provided no screen capture evidence for part (b), which again was
indicative of time pressure.
70% of students were able to describe the set of real numbers, many identifying it as all rational
18. and irrational numbers or as all possible real-world quantities or numbers.
More than 90% of students selected the correct two lozenges on this question.
19.
66% of students selected the correct lozenge for this question with a common error selection
20. being ℝ, the symbol for real numbers.
These conversion questions were well answered with more than 90% of students gaining the
21. marks.
These conversion questions were well answered with more than 90% of students gaining the
22. marks.
This question on binary subtraction was answered quite well with more than half of students able
24. to achieve both marks. There were a number of responses where the students appeared to work
out the decimal values and subtract those which was not mark worthy.
This fixed-point binary question was well answered; a common mistake was to work out the
25. integer part incorrectly while correctly calculating the fractional part.
This definition question required the actual name of the additional information – "metadata" and
28. 80% of students could recall this definition.
This sound calculation question required students to work out the duration of the sound given the
29. file size, sampling resolution and rate instead of calculating the file size given duration, sampling
resolution and rate. Almost 70% of students achieved full marks with most of the rest managing
to gain some marks for working.
This understanding question was not well answered with many students referring to improved
30. quality even though this was stated in the question. The best answers simply stated there would
be "less quantisation error".
There was variable understanding of MIDI with only a quarter of students gaining both marks.
31. There were a number of answers which described MIDI as "sampled sound" or as using "more
samples". The most common single marks awarded were for examples of the data in MIDI
messages such as note or pitch. Fewer students stated that MIDI is made up of event messages.
This was a more familiar question with the need to explain an advantage of using MIDI. Almost
32. 70% of students gained the mark here with a common answer being that "it is easy to modify" – a
better answer in an explain question would be to describe what is easier to modify, eg the notes
are easy to edit / modify.
Almost 70% of students correctly applied the Caesar cipher to reveal the plaintext for this
33. question with the most common error being to apply the key in reverse, so de ciphering the
ciphertext letter W as A rather than S.
Most students scored at least one mark for their explanation of why Caesar ciphers are
34. vulnerable to being cracked. A common answer that did not gain marks was to simply state "they
can be brute forced" – of course many ciphers could be brute forced, but it is the limited number
of keys that makes Caesar ciphers especially vulnerable.
Half of students managed to identify two examples of hardware resources that are managed by
36. the operating system. A significant number identified I/O devices even though that example was
given in the question with others stating the management of a software resource such files.
This question was very well answered with over 75% of students gaining full marks. A few
39. students wrote operators in words rather than using the correct symbols and some missed the
brackets needed to indicate precedence.
This labelling question was answered correctly by about half of students. Some failed to state the
41. full names of the components although this was clearly stated in the question.
The description of the stored program concept – essentially a definition – was answered fully
42. correctly by around a third of students. Common incorrect answers referred to programs being
saved for later use or to save memory.
Half of students gained one mark for this question – a good answer would have identified a
43. memory address or a register number, but many answers identified a data type such an integer
instead, even though this was already given in the question.
In this question many students struggled to describe the advantage of having a large cache
44. memory although some did state that this memory was faster to access than RAM. There were
some misunderstandings about what is stored in cache with some students writing that programs
were stored there. Greater word length was less well covered with many students just equating
this to bus size. A good answer would be that more bits can be processed at the same time –
being accurate with the idea of bits is preferable to descriptions that contain the word
"information".
Only about 20% of students achieved full marks but many more achieved two or three marks.
45. Those that missed out on the top mark had often forgotten to make sure the larger value ended
up in R1. Students often used the mnemonic LDR instead of MOV when loading an immediate
value into a register, which is incorrect.
More than half of students achieved some marks on this question, but some struggled to
46. describe the process, often substituting the idea of data for radio waves, and simply stating that
data is transferred from the tag to the reader without describing the process in any detail.
Over half of all students achieved at least six marks on this long answer question. Common
47. errors here were stating the same point in several different places in the answer, concentrating
on just one aspect instead of considering a range of issues and writing about the possible legal
actions against the company if they did not comply with legislation, which does not answer the
answer. Some students included no, or very brief, details about solid state drives and so often
failed to compare these to the use of hard disks or other secondary storage devices.
Most students achieved at least one mark on this question, and it seems that these definitions
48. are quite well known. Bit rate was described better than baud rate, but students should be careful
to include a time period (eg seconds) in their answer as some just stated it was the number of
bits transmitted.
Fewer than 20% of students achieved both marks on this question and this was often due to their
49. forgetting the scenario and just making general comments about file sharing websites. The most
common correct response was to do with the set up being cheaper due to not needing a server.
This question was well answered in general although many students described it as being the
50. "name" of a wireless network, an accept point this year. Some students confused the idea of
SSID with MAC address filtering.
Around 25% of students achieved both marks for this question. A common mistake was not to
51. explicitly state that disabling the SSID broadcast hides the identifier from users searching for a
wireless network. Some students just mentioned increased security (which is stated in the
question) without describing why this might be the case.