Edexcel GCSE Computer Science Questions and Answers
Edexcel GCSE Computer Science Questions and Answers
Edexcel GCSE Computer Science Questions and Answers
Learning outcomes 4
Referenced to 4
Student’s Book answers 4
2 Decomposition 6
Learning outcomes 6
Referenced to 6
3 Developing code 7
Learning outcomes 7
Referenced to 7
Student’s Book answers 7
4 Constructs 12
Learning outcomes 12
Referenced to 12
5 Data types and structures 13
Learning outcomes 13
Referenced to 13
Student’s Book answers 13
6 Input/output 15
Learning outcomes 15
Referenced to 15
Student’s Book answers 15
7 Operators 17
Learning outcomes 17
Referenced to 17
Student’s Book answers 17
8 Subprograms 19
Learning outcomes 19
Referenced to 19
Student’s Book answers 19
9 Binary 20
Learning outcomes 20
Referenced to 20
Student’s Book answers 20
10 Data representation 22
Learning outcomes 22
Learning outcomes
• Understand what an algorithm is, what algorithms are used for and be able to interpret algorithms
[flowcharts, pseudocode, structured English, written descriptions, program code]
• Be able to create an algorithm to solve a particular problem, making use of programming
constructs [sequence, selection, repetition] and using an appropriate notation [flowchart, written
description, program code]
• Be able to describe the purpose of a given algorithm and explain how a simple algorithm works
• Be able to identify the correct output of an algorithm for a given set of data
• Be able to identify and correct errors in algorithms
• Be able to code an algorithm into a high-level language
• Understand how the choice of algorithm is influenced by the data structure and data values that
need to be manipulated
• Understand how standard algorithms [quick sort, bubble sort, selection sort, linear search, binary
search, breadth first search, depth first search, maximum/minimum, mean, count] work
Referenced to
Specification 1.1
Student’s Book 1
Question
What is an algorithm?
Answer
Page 7
Question
• sequence
• selection
• iteration.
Answer
Sequence
• A sequence is a linear progression where one task is performed sequentially after another.
Selection
Iteration
Page 9
Question
Why would a computer programmer want to use a flowchart during a design process?
Answer
Solutions to simple programming exercises can be often designed and implemented by just sitting
down and writing code. It is, however, extremely difficult to write solutions to complex problems
using this approach and they are impossible to debug. For these reasons a structured design
process is preferred.
Page 19
Question
Complete the instructions on the flowchart by adding notes on how to play the game of snakes and
ladders.
Answer
Page 22
Question
What is a variable?
Answer
In computer programming, a variable is a storage location and name (called an identifier) which
contains some known or unknown quantity of information, a value.
Learning outcomes
Referenced to
Specification 1.2
Student’s Book 2
Learning outcomes
Referenced to
Specification 2.1
Student’s Book 3
Question
Answer
Page 39
Question
Answer
It makes it much easier to code and check as the language is easy to understand.
Question
Answer
Compilers were the first sort of translator program to be developed. The idea is simple – the
program is written in a high-level language and then the compiler translates it. You can then run
Page 40
Question
What is a comment?
Answer
Question
Describe the main reasons why programmers would wish to annotate or add comments to their
code.
Answer
Comments are usually added with the purpose of making the source code easier to understand.
Comments have a wide range of potential uses from adding descriptions of what is happening to
generating external documentation.
Page 41
Question
Describe the main reasons why it is important to choose descriptive names for variables.
Answer
Adding descriptive variable names improves the overall quality of the software. It makes it much
easier to modify and read the code.
Page 42
Question
<code> list(range(10))
</code>>>> list(range(10))
Answer
0123456789
Page 43
Question
Runtime errors occur whenever the program instructs the computer to carry out an operation that it
is either not designed to do or reluctant to do. As a consequence of the huge number of situations
that can be categorised within this area, there is equally a huge number of ways to write programs
that cause runtime errors.
Question
‘Run-time Error 339 component MCI32.OCX or one of its dependencies is not correctly registered:
a file is missing or invalid.’
Answer
Page 44
Question
Answer
The program will run successfully; however, it will not behave in the manner it was designed to. In
other words, it will simply produce incorrect results.
Question
A programmer is developing a new program. Describe the types of errors he or she should check
for.
Answer
There are basically three types of error that computer programmers encounter when writing
software. These are:
• Syntax errors
Syntax errors, or as they are sometimes known, format errors, are a big problem for those who are
new to programming. A syntax error occurs when the programmer fails to obey, usually through
inexperience, one of the grammar rules of the programming language that they are writing their
application in.
• Runtime errors
Runtime errors occur whenever the program instructs the computer to carry out an operation that it
is either not designed to do or reluctant to do.
• Logic errors
Out of the three common errors that occur in programming, logic errors are typically the most
difficult kind of errors to detect and rectify. This is usually because there is no obvious indication of
the error within the software.
Question
Answer
Verification is the testing of conformance and consistency of software against pre-decided criteria.
So it could be looked upon as asking the question: ‘Have we built the product right?’ This is usually
carried out via functional testing, where testing activities verify the specific actions or functions of
software code relative to an expected response.
When we check that an application has been correctly written against a specification that has been
agreed with the customer it is called validation. So it could be looked upon as asking the question:
‘Have we built the right product?’ Validation is commonly tested via non-functional testing that may
not have any relation to a specific function or user action.
Page 51
Question
Answer
1. Under normal conditions. The application is tested under normal working conditions and the
data that a coded solution is supplied with is within the anticipated range. This includes testing
under extreme conditions – the coded solution is provided with data that is within the operating
range but at its limits of performance.
2. Error behaviour. An application or program is provided with data that is outside of its limits of
performance. These particular tests try to break the application and to investigate if things occur
when they shouldn’t or vice versa.
Page 55
Question
Describe three essential safety practices when using computers on a daily basis.
Answer
Page 56
Question
Describe three main security measures required when using an internet-connected computer.
Use strong passwords, keep anti-virus software and security patches up to date, log out of services
when we finish using them, and be careful of the information we send in emails, texts or instant
messages. The only time anything is private in computing is when the computer is off line. Never
put any private information on the internet.
Page 57
Question
What is meant by the terms legal and ethical use in relation to computer software?
Answer
Legal use – illegally downloading copyrighted material like movies, music, publications, software
and video games.
Ethical use – it is unethical to access, view or collect confidential material and/or personal
information.
Learning outcomes
• Be able to identify the structural components of a program [variable and type declarations,
initialisations, command sequences, conditionals, repetition, data structures, subprograms]
• Be able to use sequencing, selection and repetition constructs in programs
Referenced to
Specification 2.1
Student’s Book 4
Learning outcomes
• Understand the need for and be able to select and use data types [integer, real, Boolean, char]
• Understand the need for and be able to select and use data structures [one-dimensional arrays,
two-dimensional arrays]
• Understand the need for and be able to manipulate strings
• Understand the need for and be able to use variables and constants
• Understand the need for and be able to use global and local variables
Referenced to
Specification 2.3
Student’s Book 5
Page 66
Question
Answer
Question
Answer
Integer data types contain whole numbers (not fractional numbers). Real data types contain
decimal numbers. Both types can be positive, negative, or zero.
Page 72
Question
Answer
A one-dimensional array in Python and PHP is a data structure that allows a list of items to be
stored with the capability of accessing each item by pointing to its location within the array.
Question
Answer
Two-dimensional arrays are a little more complex than one-dimensional arrays, but really they are
nothing more than an array of arrays. In other words, there is an array in one row and another in
the next row.
Page 78
Question
Draw a binary tree to show the possible outcomes of tossing a coin eight separate times in terms
of heads and tails.
Answer
Page 83
Question
Answer
Module scope – refers to when a variable is declared before and outside of any procedure within a
program module.
Procedure scope – refers to when a variable can be read and modified only from within the
procedure in which it is declared.
Learning outcomes
• Be able to write code that accepts and responds appropriately to user input
• Understand the need for and be able to implement validation
• Be able to write code that outputs information to a screen and understand and use Cartesian x/y
coordinates
• Be able to design and code a user interface [textual, graphical]
• Be able to write code that opens/closes, reads/writes, deletes, inserts, appends from/to a file
Referenced to
Specification 2.4
Student’s Book 6
Page 89
Question
Answer
Mouse
Keyboard
Touch screen
Microphone
Camera
Tracker ball
Page 90
Question
Answer
Screen
Printer
Speaker
Plotter
Data projector
Actuator
Page 92
Answer
There are a number of validation types that can be used to check the data that is being entered.
• Check digit: the last one or two digits in any code are used to check the other digits are correct.
• Format check: checks the data is in the specified format.
• Batch totals check: checks for missing records.
• Cardinality check: checks that a record has a valid number of related records.
• Length check: checks the data isn't too long or too short.
• Presence check: checks that some data has been entered into a field.
• Consistency check: checks fields to ensure data in these fields corresponds, e.g., If Title = ‘Mr’,
then Gender = ‘M’.
• Lookup table: looks up acceptable values in a table or array.
• Range check: checks that a value falls within a specified range.
• Spell check: looks up words in a dictionary or array.
Page 93
Question
List the values for each of the points in this chart. As an example, point_A is (–1,4).
Answer
B is (4, 3)
C is (–3, 3)
D is (–2, 1)
E is (2, 2)
F is (–3, –1)
G is (–1, –3)
H is (2, –2)
I is (1, –3)
K is (3, –4)
Learning outcomes
• Understand the purpose of and be able to use arithmetic operators [plus, minus, divide, multiply,
modulus, integer division]
• Understand the purpose of and be able to use relational operators [equal to, less than, greater
than, not equal to, less than or equal to, greater than or equal to]
• Understand the purpose of and be able to use Boolean operators [AND, OR, NOT]
Referenced to
Specification 2.5
Student’s Book 7
Page 100
Question
• When the door is open and it is cold outside I have to wear my coat.
• The central heating switches off when it is higher than 22 °C and switches on when it is less
than 18 °C.
Answer
Question
‘When the ground is dry and the sun goes down I water the plants. If the sun is hot and you water
the plants it burns their leaves.’
Answer
Page 101
Question
Which of the following data would you store as an integer and which would you store as a string?
• Steve
• 15
Which is the odd one out and what would you store it as?
Answer
String:
Steve
007
B901LK
marks
Integer:
2012
15
10.2 is the odd one out – This would be stored as Real because of the decimal point.
Page 103
Question
Answer
• Reusability: once a function is defined, it can be used over and over again.
• Many functions have already been written for you as preset functions.
• Functions also provide a tool for splitting systems into parts that each have a well-defined role.
Page 104
Question
Answer
Variables have a global or local ‘scope’. For example, variables declared within functions may be
only used in these functions. Global variables, variables declared outside, may be used anywhere
within the program. If a local variable is declared with the same name as a global variable, the
program will use the local variable to make its calculations within the current scope.
Question
Answer
Constants are data entities, the values of which cannot change during a program’s execution. As
their name implies, their values are constant.
Learning outcomes
• Understand the benefits of using subprograms and be able to write code that uses user-written
and pre-existing [built-in, library] subprograms
• Understand the concept of passing data into and out of subprograms [procedures, functions,
return values]
• Be able to create subprograms that perform generalisation
Referenced to
Specification 2.6
Student’s Book 8
Page 113
Question
Answer
Learning outcomes
Referenced to
Specification 3.1
Student’s Book 9
Page 119
Question
Answer
Machine language
Page 122
Questions
1 Write the binary code for the denary number 67. Use seven binary digits.
2 Give one reason why we use binary to represent data in computers.
3 Convert 2000 from decimal to hexadecimal.
4 Convert 3C from hexadecimal to decimal.
5 Convert 1010 0111 1011 from binary to hexadecimal.
6 Convert 7D0 from hexadecimal to binary.
7 If you shift a hexadecimal number to the left by one digit, how many times larger is the
resulting number?
8 State the denary representation of the hexadecimal number D48.
Answers
1 100 0011
2 Computer data can only have two states, on or off.
3 7D0
4 60
5 A7B
6 0111 1101 0000
Learning outcomes
Referenced to
Specification 3.2
Student’s Book 10
Page 126
Question
Answer
Image size is based on the number of pixels used to make up the image.
Page 127
Question
How does the resolution of an image affect the size of the file?
Answer
Page 130
Question
Answer
Although colour depth affects the amount of memory a picture requires, it does not affect the size
at which the image is displayed. It has a major effect on the quality of the image.
Question
Page 131
Question
Answer
There are 16 colours in the 4-bit pixel system. Colour depth or bit depth is the number of binary bits
that are required to define the colour of each pixel in an image. Images that are defined using
pixels are called digital images.
Page 134
Question
How does the sample rate affect the quality of the playback for an MP3 sound track?
Answer
Question
What effect does a high bit rate have on the number of sound files that can be stored on a CD?
Answer
Learning outcomes
• Understand and be able to convert between the terms: bit, nibble, byte, kilobyte (KB), megabyte
(MB), gigabyte (GB), terabyte (TB)
• Understand the need for data compression and methods of compressing data [lossless, lossy]
and that JPEG and MP3 are examples of lossy algorithms
• Understand how a lossless, run-length encoding [RLE] algorithm works
• Understand that file storage is measured in bytes and that data transmission is measured in bits
per second, and be able to calculate the time required to transmit a file and storage requirements
for files
Referenced to
Specification 3.3
Student’s Book 11
Page 136
Question
Answer
A megabyte is 1,048,576 bytes or (it is easier to remember as 1024 kilobytes). A terabyte is 1024
gigabytes or 1,048,576 megabytes.
Page 143
Question
Answer
File compression is a process of ‘compressing’ a file (or files) so that they use less disk space.
Compression works by reducing redundancy in a file's code. Compression software also allows
you to take many files and compress them into one small file.
Learning outcomes
Referenced to
Specification 3.4
Student’s Book 12
Question
If a shift key of 2 has been used, decipher the following Caesar cipher:
gzco swguvkqp
Answer
exam question
Learning outcomes
Referenced to
Specification 3.5
Student’s Book 13
Question
Data handling applications usually work through a DBMS. What is a DBMS and why is it used?
Answer
Page 157
Question
What type of business software lets users query data and generate forms?
Answer
Learning outcomes
Referenced to
Specification 4.1
Student’s Book 14
Learning outcomes
Referenced to
Specification 4.2
Student’s Book 15
Page 168
Question
Answer
The CPU is the brains of the computer. It controls resources and computes data.
Question
Define a system.
Answer
Page 171
Question
Answer
A computer chip, also called chip, is an integrated circuit (small wafer) made of semiconductor
material and embedded with integrated circuitry to create the CPU. Chips now comprise of the
processing and memory units of the modern digital computer.
Question
Answer
Question
Answer
Clock speed is the speed of the CPU, measured in megahertz (MHz) or gigahertz (GHz).
Page 174
Question
Answer
The speed of a computer processor, or CPU, is determined by the clock cycle, which is the amount
of time between two pulses of an oscillator. Generally speaking, the higher the number of pulses
per second, the faster the computer processor will be able to process information. The clock speed
is measured in hertz, typically either megahertz (MHz) or gigahertz (GHz). For example, a 4 GHz
processor performs 4,000,000,000 clock cycles per second.
Question
What are the main differences between the processors used in mobile devices and desktop
computers?
Answer
Mobile devices need a smaller and cooler running processor, which often has other functions too,
such as phone cellular data roles. This is because the device is small and has no space for cooling
fans. The clock speed is lower in mobile devices as this lowers the amount of heat they produce.
Page 175
Question
Answer
A dual-core processor is a CPU with two processors or ‘execution cores’ in the same integrated
circuit. Each processor has its own cache and controller.
Question
Answer
By creating virtual RAM on the hard drive it speeds up the computer. It is slower than real RAM but
helps with usable code needed at the time of running the program.
Question
Describe the difference between ROM and RAM and how these are used in a computer.
Answer
Read-only memory or ROM is a form of data storage that cannot be easily altered or
reprogrammed. Random access memory or RAM is volatile memory and the contents are lost
when the power is turned off. ROM is non-volatile and the contents are retained even after the
power is switched off. RAM is a form of data storage that can be accessed randomly at any time, in
any order and from any physical location. RAM is measured in megabytes and the speed is
measured in nanoseconds. RAM chips can read data faster than ROM chips.
Page 177
Questions
Answers
1 When the CPU accesses a particular location, the cache knows that it is likely to need to
access data that is close to that locality again.
2 Level 2 cache, also called secondary cache, is a memory that is used to store recently
accessed information. The goal of having the level 2 cache is to reduce data-access time in cases
when the same data has already been accessed.
Page 180
Questions
1 Explain why some data is stored in RAM when you are running a program.
2 What kind of computer memory is both static and non-volatile?
Answers
1 Random access memory, or RAM, most commonly refers to computer chips that
temporarily store dynamic data to enhance computer performance. By storing frequently used or
active files here, the computer can access the data faster than if it had to retrieve it from the far
larger hard drive. RAM is also used in printers and other devices.
Page 181
Question
Answer
RAM (random access memory) is a generic name for any sort of read/write memory that can be
randomly accessed. There are many different kinds of RAM. One of them is DRAM, which stands
for Dynamic RAM. SRAM – static random access memory – is another type of RAM.
RAM / SRAM requires six transistors to create a memory cell. DRAM requires one transistor to
create a memory cell.
Question
Answer
A memory stick uses flash memory, which uses a transistor that stays switched on (or off) when
the power is turned off. Flash memory can be erased and rewritten many times.
Page 182
Question
When your computer’s speed begins to drop, explain which element of memory is likely to be
almost full and describe how to improve the computer’s memory performance.
Answer
Some people incorrectly think that the clock speed of the CPU determines which computers are
‘fast’, but this only works when comparing CPUs in the same family. Providing the hard disk has
lots of room, when your computer slows down it is likely that the RAM is too small, so adding extra
RAM is the best way to speed up a computer. This will increase the speed of performance of all
tasks, such as web surfing and email, as well as the times it takes to open programs. It will also
allow more programs to run simultaneously without slowing down.
Question
Answer
There are four major memory storage levels, called the memory hierarchy. As we go down the list,
access times increase:
Question
Answer
The RAM (random access memory) does not store anything. It contains those items which are
being processed. If you are typing something, the typed material is stored in the RAM until you
save the file. RAM most commonly refers to computer chips that temporarily store dynamic data to
enhance computer performance. By storing frequently used or active files here, the computer can
access the data faster than if it had to retrieve it from the far-larger hard drive. RAM is also used in
printers and other devices.
Questions
Answers
1 This is achieved by putting some sections of RAM on the hard disk. It is slower (latency
times are extended) but the RAM capacity is extended as well, which helps with usable code
needed at the time of running the program.
2 Latency is a delay in transmitting data between a computer’s RAM and its processor.
Because RAM is not fast compared to the computer's processor, RAM latency can occur, causing
a delay between the time a computer's hardware recognises the need for a RAM and the time the
data or instruction is available to the processor. If the CPU requests data that is not stored in the
cache, then it will have to wait for the RAM to retrieve the data, causing latency problems.
Page 184
Question
Answer
Bus width refers to the number of bits that can be sent to the CPU simultaneously, and bus speed
refers to the number of times a group of bits can be sent each second.
Question
Answer
Question
Answer
Cache is much quicker than RAM but is smaller so a computer needs both.
Page 187
Question
Answer
Page 189
Question
Answer
Page 191
Question
Describe the benefits and drawbacks of a using traditional magnetic hard disk drive in a laptop
computer compared to a solid-state hard drive.
Answer
Traditional magnetic hard drives are much cheaper than solid-state drives, and have much more
storage space. But they are heavier and slower, and can develop faults if the laptop is dropped.
Learning outcomes
• Be able to construct truth tables for a given logic statement [AND, OR, NOT]
• Be able to produce logic statements for a given problem
Referenced to
Specification 4.3
Student’s Book 16
Learning outcomes
• Understand what an operating system is and its functions [file management, input/output,
resource allocation, process management, network management, user management]
• Understand that application software such as a web browser, word processor, spreadsheet or
apps are computer programs
• Understand how software can be used to simulate and model aspects of the real world and be
able to create software models
Referenced to
Specification 4.4
Student’s Book 17
Question
State three examples of operating systems which are used in different computer devices.
Answer
• Windows
• Windows CE
• Macintosh OS X (Mac OS X)
• iOS (iPhoneOS)
• Linux
• Android Phone
• Blackberry (RIM OS)
• Solaris (SunOS)
• AIX
• IOS (Cisco)
• XOS (Extreme Networks)
• IronWare OS (Foundry)
Question
Answer
The main purpose of an operating system is to allocate resources such as memory to programs
and control this allocation. It also manages the security of the computer system and data flow as
well as managing the running of one program at a time.
Question
Answer
A supercomputer is the fastest type of computer. Supercomputers are very expensive and are
employed for specialised applications. Examples of use include weather forecasting, animated
graphics, fluid dynamic calculations and nuclear energy research.
Learning outcomes
• Understand what is meant by high-level and low-level programming languages and assess their
suitability for a particular task
• Understand what is meant by a compiler and an interpreter
Referenced to
Specification 4.5
Student’s Book 18
Page 203
Question
What are the advantages of writing in high-level code compared to machine code?
Answer
High-level code is more understandable than machine code to humans, so it makes the process of
developing a program easier.
Page 204
Question
Answer
Assembly languages are a low-level programming language in which the sequence of 0s and 1s
are replaced by mnemonic codes. High-level languages are English-like statements and programs
written in these languages need to be translated into machine language before their execution
using a system software compiler.
Page 207
Question
Answer
Learning outcomes
Referenced to
Specification 5.1 and 5.2
Student’s Book 19
Page 211
Question
Answer
Any of the networks could potentially be used, depending on geographic location, security needs,
and budget. For example, if the users are geographically spread and require a secure system from
a range of locations, a VPN would be the best system.
Page 213
Question
Answer
Local Area Networks (LANs) are characterised by high-speed transmission over a restricted
geographical area. If the LAN is too large, signals need to be boosted.
Page 221
Question
Answer
A protocol is, in one sense, nothing more than an agreement that a particular type of data will be
formatted in a particular manner.
Question
What is an IP address?
Answer
An internet protocol address (IP address) is a numerical address assigned to each device (e.g.,
computer, printer) connected in a computer network.
Page 222
Question
Answer
Routers are small devices that join multiple networks together. A router connects two or more
networks.
Page 227
Question
What is a token?
Answer
A token is a protocol. Tokens are the method by which all networked computers set up a link
through some kind of networking equipment.
Learning outcomes
• Be aware of current and emerging trends in computing technology [quantum computing, DNA
computing, artificial intelligence (AI), nano technology]
• Be aware of the impact of computing on individuals, society and the environment
• Be aware of ethical and legal issues arising from the use of computers
• Be aware of ownership issues relating to computing [intellectual property, patents, licensing,
open source and proprietary software]
Referenced to
Specification 6.1
Student’s Book 20
Question
Answer
Encryption is the coding or scrambling of information so that it can only be decoded and read by
someone who has the correct decoding key.
Page 238
Question
Explain three instances in everyday objects that you personally use where time between failures
could be critical.
Answer
• Modern cars have computer-controlled steering, if the computer failed you could be killed.
• Nuclear power plants are all computer controlled. A failure could be catastrophic.
Page 239
Question
What is a bug?
Answer
Answer
Data redundancy: This is a strategy whereby important data is duplicated in a number of places
within the computer system so that if one area of the system breaks down or becomes corrupted
the data will not be lost. An example of this is running two hard disk drives in parallel, where they
both store the same data.
Software redundancy: This less common strategy tends to be used for safety critical applications.
The purpose of software redundancy is that it is very difficult to create programs that don’t contain
any bugs at all, and in the event of a bizarre fault an undetected bug may cause disastrous
consequences. Therefore, for critical software where failure cannot happen, there will be three
software routines in place – each written by independent programming teams – each producing the
same output when the same input is applied.
Page 240
Question
List five criteria that you would need to consider in developing a policy for backing up your data.
Answer
Page 242
Question
Describe the benefits and drawbacks to a rural school in moving to a cloud-computing model.
Answer
A small school in the countryside may have limited bandwidth. If this is the case, cloud computing
is not a good idea. The advantages of cloud computing are that students are able to access their
work anywhere, even at home; software will always be up to date; and the school will not need a
technician to manage its systems.
Question
Cloud computing has led to a major change in how we back up data, store information and run
applications. Instead of installing applications (often referred to as apps) on individual computers,
everything can be hosted in the ‘cloud’. Cloud computing has led to a major change in how we
back up data, store information and run applications. Instead of installing applications (often
referred to as apps) on individual computers, everything can be hosted in the ‘cloud’. Computer
programmers have to design a different way of limiting a client–server model. They also need to
use different programming languages.