# EDEXCEL IGCSE (9-1) COMPUTER SCIENCE

### Description

Note on EDEXCEL IGCSE (9-1) COMPUTER SCIENCE, created by CreativeKai 03 on 04/09/2019.
Note by CreativeKai 03, updated more than 1 year ago
 Created by CreativeKai 03 over 4 years ago
3842
1

## Resource summary

### Page 1

Chapter 1 : Problem Solving 1.1 Algorithms 1.1.1 An algorithm is a precise method for solving a problem. Algorithms can be displayed as written description, flowcharts and in pseudo-code. Written descriptions: Simplest way of expressing an algorithm. E.g. Fill Kettle with water. Turn on kettle. Place coffee in cup. Flowcharts: Can be used to represent an algorithm graphically. They provide a more visual display. Pseudo-code: A structured, code like language that can be used to describe an algorithm. E.g. SEND ‘Please enter the first number.’ TO DISPLAY            RECEIVE first number FROM KEYBOARD……etc. Variable: A ‘container’ used to store data. Values stored are not fixed. Identifier: A unique name given to a variable or a constant. Constant: A ‘container’ that holds a value that never changes. They have unique identifiers. Arithmetic operator: An operator that performs a calculation on two numbers.             1.1.2 Construct: A component from which something is built. Letters and numbers are the construct we use. Selection: A construct that allows a choice to be made between different alternatives. Represented using an IF….THEN….ELSE statement. This statement allows a choice to be made between two alternatives. Relational operators are also used to compare two values. Nested selection: consists of one or more IF statements placed inside each other. Two possible courses of action. Iteration: A construct that means the repetition of a process. An action is repeated until there is a desired outcome or a condition is met. Also known as a loop. Definite iteration: Used when the number of iterations, or turns of the loop, is known in advance. It can be set to as many turns as you want. It is count controlled. Indefinite iteration: used when the number of iterations is not known before the loop is started. The iterations stop when a specified condition is met. It is condition controlled. Logical operator: A boolean operator using AND, OR and NOT. Nested loop: A loop that runs inside another loop. The inner one executes all of its instructions for each of the outer loop. Sequence: An ordered set of instructions. Concatenation: The linking together of two or more items of information. 1.1.3,4,5,6 Purpose of an algorithm: When you look at an algorithm, expressed either in pseudo-code or as a flowchart, it is sometimes easy to see its purpose. A good way to follow the reasoning behind an algorithm and also to find any logic errors, is to use some sample data and check if the output is what you expect. Logic error: An error is an algorithm that results in incorrect or unexpected behaviour. Trace table: A technique used to identify any logic errors in algorithms. Each column represents a variable or output and each row a value of that variable. There are three types of error in computer programs: Syntax errors occur when algorithms are being converted into program code. Runtime errors occur when the program is executed. Logic errors are errors in the design of algorithms. Tracing the value of variable on an algorithm helps to identify logic errors. Understanding the order of precedence of arithmetic operators and the significance of brackets will help you to avoid making logic errors. 1.1.7,8,9 Arrays: An organised collection of related values that share a single identifier. All sorting and searching algorithms work on lists of data. Bubble sort: Uses an algorithm design that does not include any techniques to improve performance. When data is sorted, different items must be compared with each other and moved so that they are in ether ascending or descending order. Starts at one end of the list and compares each neighbouring number. If they are in the wrong order they are swapped and keeps doing this until the list is in ether ascending or descending order. This process is repeated until there are no swaps left to be done during a pass. Merge Sort: A sorting algorithm that divide a list into two smaller lists then divided these until the size of each list is one. Recursion: Repeatedly applying a method to the results of a previous application of the method. Uses the ‘divide and conquer’ method. Liner search: Works by checking each element to see if it matches the target. Repeats until a match is found or the whole list has been checked. A linear search os sequential. Binary search: Uses a ‘divide and conquer’ method. In a binary search the middle item in a list is repeatedly selected to reduce the size of the list to be searched. To use this method the list must be sorted into ascending or descending order. The choice of algorithm depends on the data that is to be processed. 1.2 Decomposition and abstraction 1.2.1 Computational thinking: The thought process involved in formulating problems and their solutions so that the solutions are represented in a from that can be effectively carried out by a computer. Decomposition: Breaking a problem down into smaller, more manageable parts, which are easier to solve. A technique of computational thinking. Abstraction: The process of removing or hiding unnecessary detail so that only the important points remain. A technique of computational thinking. Subprograms: A self-contained module of code that performs a specific task. It can be ‘called’ by the main program the it is needed. When designing a solution to a problem the inputs, outputs and processing requirements should be identified at the outset.

