Edexcel GCSE Computer Science
Question 1
What is an algorithm?
An algorithm is a set of specific steps for solving a category of problems.
Question 2
Briefly describe the following constructs:
Sequence: A sequence is a linear progression where one task is performed sequentially after another.
Selection: IF–THEN–ELSE is a decision (selection) in which a choice is made between two alternative courses of action.
Iteration: WHILE is a loop (repetition) with a simple conditional test at its beginning.
Question 3
Why would a computer programmer want to use a flowchart during a design process?
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.
Question 5
What is a variable?
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.
Question 6
What is Decomposition?
To divide a problem into smaller parts to solve easily
Question 7
What is a high-level programming language?
This makes the coding easier to both read and write. Enables a programmer to write programs that are independent and is closer to human languages and further from machine languages.
Question 8
Describe the main benefits to a programmer of using a high-level programming language.
It makes it much easier to code and check as the language is easy to understand.
Question 9
Describe the difference between an interpreter and a compiler.
Compiler converts the whole program in one go on the other hand Interpreter converts the program by taking a single line at a time.
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 the result. An interpreter is also a program that translates a high-level language into a low-level language, but it does it when the program is actually run. You can write the program using a text editor and then simply instruct the interpreter to run the program.
Question 10
What is a comment?
In computer programming, a comment is used to annotate code. It does not run.
Question 11
Describe the main reasons why programmers would wish to annotate or add comments to their code.
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.
Question 12
What does this function return?
<code> list(range(10))
</code>>>> list(range(10))
It would return a range of numbers till 10
0 1 2 3 4 5 6 7 8 9
Question 13
What is a runtime error?
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 categorized within this area, there is equally a huge number of ways to write programs that cause runtime errors.
Question 14
Explain the following statement:
‘Run-time Error 339 component MCI32.OCX or one of its dependencies is not correctly registered: a file is missing or invalid.’
There is a runtime error due to a missing file or piece of code.
Question 15
What is meant by a logical error?
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 16
A programmer is developing a new program. Describe the types of errors he or she should check for.
• 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: 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 17
Explain the differences between verification and validation.
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.
Question 18
Describe three essential safety practices when using computers on a daily basis.
Observe recommendations for the health and safety of the user.
Take care when handling hardware components.
Ensure that any computer settings can be reversed if necessary. Make use of IT security – passwords, anti-virus software, etc.
Question 19
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.
Question 20
What is meant by the terms legal and ethical use in relation to computer software?
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.
Question 21
Which of the following are integers:
6, –7.0, 2.6, 10, 4.5. 17. 17.0
6, –7.0, 10, 17.0
Question 22
What is the difference between integer and real data types?
Integer data types contain whole numbers (not fractional numbers). Real data types contain decimal numbers. Both types can be positive, negative, or zero.
Question 23
Explain the term one-dimensional array.
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 24
Explain the difference between one- and two-dimensional arrays.
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.
Question 25
Describe two kinds of scope used in programming.
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.
Question 26
List six input devices.
Mouse, Microphone, Camera, Keyboard ,Scanner, Joysticks
Question 27
List six output devices.
Printer, Monitor ,Speakers, Projectors ,Earphones, Webcam
Question 28
State four types of data validation.
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.
Question 30
Identify the Boolean expressions in the following:
• 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.
if door open AND cold outside = coat
temp>22=off temp<18=on
Question 31
Write the following as a Boolean expression.
‘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.’
if ground dry AND sun down = water plants
if sun hot AND water plants = burnt leaves
Question 32
Which of the following data would you store as an integer and which would you store as a string?
• Steve: String
• 15: Integer
• 007: String
• B901LK: String
• 2012: Integer
• 10.2: Float
• marks: String
Which is the odd one out and what would you store it as?
Question 33
State three reasons why programmers use functions.
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.
Question 34
Explain what is meant by the scope of a variable.
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 35
Why do we use constants in programs?
Constants are data entities, the values of which cannot change during a program’s execution. As their name implies, their values are constant.
Question 36
What are the two main roles of a function?
To reduce the amount of code needed.
To split systems into parts with well-defined roles.
Question 37
What is a program written using binary codes called?
Machine language
Questions 38
1 Write the binary code for the denary number 67. Use seven binary digits. 010000110
2 Give one reason why we use binary to represent data in computers. Computer data can only have two states, on or off.
3 Convert 2000 from decimal to hexadecimal. 7D0
4 Convert 3C from hexadecimal to decimal. 60
5 Convert 1010 0111 1011 from binary to hexadecimal. A7B
6 Convert 7D0 from hexadecimal to binary. 0111 1101 0000
7 If you shift a hexadecimal number to the left by one digit, how many times larger is the resulting number? 16 times larger
8 State the denary representation of the hexadecimal number D48. 3400
Question 39
What do we mean by image size?
Image size is based on the number of pixels used to make up the image.
Question 40
How does the resolution of an image affect the size of the file?
The more pixels the larger the file size.
Question 41
What metadata is stored with an image file?
Colour depth and pixels
Question 42
How many colors can be represented using a 4-bit color depth?
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.
Question 43
How does the sample rate affect the quality of the playback for an MP3 sound track?
The higher the sample rate the better the quality.
Question 44
What effect does a high bit rate have on the number of sound files that can be stored on a CD?
As the bit rate increases the file size increases.
Question 45
What is the mathematical difference between a megabyte and a terabyte?
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.
Question 46
What is file compression?
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.
Question 47
If a shift key of 2 has been used, decipher the following Caesar cipher:
gzco swguvkqp
exam question
Question 48
Data handling applications usually work through a DBMS. What is a DBMS and why is it used?
Database management systems, used to manage databases.
Question 49
What type of business software lets users query data and generate forms?
Structured query language (SQL).
Question 50
What is the purpose of the CPU?
The CPU is the brains of the computer. It controls resources and computes data.
Question 51
Define a system.
A system is the collection of hardware that makes up a computer.
Question 52
What is a chip and how is it attached to the computer?
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 53
What does the arithmetic logic unit (ALU) do?
It performs arithmetic and logic operations on data.
Question 54
What is clock speed and how is it measured?
Clock speed is the speed of the CPU, measured in megahertz (MHz) or gigahertz (GHz).
Question 55
What is a clock cycle and why is it important?
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 56
What are the main differences between the processors used in mobile devices and desktop computers?
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.
Question 57
What is meant by dual-core processor?
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 58
Describe the difference between ROM and RAM and how these are used in a computer.
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.
Question 59
Why is locality important when dealing with cache? 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.
Explain the purpose of level 2 cache (L2). 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.
Question 60
Explain why some data is stored in RAM when you are running a program. 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.
What kind of computer memory is both static and non-volatile? Read-only memory (ROM) consists of a programmed integrated circuit that doesn't lose data when powered down, making it non-volatile. But the data is also relatively static – it stays the same over time.
Question 61
What is the difference between DRAM and RAM?
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 62
What type of memory is a USB drive and how does it work?
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.
Question 63
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.
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 64
Explain a computer’s memory hierarchy.
There are four major memory storage levels, called the memory hierarchy. As we go down the list, access times increase:
Internal – processor registers and cache
Main – the system RAM and controller cards Online mass storage – secondary storage
Offline bulk storage – tertiary and offline storage.
Question 65
While a computer is working what is stored in RAM?
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.
Question 66
How does virtual memory free up RAM? 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.
Explain the term latency. 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 recognizes 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.
Question 67
In the world of computing, what is bus width?
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 68
What is the brain of the computer called?
The central processing unit (CPU).
Question 69
Why does a computer have both RAM and cache memory?
Cache is much quicker than RAM but is smaller so a computer needs both.
Question 70
Typically, what technology do hard disk drives employ as a storage mechanism?
Magnetic storage on a spinning disk.
Question 71
Why is there a limited number of tracks on an audio CD?
Storage size on a CD is limited so only a limited number of tracks can be stored.
Question 72
Describe the benefits and drawbacks of a using traditional magnetic hard disk drive in a laptop computer compared to a solid-state hard drive.
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.
Question 73
State three examples of operating systems which are used in different computer devices.
Windows, Windows CE, Macintosh OS X (Mac OS X), iOS (iPhoneOS)
Question 74
What is operating system software?
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 75
What is a supercomputer and what is it used for?
A supercomputer is the fastest type of computer. Supercomputers are very expensive and are employed for specialized applications. Examples of use include weather forecasting, animated graphics, fluid dynamic calculations and nuclear energy research.
Question 76
What are the advantages of writing in high-level code compared to machine code?
High-level code is more understandable than machine code to humans, so it makes the process of developing a program easier.
Question 77
Describe the differences between a high-level language and an assembly language.
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.
Question 78
What is a low-level programming language?
A low-level language is closer to how the computer works.
Question
Describe the type of network that is suitable for 10 or more users.
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.
Question 79
What is the difference between a LAN and a WAN?
Local Area Networks (LANs) are characterized by high-speed transmission over a restricted geographical area. If the LAN is too large, signals need to be boosted.
While LANs operate where distances are relatively small, wide area networks (WANs) are used to link LANs that are separated by large distances that range from a few tens of meters to thousands of kilometers.
Question 80
What is meant by a network protocol?
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 81
What is an IP address?
An internet protocol address (IP address) is a numerical address assigned to each device (e.g., computer, printer) connected in a computer network.
Question 82
What is the purpose of a router on a network?
Routers are small devices that join multiple networks together. A router connects two or more networks.
Question 83
What is a token?
A token is a protocol. Tokens are the method by which all networked computers set up a link through some kind of networking equipment.
Question 84
Explain the term encryption.
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.
Question 85
Explain three instances in everyday objects that you personally use where time between failures could be critical.
Modern cars have computer-controlled steering, if the computer failed you could be killed.
Aircraft are now fly-by-wire, and failure would be critical.
Nuclear power plants are all computer controlled. A failure could be catastrophic.
Question 86
What is a bug?
A bug is an error in a computer program.
Question 87
Explain two different types of redundancy in computing.
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.
Question 88
List five criteria that you would need to consider in developing a policy for backing up your data.
Amount of data to back up
How often to back up
Best type of storage media
How long to keep backups for
Manual or automatic backup.
Question 89
Describe the benefits and drawbacks to a rural school in moving to a cloud-computing model.
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 90
What are the implications of cloud computing to computer programmers?
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.
Question 91 (page 78)
Draw a binary tree to show the possible outcomes of tossing a coin eight separate times in terms of heads and tails.