EDEXCEL IGCSE (9-1) COMPUTER SCIENCE

Description

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

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 5

Chapter 5: Communication and the internet 5.1 Networks Network: An arrangement of computers and other devices connected together to share resources and data. Why are networks used? To access shared files among several users To download data or updates to computer programs To access the internet To communicate with each other Types of network Local area network (LAN): A network that covers a relatively small geographical area, often a single site. Wireless local area network (WLAN): A local area network in which connected devices use high frequency radio waves to communicate. Wide area network (WAN): A network that covers a large geographical area. It connects together two or more LANs and is usually under collective ownership. The largest wide area network is the internet. Client-server network: A network that has at least one server to provide services to the client computers. Peer-to-peer network: A network that doesn’t have any centralised servers. Each computer in the network can act as client and server. Network topologies: Describes how the devices on a network are connected together. Bus topology Advantages Disadvantages Relatively cheap to install since only one cable is needed Whole network will fail if the cable Is cut or damaged Easy to add extra network devices Can be difficult to identify where a fault is on the cable   Ring topology Advantages Disadvantages Adding extra devices does not affect the performance of the network Whole network will fail if the cable is cut or damaged or a device on the network fails Easy to add extra networks Can be difficult to identify where a fault is on the network.   Star topology Advantages Disadvantages A damaged cable will stop the whole network from working, just the network device connected to it If the hub or switch fails then the whole network fails Easy to locate faults because they will normaly only involve one device Expensive to install due to amount of cable needed and the hub or switch   Internet: A worldwide system of interconnected networks that enables information to be exchanged and shared. Mesh topology Advantages Disadvantages Very fault tolerant, especially in the case of a fully connected mesh network — if one device fails, messages can be rerouted Difficult and expensive to install wire mesh networks In a wirless mesh network each node extends the range of the network Can be difficult to manage due to number of connections within the network   Communication media: The means by which data is transmitted between devices on a network. Coaxial cable, fibre-optic cable and microwaves are all forms of communication media. Wired connectivity Advantages Disadvantages Faster than wireless connectivity Expensive to install and reconfigure Not easy to intercept or eavesdrop on data Requires many cables at a premises Less susceptible to interference that wireless connectivity     Wireless connectivity Advantages Disadvantages No need for a cable to connect device or to the internet Data transmission speeds can be slower than wired connectivity Allows users to use their own device Interference from other wireless device can adversely affect performance A wider range of devices can communicate with each other/a network because it is not dependant on having the correct table. Walls and other physical objects can adversely affect performance   Network data speed Unit Abbreviation Bits per second Bits per second bps 1 Kilobits per second kbps 1,000 Megabits per second Mbps 1,000,000 Gigabits per second Gbps 1,000,000,000   Protocols: A set of rules that govern how communications on a network should be formatted and what data they should include. Email protocols Simple Mail Transfer Protocol (SMTP): Used when sending email through the internet. Post Office Protocol, Version 3 (POP3): Current version of Post Office Protocol that is used for retrieving email from an email server. Internet Message Access Protocol (IMAP): Allows emails to be accessed using multiple email clients. Network protocols Ethernet: Family of protocols that are used in wired LANs. Physical parts of a network. Wi-Fi: A digital communications protocol that sets out how data is transmitted on wireless LANs. Transmission Control Protocol (TCP): Provides a reliable connection between computers. Transmission Control Protocol/Internet Protocol (TCP/IP): A protocol stack, a collection of protocols that work together. Layer Description Application The top layer of the stack. Layer which interacts with the user to provide access to services and data is sent/received over a network. Transport This layer manages end-to-end communication over a network. There are two main protocols that operate at this layer - TCP and UDP Internet This layer deals with sending data across multiple networks, from the source network to the destination network. Link This layer controls the transmission and reception packets of data to/from a local network. HyperText Transfer Protocol (HTTP): Used when sending and receiving data between web browsers and web servers. HyperText Transfer Protocol Secure (HTTPS): The secure version of HTTP. File Transfer Protocol (FTP): Used to transfer files over a network that uses TCP protocol, such as the internet. 5.2 Network security Network security: Activities designed to protect a network and its data from threats such as viruses, hacker attacks, denial of service attacks, data interception and theft. Access control: This determines which users have access to which data, and what they are allowed to do with it. Firewall: A network security system that monitor and control data that is moving from one network to another. Physical security: Controlling access to critical parts of a network using physical methods rather than software. Authentication is the process of checking the identity of someone trying to use a computer system. Cloud storage is storing data using a third party, usually in a system connected to the internet. A cyberattack is any kind of electronic attack on a computer system, server, network or other IT device. Many different measure need to be taken to prevent cyber attacks from being successful. These start at the design stage of system and include keeping systems up to date, training staff and proactively testing security if the network regularly.   5.3 The internet and the World Wide Web The internet is a global network of networks. It is used to transfer data between different computer systems. The internet has many different services running on top of it. Two common services are the World Wide Web and email. The World Wide Web runs on top of the internet. Although people often mix the two terms up, they are not the same.

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.

Page 7

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.  

Show full summary Hide full summary

Similar

Types and Components of Computer Systems
Jess Peason
Input Devices
Jess Peason
Output Devices
Jess Peason
Business Studies: Marketing
Harriet Glover
Hardy's Key Themes
lucysands1
Forms of Business Ownership Quiz
Noah Swanson
Market Segementation
Noah Swanson
SMART targets
Ben Kidner
HTTPS explained with Carrier Pigeons
Shannon Anderson-Rush
Electrolysis
lisawinkler10
Forces and their effects
kate.siena