### Page 2

Chapter 2 : Programming 2.1 Develop Code A program is an algorithm that has been converted into program code so that it can be executed by a computer. A well-written algorithm should be free of logical errors and easy to code in any high-level language. Syntax error: An error that occurs when a rule of the programming language is broken. When algorithms are converted into programs the computer needs to be told what type of data is stored in each variable. Every programming language has a number of built-in data types. Data type: Specifies what kind of data it can hold. Common data types are integer, real, Boolean and character. The data type of a value determines the operations that can be performed upon it. Variable initialisation: When a variable is declared, the computer allocates it a location in memory. Initially this location is empty, so before a variable can be used it has to be given a value. Once a variable has been initialised an assignment statement is used to change its value. Assignment statement: The SET….TO command is used to initialise variables in pseudocode. Type coercion: The data type variable gets changed during program execution. The process of converting the value stored in a variable from one data type to another. Command sequence: A set of instructions that the computer executes one after another in order. Usually combined with loops ad selection statements. Selection: Used to create a branch in a program. The computer selects which branch to follow based on the outcome of a condition. Loops: Another name for an iteration. Used to make a computer repeat a set of instructions more than once. The four basic data types are integer, float/real, Boolean and character. Variable and type decelerations, command sequences, selection and iteration are four of the structural components of a program. 2.2 Making programs easy to read Techniques used to make programs easy to read and understand: Technique Description Comments Used to explain what each part of the program does. Descriptive names Using descriptive identifiers for variables, constants and subprograms helps make their purpose clear. Indentation Makes it easier to see where each block of code starts and finishes. Getting  the indentation wrong can result in the program not running. White space Adding blank lines between different blocks of code makes them stand out.   Proving readable code makes it easier to understand what a program does and how it does it. 2.3 Strings String: A sequence of characters. They can be letters, numbers, symbols, punctuation marks or spaces. String indexing: Each character in a string has an index number, with the first character at position 0. You can use the index to reference individual characters in a string. Length: LENGTH function used to find the number of characters in a string. Function: A subprogram that performs a specific task and can be used at any point in the program. String traversal: Using a loop to cycle through each character in a string. Can use a FOR loop. Concatenation: Involves joining two or more items of information together, Concatenating two strings produces a new string object. Type conversion: Performed when a string and a non-string are joined together. The computer converts the non-string into a string before joining the two strings together. Slicing: The process of extracting part of a string. String formatting: Used to control the way text is displayed on screen. 2.4 Data Structures Data structure: An organised collection of related elements. Arrays and records are two common data structures used in programming. One-dimensional arrays: A list of elements, each of which has a unique index value representing its position in the list. Two-dimensional arrays: A matrix of rows and columns resembling a table.Two indices are used, one to reference the rows and the other the columns. All the elements of a two dimensional array share the sam data type. All the elements in an array have the same data type. A record consists of a collection of fields. The values stored in a record can be of different data types. 2.5 Input/Output Validation: To check that the data entered by a user or from a file meets specified requirements. Any program that requires data entry should have appropriate forms of validation built in. Range check: Used to ensure that data is within a specified range. Length check: Used to ensure that data has a length within a specified range. Presence check: Used to ensure the user has entered some data. Look-up check: Used to ensure the data matches one of the values in a predefined list. Who user are required to choose from a list of options, their inout should be validated to ensure that their choice is valid. Large sets of data are normally stored in text files. The advantage of writing data to a file is that the data is not lost when the program is terminated. It can be read format he file whenever it is needed. 2.6 Subprograms Subprogram: A self-contained module of code that performs a specific task. Using subprograms reduces the complexity of programs and makes them easier to understand. There are two types of subprograms : functions and procedures. Procedures: A subprograms contains a set of statements that are executed when the procedure is called. Unlike a function, a procedure does not return a value to the main program. Functions: A subprogram that returns a value to the main program. Abstraction: The process of removing or hiding unnecessary detail so that only the important points remain. The two variables that store the random number generated by the function: Local variable: Can be accessed only from within the subprogram in which it is created. Global variable: Can be accessed from anywhere in the program, including inside subprograms. Built-in functions: Functions that are provided in most high-level programming languages to perform common tasks. Procedure: A subprogram that does not return a value to the main program. Parameters: Values that are passed to a subprogram when it is called. 2.7 Testing and evaluation Testing: This is the only way ensuring that the program functions correctly and meets all of the specified requirements. Evaluating programs: Need to able to identify the strengths and weaknesses of the programs as well as those created by other programmers and identifying areas for improvement.1 Runtime errors: An error that occurs while the program is running - the operation the computer is asked to do is impossible to execute. Logic errors occur when there is an error in the logic of the code, causing the program to produce an unexpected result. Syntax error: Occurs when part of the code breaks the rules of the programming language. Runtime error: Occurs while the program is running and it is asked to do something that is impossible. Truth tables: Can be used to manually trace the execution of an algorithm, allowing you to track the changes in variable values.

