WJEC A-Level Computer-Science PDF
WJEC A-Level Computer-Science PDF
TEACHERS’ GUIDE
The WJEC AS and A level Computer Science Units 1, 2, 3 and 4 of the qualification encourage
qualifications, accredited by Welsh Government for candidates to study a wide range of concepts and
first teaching from September 2015, are available to: principles of computer science and are assessed by
• All schools and colleges in Wales internal examination, with Unit 2 being on-screen
examination. Unit 5 encourages candidates to utilise
• Schools and colleges in independent regions such
as Northern Ireland, Isle of Man and the Channel their theoretical knowledge in a practical context by
Islands programming a solution to a problem.
The AS will be awarded for the first time in Summer The WJEC AS and A level Computer Science
2016, using grades A‒E; the A level will be awarded qualifications have been designed to give a broad
for the first time in Summer 2017, using grades A*‒E. scope of study opportunities that prepare candidates
The qualifications have been developed following for Higher Education or employment in a computer-
detailed consultation with experienced examiners, related field. Equally, they are relevant to students
teaching practitioners and with Higher Education. who continue their studies in an unrelated field, given
They offer a contemporary approach to the subject the widespread nature of computer science all areas
from both theoretical and practical perspectives. They of today’s society.
encourage students to apply the fundamental These qualifications have been designed to free
principles and concepts of computer science to a centres to concentrate on innovative delivery of the
wide range of situations by offering a broad course of course by having a streamlined, uncomplicated,
study that allows students the opportunity to analyse future-proof structure, with realistic technological
problems and to solve these problems using requirements.
computational thinking. Students are encouraged to
Additional ways that WJEC can offer support:
think creatively and innovatively in producing their
solutions to problems and to consider relationships • Specimen assessment materials
between different aspects of computer science as • Face-to-face CPD events
well as the impact of computer science on today’s • Examiners' reports on each question paper
global society. • Free access to past question papers and mark
schemes via the secure website
An emphasis on programming, mathematics and
• Direct access to the subject officer
algorithms underpins each unit, mirroring the ubiquity
• Free online resources
of programming in computer science and
• Exam Results Analysis
encouraging learners to think like programmers.
• Online Examination Review
The principal aim of the Teachers’ Guide is to The guide offers assistance to teachers, suggesting
support teachers in the delivery of the new WJEC possible classroom activities and links to digital
A level Computer Science specification and to resources (both our own, freely available, digital
offer guidance on the requirements of the materials and some from external sources) to
qualification and the assessment process. provide ideas for immersive and engaging lessons.
The guide is not intended as a comprehensive The guide will concentrate on those areas new to
reference, but as support for professional teachers WJEC subject specifications and those subject
to develop stimulating and exciting courses tailored areas where guidance has been requested most.
to the needs and skills of their own students in their
particular institutions.
ASSESSMENT STRATEGY : KEY EXAMINATION COMMAND WORDS (1 OF 2)
AO2 Apply knowledge and understanding of Draw Draw a representation of a dynamic binary tree with pointers
the principles and concepts of computer Apply using the following data:
science, including to analyse problems in Use Newport, Canterbury, Oswestry, Warrington, Rugby, Bath,
computational terms Derby [2]
Demonstrate
Calculate Giving examples, compare a balanced and an unbalanced
Convert
binary tree and evaluate their effectiveness to solve problems
by comparing the maximum number of comparisons to locate
Design an item in each of these trees. [4]
Show
Adapt (e.g. insert/delete) Calculate the effect of carrying out an arithmetic shift left by
Simplify two places on the eight-bit positive integer 00001111 and
state the effect of this operation on the number. [2]
Produce
Determine
Explain by…
ASSESSMENT STRATEGY : KEY EXAMINATION COMMAND WORDS (2 OF 2)
AREA OF STUDY
Parallelisation
Key Points:
• Learners should understand that parallel processing is a form of computation in
which many calculations are carried out simultaneously, operating on the principle
that large problems can often be divided into smaller ones which are then solved
concurrently.
• Questions on parallel processing will relate to AO1 and AO2.
Example
• Ask the class for five volunteers to help you demonstrate the advantages of
parallel processing.
• Explain to the class that the task of sorting a deck of playing cards by suit
(Clubs, Diamonds, Hearts and Spades), and in ascending order (from Ace to
King) can be completed much quicker by four people (a Quad-core processor)
than by one person (a Single-core processor).
• Shuffle two decks of cards, hand one deck to the lone learner and give a
quarter of the other deck to each of the learners in the group of four. The task
is to sort both decks of cards as quickly as possible.
• Ask the class to investigate situations where parallelisation is not always
quicker than a single-core processor.
• You could ask learners to research Amdahl's law:
1
𝑇𝑇(𝑛𝑛) = 𝑇𝑇(1)(𝐵𝐵 + 𝑛𝑛 (1 − 𝐵𝐵))
ADDITIONAL RESOURCES
AREA OF STUDY
Logical Operations
Key Points:
• Learners should understand that logical operators establish relationships between
statements that can be either TRUE or FALSE.
• There are six logical operators that students are required to know; AND, OR, NOT,
XOR, NAND and NOR.
• Questions on logical operators will relate to AO1 or AO2.
Example
• Tell learners that they are going to help demonstrate the meaning of each of
the logical operators AND, OR and NOT.
• Ask all the students wearing blue to raise their hands and count the number of
hands raised. Then ask all the students who are wearing blue AND a watch to
keep their hands in the air, ewer hands should be raised. Explain that using
the AND operator has narrowed the results.
• Ask all the learners wearing blue OR a watch to raise their hands, more hands
should be raised. Explain that using the OR operator has expanded the
results.
• Explain that logical operators can be used in combination. For example, ask
all the students who are NOT wearing a watch AND have brown hair OR are
wearing earrings to raise their hands.
• Explain that a raised hand can be represented as being TRUE or '1' and a
lowered hand as FALSE or '0' and so be used to represent each operator in a
truth table.
ADDITIONAL RESOURCES
AREA OF STUDY
Simplifying Boolean Expressions
Key Points:
• Learners should understand that different Boolean Identities can be used to simplify
Boolean expressions.
• Questions on Boolean expressions will relate primarily to AO2.
Example
• Explain to the learners that there are Boolean identities that they will need to
use in order to simplify Boolean expressions.
• Tell the class that identities can be explained easily when applied to real-life
situations. For example, the identity "A.A = A" seems complex, but when
assigned to a real-life situation such as 'it is raining' it becomes clear that the
sentence 'it is raining AND it is raining' means the same as 'it is raining'.
• The same can be said for the Boolean identity A.Ā = 0, where the sentence
'it's raining AND it's NOT raining' is impossible and so this is always false or 0.
• Select the image (left) for a list of example Boolean identities that you can
provide to the class and ask them to apply the examples to real-life situations
• Explain to the class that these Boolean identities will allow them to simplify
complex Boolean expressions.
ADDITIONAL RESOURCES
i) 1+A=1
ii) 0+A=A
iii) A+A=A
iv) 0.A = 0
v) 1.A = A
vi) A+B=B+A
Apply the following Boolean identities where A is "It's raining" and B is "I have an umbrella".
i) A.B = B.A
ii) A + (A.B) = A
iii) A.(A+B) = A
ADDITIONAL RESOURCES
AREA OF STUDY
The Von Neumann Architecture and Fetch-Execute Cycle
Key Points:
• Learners should be able to identify and describe the main components of Von
Neumann computer architectures.
• Learners should be able to describe the fetch-execute cycle, including how data can
be read from RAM into registers.
• Questions on the Von Neumann architecture and the fetch-execute cycle will relate
primarily to AO1.
Example
• Select the image (left) for detailed instructions and a diagram of an activity
that explains the fetch-execute cycle using volunteers from the class.
• Ideally you will require eight volunteers to perform this activity. If your class is
large enough you may choose to split the learners into groups of eight.
• In this example we are adding the numbers 6 and 5 together, but feel free to
add your own instructions and amend the activity in any way you wish.
ADDITIONAL RESOURCES
Assign a volunteer to each of the following roles and arrange them in the order shown in the diagram.
• Operation 1 (Op1)
• Operation 2 (Op2) Op4 Op3 Op2 Op1 R ALU
• Operation 3 (Op 3)
• Operation 4 (Op 4) CU
• Control Unit (CU)
• Arithmetic Logic Unit (ALU) M
• Register (R)
• Memory (M)
• Provide the learner assigned as 'Memory' (M) with two pieces of A4 paper, one marked "Memory
Location 1 = 6" and the other "Memory Location 2 = 5"
• In this example we will add the numbers 6 and 5 together:
1. 'Operation 1' loads Memory Location 1 into the Register.
2. 'Operation 2' loads Memory Location 2 into the Register.
3. 'Operation 3' instructs the ALU to add the two numbers together.
4. 'Operation 4' stores the contents of the Register back into Memory Location 1.
• The CU manages the execution of instructions. Each time the CU shouts "tick" an operation is
performed:
1. 'Operation 1' gives the CU the instruction to load the contents of Memory Location 1 into the
Register.
2. 'Operation 2' gives the CU the instruction to load the contents of Memory Location 2 into the
Register.
3. 'Operation 3' gives the CU the instruction to add the data in the Register together using the
ALU.
4. The ALU stores the result of the addition in the Register.
5. 'Operation 4' gives the CU the instruction to to store the result in the Register back into Memory
Location 1.
• Candidates need to understand that some operations may require more than one clock tick to
complete in different architectures.
UNITS: 1 AND 4 EXAM LEVEL: AS/A2
AREA OF STUDY
Sign and Magnitude and Two's Complement
Key Points:
• Learners should understand that there are two ways in which negative integers can
be represented within computer systems.
• Questions on sign and magnitude and two's complement will relate to AO1 and AO2.
Example
• Ask for eight volunteers from the class and say that they are going to help
demonstrate how negative integers can be represented using binary digits.
• Line up the volunteers at the front of the class and hand each of them a piece
of card with a '1' on one side and a '0' on the other. Explain that each
volunteer will represent a single bit.
• Ask the learners to represent the number 7 10 (00000111 2 ). Explain that when
negative numbers are represented in 'sign and magnitude' form, the most
significant bit is used to represent the sign of the number- '0' for positive and
'1' for negative numbers. Ask the students to represent the number -7 10
(10000111 2 ).
• Explain to the learners that there is a second method used to represent
negative integers, called 'Two's complement', a two-step process whereby all
of the bits in the binary number are 'flipped' (0s to 1 and 1s to 0) and 1 is
added, in this example -7 10 = 11111001 2 .
• Ask the learners to represent other negative integers using both methods.
ADDITIONAL RESOURCES
AREA OF STUDY
Binary Trees
Key Points:
• Learners should understand that binary trees are useful data structures for rapidly
storing and retrieving stored data.
• A binary tree has a root node, and every node has at most two children.
• Questions on binary trees will relate primarily to AO2.
Example
• Split the class into pairs and give each pair squares of card/paper numbered
10, 6, 15, 8, 5, 11, 18, stacked in that order with 10 on top.
• Explain that you are going to show a method of sorting the cards in a way that
will make it easier to find a specific number, but that you are NOT GOING TO
PUT THEM INTO NUMERICAL ORDER.
• Arrange the 10, 6, 15 and 8 cards as in the picture on the left. Discuss the
arrangement with the class.
• Ask learners to add the 5, 11 and 18 cards to the arrangement and to call out
random numbers. Discuss with the class where these random numbers would
be added to the tree.
• Ask learners to find card '18' by traversing the tree. Discuss how many
comparisons this took and compare this with the number of cards that would
have to be searched if the list were in ascending numerical order.
ADDITIONAL RESOURCES
AREA OF STUDY
Linked Lists
Key Points:
• Learners should understand that linked lists provide a logical order, without
providing a physical order to data items.
• Linked lists must contain 3 elements to work, a start pointer, pointers and nodes.
• Questions on linked lists will relate primarily to AO2.
Example
• Tell the class that you want them to arrange themselves in order of their date
of birth, using the concept of a linked list.
• Give each learner a marker pen and a piece of A4 paper with a number
indicating the node, e.g. if there are eight learners in the class number the
sheets 1‒8.
• Ask the learners to reveal their dates of birth to each other (but not to you)
and to mark on their sheets the pointers indicating the order of their dates of
birth. The eldest learner should add a start pointer to their sheet and a pointer
to the node of the next oldest, the next oldest learner should add a pointer to
the node of the next oldest and so on, until the youngest adds a pointer of 0 to
their sheet of A4.
• Ask each learner in the class to hold up their sheets of A4 paper. By using the
linked list you should be able to determine the order of the learners' dates of
birth. Explain to the class that they are now placed in logical order, even
though their physical order hasn't changed.
ADDITIONAL RESOURCES
AREA OF STUDY
Hash Tables
Key Points:
• Learners should understand that hash tables use a hash function to calculate an
index value for an array, in which items can be stored or found.
• Questions on hash tables will relate primarily to AO2.
Example
• Tell the class that searching for their first name on an attendance register is
not efficient, as their first names are not in any partiular order. So you want
them to arrange their first name in order using the concept of a hash table.
• Split the learners into groups and give each group a piece of A4 paper with a
hash function written on it, for example:
Length of first name MOD (size of group –1)
• Tell the members of each group that they will form a line (hash table) by
performing the hash function on their first name and standing in the calculated
position.
• As the hash function given will result in two learners having the same hash
number, there will be a clash and both will try to stand in the same place. Ask
the class how this problem could be resolved?
• You may wish to suggest different methods of resolving the problem, such as
the use of a larger hash table, allowing clashes and storing data in overflow
areas or using an improved hashing algorithm.
ADDITIONAL RESOURCES
AREA OF STUDY
Big O Notation
Key Points:
• Learners should understand that Big O notation is used in computer science to
describe the performance or complexity of an algorithm.
• Learners should know that Big O describes the worst-case scenario for the execution
time required and the space used (e.g. in memory) by an algorithm.
• Questions on Big O notation may relate to AO1, AO2 or AO3.
Example
• Big O notation can be a difficult concept to grasp. However, learners who are
confident in their understanding of algorithms may appreciate Big O notation
being explained in the context of different algorithms.
• Explain to the class that an algorithm that will always execute in the same
time, regardless of the size of the input data set, would be described as O(1).
• Select the image (left) for an example O(1) algorithm, examples of other
algorithms and a table displaying the time and space complexity of common
algorithms that you can use to discuss with the class.
• Ask the learners to carry out further research on other algorithms with
different runtime performance characteristics.
ADDITIONAL RESOURCES
An algorithm that will always execute in the same time, regardless of the size of the input data set,
would be described as O(1), i.e. this algorithm will take the same amount of time to execute if n =10,
100 or 1,000:
In this algorithm, where the runtime performance is O(N), the runtime will grow linearly in direct
proportion to the size of the dataset; each element in myarray will be checked once. So as n
increases so will the runtime ‒ hence this can be described as O(N).
ADDITIONAL RESOURCES
O(N2) represents an algorithm where the runtime performance is directly proportional to the number
of items in the data set squared.
Algorithms with a nested loop through the data set will always have a runtime performance of at least
O(N2). Further nested loops will result in a runtime performance of O(N3), O(N4) etc.
In this algorithm, “duplicate found” will always be output when i=j, but to avoid confusion by using a
nested if, it has been omitted as it is the nested loop that increases the runtime to O(N2).
The following table contains an overview of the time and space complexity of common algorithms:
AREA OF STUDY
Shortest-Path Algorithms
Key Points:
• Learners should understand that computer systems calculate the distance between
two locations by determining all possible routes and finding the shortest path.
• Dijkstra's algorithm is an example that finds the shortest path between two vertices
on a graph.
• Questions on Shortest-Path Algorithms will relate to AO1, AO2 and AO3.
Example
Note: In this example, we will use the terms 'crossroad', 'corridor' and 'building'.
However, in formal notation these terms are 'vertex', 'edge' and 'graph'
respectively.
• Ask each learner to take three different routes from the classroom to the main
reception or another location in the building.
• Learners should take a different corridor each time they reach a crossroad.
• Ask each learner to record carefully the number of steps taken for each route.
• When the learners have returned to the classroom ask them to each
determine the shortest path of all three routes travelled.
ADDITIONAL RESOURCES
AREA OF STUDY
Backus-Naur Form (BNF)
Key Points:
• Learners should understand that BNF is used to describe, unambiguously, the syntax
of a programming computer language, whereas natural languages (such as English
and Welsh) are normally ambiguous.
• Questions on BNF will relate primarily to AO1 or AO2.
Example
• Provide learners with the following numbers: +2.3409, -6.3089, 9.4000 and
+11.9901.
• Ask the class to discuss the format of the numbers above, they should note
that the numbers contain a sign or null, a digit string and a decimal point
followed by four digits.
• Ask the class to define the syntax for the leading sign or null (e.g. <sign> : :=
+|-|null) and for the decimal point (e.g. <dp> : : .)
• Explain the BNF notation used to define digits (e.g. <digit>: := 0|1|2|3|…|8|9).
• The number contains a digit string. Explain the concept of recursion, where a
digit string is determined in terms of itself (e.g. <digitstring>: :=
<digit>|<digit><digitstring>.
• Tell the class that they have now defined all of the components required for
the format provided in the example and that the syntax for the numbers shown
above is:
<number>::= <sign><digitstring><dp><digit><digit><digit><digit>
ADDITIONAL RESOURCES
AREA OF STUDY
Waterfall and Agile Approaches
Key Points:
• Learners should understand that the Waterfall approach has different discrete stages
arranged linearly, with each stage cascading down to the next. It is impossible to
begin one stage of the development until the preceding stage has been completed.
• Learners should understand that the Agile approach is an incremental approach to
development, in which developers start off with a simple project design, instead of a
huge document, and work on small modules at a time in an iterative way.
• Learners should appreciate that the Agile approach does not fully dismiss the
Waterfall approach, but rather aims to improve the process of systems analysis.
• Questions on Waterfall and Agile approaches will relate to AO1.
Example
• Tell the class that there are two distinct approaches to systems analysis and
development, namely Waterfall and Agile, and that they will need to be able to
differentiate between them.
• Inform the learners that the name ‘Agile’ was coined as a result of a meeting
between programmers, where lightweight software development methods
were discussed. Ask the learners to research the Agile manifesto.
• Select the image (left) for an overview of the characteristics of both the
Waterfall and Agile approaches.
• Hold a class discussion on the advantages and disadvantages of both
approaches.
ADDITIONAL RESOURCES
ADDITIONAL RESOURCES
Analysis
Design
Implementation
Testing
Evaluation
ADDITIONAL RESOURCES
Evaluation Analysis
Implementation Design
ADDITIONAL RESOURCES
AREA OF STUDY
Assembly Language
Key Points:
• Learners should be able to write simple programs in assembly language and
demonstrate how these programs could be executed.
• Learners should understand that an assembly language instruction set is specific to
the architecture of the CPU in the computer system.
• Learners should know that assembly language is converted into executable machine
code by a program called an assembler
• Questions on assembly language will relate primarily to AO2.
Example
• Explain to the class that there are many different assembly language
instruction sets available and that the Little Man Computer (LMC) instruction
set is one example.
• Tell the learners that invariably an assembly language mnemonic maps to a
machine code instruction and that some mnemonics are accompanied by an
operand (parameters), which contains the data on which operations are
carried out.
• Ask the learners to research the nine available LMC instructions,"Input" (INP);
"Output" (OUT); "Store" (STA), etc.
• Ask the students to write a simple program in LMC assembly language for an
algorithm that determines the highest value of two input numbers.
ADDITIONAL RESOURCES
AREA OF STUDY
Structured Query Language (SQL)
Key Points:
• Learners should understand the construction of SQL statements and be able to run
queries.
• Learners should know that SQL is a special-purpose programming language, used in
relational database systems. Learners may be required to write SQL during an exam.
• SQL has the features of a number of different programming paradigms, including 4th
generation languages and declarative languages. It also contains some procedural
elements.
• Questions on SQL will relate to AO2 and AO3.
Example
• Once the task is completed, you could ask the learners to devise their own
queries and write the necessary SQL statements.
ADDITIONAL RESOURCES
Pets Owners
3. The owner of Denzil has sold the cat to Davies. Write the SQL commands needed to update the
data.
Char(n) IN =
AREA OF STUDY
Lowest-Cost Routes
Key Points:
• Learners should understand that computer systems need to calculate the lowest cost
for sending data from one network node to another.
• Learners should know that cost can be expressed as the amount of time taken to
transfer data.
• Questions on lowest-cost routes will relate primarily to AO2.
Example
• Split the class into groups of six and give five students in each group one of
five pieces of paper labelled from 'A' to 'E'. The sixth person in each group
represents a data packet.
• Each person (node) in each group is connected to at least one other. Show
these connections with pieces of string. Attach a note that contains a number
to each length of string.
• Starting at 'node A' the 'data packet' must follow the string to calculate the
route costs between the nodes. The 'data packet' must find the lowest-cost
route to all the 'nodes'.
• Ask the learners to produce a forwarding table for the nodes to all other nodes
on the network.
ADDITIONAL RESOURCES
AREA OF STUDY
Cryptography Algorithms
Key Points:
• Learners should understand that there is a need for cryptography for purposes such
as the protection of confidential data being stored or transmitted over
communication networks.
• Learners should compare cryptographic methods and their relative strengths and
weaknesses.
• Questions on cryptography will relate to AO1, AO2 and AO3.
Example
ADDITIONAL RESOURCES