A2 24 Homework Week 7
A2 24 Homework Week 7
[1]
(b) In the line:
[1]
(ii) Name the register in which the result of this line is stored.
[1]
A processor executes this program following the Fetch-Decode-Execute cycle. To do this it needs to make use of
registers.
One of the registers used is the Program Counter (PC). Ordinarily it would be incremented by one each cycle.
(i) Identify an instruction in the Little Man Computer program shown in Fig.2 that would cause the PC to change
in a different way.
[1]
(ii) State which register the contents of the PC would be copied to in order for the processor to access the next
instruction.
[1]
Describe two functions an operating system might be expected to carry out on the console.
[4]
(b) Linux is open-source.
Explain how Linux being open-source would benefit the games company.
[2]
(c) As well as a CPU the console contains a GPU for 3D graphics. Explain why a GPU is more suitable than a CPU
for this task.
[3]
[2]
(b) Give one advantage of using RAM as storage in this way.
[1]
(c) The utility periodically copies what is in the RAM drive to secondary storage, such as a hard disk. Explain why
this is necessary.
[2]
[9]
ASCII
EBCDIC
Write a function that given the denary value of an EBCDIC uppercase letter, returns the denary value of an
ASCII uppercase letter. If a value is entered that doesn't correspond to an uppercase EBCDIC letter the function
should return –1.
e.g.
[5]
[2]
Advantage
Disadvantage
[2]
(c) Users can build up playlists of their songs. Another table is created called Playlist.
Explain why a third table which we shall call PlayListEntry is needed. You should use an ER diagram to
illustrate your answer.
[4]
The company removes all the songs belonging to RandomBits from their service.
(i) Identify the law with which the company are complying.
[1]
(ii) Write an SQL statement that will remove all songs by RandomBits from the table Song.
[2]
(iii) When the songs have been removed, explain what must happen to the table PlayListEntry if the
database is to retain its referential integrity. (You are not expected to write the SQL to do this).
[1]
8(a) A software development company is building an operating system for a mobile phone that is in the process of
being designed.
[1]
[6]
the site's owner wants to add the photo UKstamps.jpg in place of the comment
The site uses styling set out as attributes in tags rather than a linked CSS file.
[1]
[1]
[4]
11 Julie wants to earn her living by being a successful app developer.
Before she even writes any code, she thinks it would be sensible to find out some basic facts about app
development and the market for apps in order to maximise her chances of being successful.
State four items of data that she could obtain in order to make a sensible choice of an app development project.
[4]
Identify three pieces of information that would need to be researched in order to design this simulator.
[3]
(i) Show the result of when the procedure is called with: . Show your working.
[4]
:
(ii) Show the result of when the procedure is called with . Show your working.
[1]
(i) Explain the problem that would be caused in this algorithm if was a global variable.
[3]
Describe how the algorithm could be changed to prevent the error identified in part (i)
[1]
14(a) Four in a Row is a game where two players drop coloured discs into a grid, with the aim to get four of their own
colour in a row.
Each player is given a set of coloured discs, red (R) or yellow (Y). The players take it in turns to drop their disc
into a column in the grid. The disc drops down to the lowest available space in that column.
The grids below (Fig 7.1 and 7.2) show what happens when the yellow player drops a disc into column 2:
(i) Explain how decomposition can be used in the design of the game Four in a Row.
[2]
(ii) The program will allow the players to take it in turns to make a move. Each move will be checked to ensure it
is valid (i.e. the column is not already full). After each move the program will check if that player has won by
The programmer has developed a top-down design for the program as shown in the structure diagram Fig
7.3.
Add one further level to the structure diagram, by dividing the sub-modules ‘Player move’, ‘Check valid’ and
‘Check won’ into further sub-modules.
[3]
(iii) The structured design for this program makes use of pipelining. Describe one example of where pipelining
could be used in this program.
[2]
Using pseudocode, write a function that takes as input the player whose turn it is, and the column number they
select as their turn. The function either:
Annotate your pseudocode with comments to show how it solves the problem.
[6]
(c) After a player makes their move, the program needs to check if that player has won (i.e. the player has four discs
in a row).
Subroutines have already been written to check if the player has won vertically, or diagonally.
[6]
(i) * The programmer is writing a new version of the game, where each player removes one disc from the
bottom row of the grid before a new move is made.
In the example below, player R removes one disc from column 2 (Before) and places one in column 4
(After).
The programmer has to decide whether to continue to use a 2D array, or produce an array of queues.
Evaluate the use of a 2D array versus an array of queues to perform this action.
(ii) Explain why a stack would not be an appropriate data structure for this revised game.
[2]
(iii) A procedure needs to be written to remove the disc from the chosen column. The procedure will:
have the column the disc is being removed from as a parameter
move each disc in that column down to the bottom of the grid
replace the top space with an empty string ("")
Complete the algorithm below.
Explain how the programmer could make use of a tree structure, using a heuristic approach in the development
of the computer player.
[7]
Total 3
Total 2
3 a Provide a user interface (1 – AO1.1) for 4 1 mark for each correct identification
the user to load games etc. (1 – (AO1.1) up to a maximum of 2 marks.
AO1.2).
Control hardware (1 – AO1.1) such as 1 mark for each valid description (AO1.2)
graphics card, games controllers etc. up to a maximum of 2 marks.
(1 – AO1.2).
Act as a platform from which software
can be run (1 – AO1.1) such as games
and apps (1 – AO1.2).
Control access (1 – AO1.1) so that
different users can access the system
(1 – AO1.2) and have their own data
such as scores and achievements (1 –
AO1.2).
b This means that a lot of the core 2 Up to 2 marks for a valid explanation.
functionality they need is already
available (1) so the company just has
to make amendments / additions
specific to their system (1) saving time
and money (1).
Total 9
4 a – A piece of software … 2
– … with one purpose …
– usually to do with the upkeep /
maintenance of a computer.
(1 per –, max 2)
Total 5
5 Mark Band 3–High Level (7–9 marks) 9 AO1: Knowledge and Understanding
The candidate demonstrates a thorough
knowledge and understanding of Magnetic The following is indicative of possible
and Flash storage. The material is factors / evidence that candidates may
generally accurate and detailed. refer to but is not prescriptive or
exhaustive:
The candidate is able to apply their – Magnetic hard drives work by magnetic
knowledge and understanding directly and patterns being read off platters that
consistently to the context provided. mechanically spin at high speeds.
Evidence / examples will be explicitly – Flash hard drives use memory chips.
relevant to the explanation. These can have their contents erased and
subsequently overwritten when an
The candidate provides a thorough electrical charge is applied.
discussion which is well balanced. – Magnetic hard drives are cheaper per GB
Evaluative comments are consistently and tend to be sold in much higher
relevant and well-considered. capacities than flash hard drives.
– Flash hard drives tend to have much
There is a well-developed line of reasoning higher read / write speeds than magnetic
which is clear and logically structured. The hard disks.
information presented is relevant and – Flash hard disks have no moving parts
substantiated. and therefore tend to have lower power
consumption and are not affected by their
Mark Band 2–Mid Level (4–6 marks) device moving.
The candidate demonstrates reasonable
knowledge and understanding of a
Magnetic and Flash based storage; the AO2.1: Application
material is generally accurate but at times
underdeveloped. The selected knowledge / examples should
be directly related to the specific question.
The candidate is able to apply their The following is indicative of possible
knowledge and understanding directly to factors / evidence that candidates may
the context provided although one or two refer to but is not prescriptive or
opportunities are missed. Evidence / exhaustive:
examples are for the most part implicitly
relevant to the explanation. – Many games tend to incorporate a lot of
media and as such a keen gamer is likely
The candidate provides a sound to need a lot of storage space.
discussion, the majority of which is – Games are fast paced and often
focused. Evaluative comments are for the competitive. High loading speeds can be
most part appropriate, although one or two beneficial.
opportunities for development are missed. – High performance is often important to
gamers and as such will pick highest
There is a line of reasoning presented with performing components.
some structure. The information presented – Hybrid approaches exist which offer ‘the
is in the most part relevant and supported best of both worlds’.
by some evidence. – Magnetic hard drives can be noisy (due
to parts moving at high speed), this can be
Mark Band 1–Low Level (1–3 marks) undesirable and distracting whilst gaming.
The candidate demonstrates a basic Conversely flash drives operate silently.
Total 9
Total 5
c – would have a 4
many to many relationship
– This is not allowed
– Adding a table between them resolves
this
– Diagram to illustrate this.
(1 per –)
ii 2
(1
mark per –, max 2)
Total 12
Total 7
Total 2
Total 4
Total 4
Total 3
ii 1 from 1
Total 13
e.g.
iii 1 mark for the example, 1 mark for 2 Accept any valid example
explanation of why it is pipelining
e.g.
Example pseudocode
Example pseudocode:
0 marks
No attempt to answer the question or
response is not worthy of credit.
ii Max 2 2
e.g.
Total 40