### Page 3

Chapter 3: Data 3.1 Binary Binary: Information represented by only two values. There are no communication errors or misunderstandings because there are no small differences. It is needed to represent data and program instruction because of the way in which computer work. A system with separate states is said to be digital and if there are two states it is binary. Digital: Information represented by certain fixed values. A system such as this, where there is a continuous range between two values, is said to be analogue. Analogue: Using signals or information represented by a quantity that is continuously variable. Representing information There are only two digits, 1 and 0, bu to represent the symbols in text there must be at least 52 separate items of information - 26 lower-case and 26 upper-case letters. In a similar way the two binary digits (bits) can be combined into groups. Binary digits: The smallest unit of data that is represented in a computer. It has a single binary value, either 1 or 0. Number systems Binary is a number system based on two digits, 0 and 1. The difference is that the denary system works in powers of 10, whereas the binary system uses powers of 2. Denary system Every digit has a value and the one to the ;eft has a value 10 times higher that the one to to the right. Binary system The binary system has similar place value but they increase by powers of 2. Byte: The basic combination of bits used to represent an item of information. A byte typically consists of 8 bits. Binary arithmetic Binary numbers can be manipulated in the same way as denary ones. Denary addition When addition is performed n denary, a ‘carry over’ is used if the result is greater than 9. Binary addition works int he same way but a ‘carry over’ is needed if the result is greater than 1. Binary addition We are adding eight-bit numbers and this has caused a problem. All eight bits have been used and the 1 that was carried over in the last column has nowhere to go - it has been carried out. Therefore the result of the calculation would be wrong. This is called an overflow error. This condition occurs when a calculation produces a result that is greater than the computer can deal with or store. The processor is informed that an error has occurred. Signed and unsigned numbers When an integer is indicated as being positive or negative it is described as being signed. Sign and magnitude In a multiple-bit binary number, the left-most it, the one with the greatest value, is called the most significant bit (MSB). We can use this to represent signed integers. Two’s complement The most common method used to represent signed integers in modern computers is two’s complement. This method works on the principle above-the result of any number added to its negative equivalent should be zero.

### Page 4

Computers 4.1 Machines and computational modelling The input-process-output-model Input: To enter data into a computer. Process: To change the meaning or format of some data. Output: To display or output data that has been processed (or has been stored). A computer is a machine that takes some kind of input from its surroundings, processes the input according to given rules, and provide some kind of output. Computational models: Sequential: One in which instructions are executed one after another. There may be branches in the program, but the general principle is that each instruction follows on from the previous one. Parallel: One in which each program instruction is executed simultaneously on multiple processors in order to get the results faster. Using multi-cores in processors is an example of parallel computing. It is by using parallel processing that super computers are getting faster and faster. Multi-agent: one in which computer systems co-operate and co-ordinate with other agents to achieve their goals. Swarm robots are examples of multi-agents. 4.2 Hardware Stored programs: the von Neumann model Von Neumann architecture: Computer design in which the program is stored in memory with the data. Central processing Unit (CPU): hardware device that carries out the processing in a computer. Random-access memory (RAM): A temporary store for data and instructions. Bus: A group of connections between devices in a computer Fetch-decode-execute cycle: Sequence of steps carried out repeatedly by a CPU.         Hardware components of a computer system RAM and ROM Writing: When the CPU sends data to memory to be stored at a given address. Reading: When the CPU retrieves the data stored at a given address. Memory address: A number that uniquely identifies a (memory) storage location. RAM is described as volatile (memory that is erased when the power is turned off). Read-only memory (ROM): Memory that cannot be altered and is not lost when the power is turned off. Is non-volatile (memory that is not lost when the power is turned off). Cache memory Third kind of memory. Small amount of fast, expensive memory that is used in-between two devices that communicate at different speeds. Cache: memory used to make up for the difference in speed between two internal components. Fetch-decode-execute: In detail Arithmetic/logic unit (ALU): The part of the CPU that performs calculations and logic operations. Register: A storage location inside the CPU used to hold an instruction, an address or other single item of data. Control unit: The part of the CPU that organises the actions of the other parts of the CPU. Clock: An electronic device inside a CPU that ‘ticks’ at regular intervals and is used to synchronise the actions of the other parts of the CPU. Secondary storage: Any kind of permanent storage to which the contents ROM/RAM are copied (usually a hard disk, optical or solid-state device). Magnetic storage: Secondary storage that works by magnetising parts of a substance as north and south poles to represent binary 1s and 0s. Optical storage: Secondary storage that works using differences in light reflection from a material. Solid-state storage: Secondary storage that works by storing charge. Cloud storage: Secondary storage often belonging to a third party, that is accessed via a network, usually the internet, and do is not in the same physical place as the machine’s RAM/ROM. Files stored ‘in the cloud’ can be accessed from anywhere via an internet connection. Virtualisation: Any process that hides the true physical nature of a computing resource, making it look different, usually to simplify the way it is accessed. Embedded systems: Are cheap, low-power computers that are dedicated to a specific task. 4.3 Logic Truth tables: A table showing all possible combinations of the inputs and outputs of an operator. Boolean: Something that can take only the values True or False; named after English mathematician George Boole. Logic circuit: An electronic circuit that has inputs and outputs that follow one of the Boolean operators. AND, OR and NOT are called logical or Boolean operators. They are used in selection statements such as IF. The order of precedence is: brackets, NOT, AND, OR. 4.4 Software Software: The set of programs run by a computer system. Application software: Software that performs a task that would otherwise be done by hand, perhaps with pen and paper. Operating software: Software designed for particular hardware and which manages other programs access to the hardware. Utility software: Software that does a useful job for the user that is not essential to the operating system and not the reason for using a computer in the first place. Operating system Scheduling; The algorithm that the OS uses to allow each running process to use the CPU. Paging: The algorithms the OS uses to move programs from RAM to disk and back again when needed once main memory is full. Concurrent: Processes that run apparently at the same time are described as being concurrent. Authentication: The process of proving to a computer system who you are. User interface: The way the user interacts with the operating system. Back-up: A copy of files in another location so that they are still available if the original copy is damaged or lost. Defragmenter: A utility that moves file clusters on a disk so they are closer to each other in order to speed up disk access. Virus: Software that is designed to make and distribute copies of itself, usually for a malicious purpose. Spyware: Software, possibly a virus, that is designed to be installed secretly on a computer and record private information as the user enters it. Firewall: A utility that controls program access to the network, both incoming and outgoing. Computer models Heuristic: A type of algorithm capable of finding a solution to a problem quickly and easily, by using a combination of trial and error and educated guesswork to cut corners and eliminate less likely alternatives. Monte Carlo methods: Carrying out a statistical analysis of a number of random samples in order to obtain approximate solutions to a problem. Neural methods: Processing information in a similar way to human brains and learning and adapting over time. 4.5 Programming language Low-level programming language: A programming language that is closely related to the CPU’s machine code. Instruction set: The list of all possible commands a particular CPU knows how to carry out. Machine code: The binary codes representing each of the instructions in the instruction set. Translator: A program that converts source code into machine code.  Source code: The text of the program that a programmer writes. Assembly language: A low-level language written using mnemonics. Mnemonic: A short, simple, acronym that represents each of the instructions in a CPU’s instruction set. Compiler: A translator that converts high-level language source code into object code, often machine code. Interpreter: A translator that converts high-level language source code into object code, often machine code. Humans program computers mostly using a range of high-level languages, but sometimes in assembly language.

### Page 6

Chapter 6: The bigger picture 6.1 Computing and the environment Some of the materials used in the manufacture of computer components are non-renewable and in short supply. Others are dangerous and pose a risk to human health. The Restriction of Hazardous Substances (RoHS) Directive restrict the use of hazardous materials in computing technology, forcing producers to find more environmentally friendly alternatives. Computing technology consumes huge amounts of energy. Data centres are on of the worst culprits. Energy efficiency measures and use of renewable energy can significantly reduce the carbon footprint of computing technology. There is a possible health risk, especially for children, from exposure to the electromagnetic fields generated by wireless devices, such as smartwatches and smart clothing. Unregulated disposal of e-waste in landfill sites poses a significant threat to the environment. The Waste Electrical and Electronic Equipment (WEEE) regulations set targets for responsible recycling of e-waste. Computing technology is helping to preserve the environment in a number of ways, including monitoring and modelling climate change, conservation and smart energy. 6.2 Privacy Computing technology enables organisations to gather, store and analyse vast quantities of personal information about the people they come into contact with. Individuals give away all sorts of personal information about themselves online.

### Similar

Types and Components of Computer Systems
Input Devices
Output Devices