Computer Science Revision Notes PDF

Summary

These notes cover fundamental computer science concepts, such as data, input/output devices, and algorithms. They also touch on historical context, and concepts like decomposition and algorithms.

Full Transcript

Unit 1- under the hood of a computer Key terms: - Data: a collection of facts without context, such as values or measurements. On a computer data can be stored as files, emails, video games, songs, pictures, data logged on sensors and calculations carried out by the CPU. - Compute...

Unit 1- under the hood of a computer Key terms: - Data: a collection of facts without context, such as values or measurements. On a computer data can be stored as files, emails, video games, songs, pictures, data logged on sensors and calculations carried out by the CPU. - Compute: The verb to compute means to carry out mathematical calculations with. Today, with electronic computers everywhere the term is more commonly defined as its use of computers to solve problems. - Input Device: An input device enables the user to input data into a computer. Eg. Keyboard - Memory: This is where the computer keeps the data that has been input as well as software application and the results of any processing it has carried out for short term memory. Is lost when the computer is off. - Storage device: This is where a computer stores files that have been created, as well as software that has been installed, for the longer term. - Processor: The part of a computer that processes data according to the instructions it has been given. It provides the user with the information. - Output device: An output device enables a user to receive information from a computer. Eg. Headphones - CPU: also known as central processing unit, is the part of the computer that interprets and executes instructions. - Decimal: The system that is normally used for counting and computation, it uses 10 digits 0-9 and it is also called base 10. - Binary: Number system, which uses two digits, zero and one. All electronic computation is carried out using the binary system. It is also called base 2. - Bit: The term bit is used to describe one binary digit - Byte: A string of bits usually 8 (for example 10010101) is called a byte 1. Under the hood of a computer. Compute means to count up or to sum up, or to reckon together. It comes from the computer. The electronic computer is not the first device that people use to compute. For many countries, mathematicians have been embedding tools to help them carry out calculations with greater accuracy. The ancient Egyptians used mathematics to build their pyramids in the Greeks applied geometry to their study of astronomy. Computing is important. Historical figures such as the Greek Pythagoras, Lui Hui from 3^rd^ century China, Muhammad Al Khwarizmi from 9th century pressure and Bhaskara from 12^th^ century India. Traditionally, we think computers is a large desktop machines that we use at home and score. However, however. Recent years we have made computers become faster and solar. The CPU is sometimes described as the computers brain. It is an important part of the computer system and usually has a single integrated circuit (chip). It thinks more like a function machine. 2. Code breakers During World War Two, vital supplies were sent from Britain to the USA. Nazi submarines were sinking large numbers of the supply chips across the Atlantic. Winston Churchill put his faith in the team of code breakers at Bletchley Park. Their task was to decrypt nazi communications. The Nazis were in ciphering their messages using the enigma machine, and its successor, The Lorenz Machine. If Allies were able to break the codes, they could keep one step ahead of the Nazis. That's cool you'll learn how to use the decimal number system that is using unit, tens, hundreds and thousands. It is also known as base 10 because it uses them different numbers 0, 1, 2, 3, 4, 5, 6, 7, 8, 9\-- to make an infinite number of combinations computers are electronic devices that use only two values 0 and 1 they can tell the difference between high voltage and low voltage using two values 1 and 0 to represent numbers known as binary or base 2. All data in a computer must be binary so anything that is to be processed or transferred between computers must be converted into a series of ones and zeros. Circuit semaphore imagine an electric circuit with its three lights each controlled by its own switch you can switch the lights on in many different patterns now imagine that each pattern represents a number and each number relates to a message in a code book. Bit -- binary digit Nibble- 4 bits Byte- 8 bits Kilobytes- 1024 bytes Megabyte- 1024 kilobytes Gigabyte- 1024 megabytes Terabyte- 1024 gigabytes Petabyte- 1024 terabytes Unit 2- Think like a computer scientist Key words: - Decompose: Break a problem down into a series of simpler problems which you can easily understand. the process of doing this is called decomposition - Algorithm. A set of step-by-step instructions which once followed solve a problem. 2.1 decomposition and algorithms Many of the things you do every day are probably something you can do without thinking about it. You must decompose a problem if you do not understand it. You must identify the actors and the actions and how the two work together to do the required task, such as teaching a child how to brush its teeth. Decomposing is a technique; you can use to solve any problem. By decomposing the problem, you will gain in much deeper understanding of it. You will also have broken down your problem into many simpler ones that are easier to solve. Writing an Algorithm. Once you have decomposed the problem, the next step is to list the sequence of steps you will need to follow it. The process of listing is called listing an algorithm. Unit 3- Drawing and manipulating shapes Key words: - Abstraction: working with ideas or solving a problem by identifying common patterns in real situations, concentrating on general ideas and not the detail of the problem itself. - Generalization: Taking concepts used in the solution of a particular problem and using them to solve other problems that have similar features. - Geometrical shapes: Shapes that are defined by a set of mathematical rules. - Decomposition: the process of breaking something down into smaller parts - Iteration: using repetition of a process to create a more efficient solution - Coordinates: a set of values used to show an exact position dimensions we use are X and Y values where X is the distance across and Y is the distance up 3.1 shapes, patterns and algorithms There are many ways in which computer science is linked to the world around us. There are. Very strong links between math, art and computer science. The term. Abstraction can be used in all three subjects. In computer science, Abstraction means finding generalizations by identifying common patterns in real situations. In math abstraction involves considering a problem theoretically separating it from the epidemic context so that generalization can be used in other contexts, obstruction and art describes the process of interpreting subject rather than depicting it exactly. For example, when trying to find cure vertices, scientists will already look for patterns in the medical data for people who are already ill with the disease. Just think of the creativity that goes into designing the video games you play the characters, environments and graphics are all developed by designers and programmers working together. Shapes and geometrical shapes in particular play an important part in maths, art and computer science. Patterns also play an important part in our lives. They are repeated concepts defined by rules from number patterns to virtual and scientific patterns. They are everywhere. Patterns helped us to see and understand how things work. Theo Van Doesburg was an abstract artist. He often explored shape and color by representing them as geometric objects. Van Doesberg's paintings are made up of squares, rectangles and lines of different sizes. By looking at the painting this way we have undertaken decomposition. Decomposition is used to solve problems by breaking them into smaller parts to solve the problem of creating a van doesberg style artwork. The challenge is how to create the squares rectangle and lines that will make up one of Theo Van Doesburg's paintings. It is important that algorithms are as efficient as possible making an algorithm short and expressing clearly help us to describe the actor in repeated actions and more efficiently one of the ways you can make an algorithm shorter is to repeat the instructions and use iteration. Unit 4- Creating an animation Key words: - Dry run: To run through a program on paper to see how it works. It records the state of each variable when each line of the program is executed, so it has one line for each line of code in the program. - Execute: to carry out something usually set of instructions. - Sequence: a set of instructions that must be followed one after the other in a specific order. - Procedure: A sequence of program instructions that have been abstracted and can be used over and over again. It can accept input from other parts of the program. - Function: a sequence of program instructions that have been attracted and can be used over and over again. It can accept input from other parts of the program, but can also enrich information to other parts of a program. - Procedural abstraction: hiding the detail of a process in a named procedure or function. - Selection: The choice of which route to take through a computer program. 4.1 algorithms An algorithm is a set of step-by-step instructions which, when followed, solve a step-by-step problem. Then routine is a set of a step-by-step instruction given to a dancer. An algorithm should form the starting point for solving the challenge. Algorithms must be accurate to be effective. In an inaccurate algorithm produces poor results with inaccurate Instructions. It is therefore important to think carefully about each step in the process and how they are linked together running. Through exactly what the algorithm says is called a dry run. It will help to make the final algorithm more accurate. 4.2 sequences, iteration and procedures. A sequence of instructions to describe the process is named is the simplest form of an algorithm. Procedures and functions are a way of abstracting A sequence of instructions so that you can call on it to execute when you need without having to repeat the whole sequence every time. Procedures and functions are therefore sections of code that can be used over and over again. Both can accept input from other parts of the program, but a function can also return information back to other parts of the program. You can pass the time to a procedure from other part of the program and this data can be different every time you use the procedure. Direction is a simple procedure which doesn't have any data passed to it from other parts of the program. It uses random commands three times to change the direction of the sprite and its position on the screen. 4.3 Selection Computer programs use selection to provide possible courses of action that will be selected as a result of certain conditions being met. An 'if' statement is used to introduce selection into a program using a 'forever' block in the graphical programming language means that the program will check forever to see if the conditions have been met and will act accordingly. The type of selection you can use to create your code Is an if else statement and then? 'If then else' statement can be used when you want 1 procedure to run if 1 condition is not fulfilled and another procedure to run if it is not. Unit 11- Programming a calculator Key words: - Operation: any action performed by a computer such as performing a calculation or processing data in other ways. - Variable. A named location in memory used to stored data. - Flow chart: a diagram that represents a series of events using shapes linked by arrows. 11.1 Programming variables Before you can program the calculator, you need to analyze the calculations to find out exactly what is going on and what calculator will need to do. E.g. 23 + 89 = 112 This can be represented in algebra as A + B = C in your calculator program you're going to assign this value to the answer variable in this case C you write this calculation as C = A + B When the user inputs data into a computer, the computer stores it and retrieves it from a named place in the memory called the variable. Being able to use variable is a key computational thinking skill because they help you to write programs that have abstraction and generalization. You use the variable to represent an important element of your program. The value of that element can change without you needing to rewrite the program. It is good practice. Deduce names for the variable to indicate what they are If you use the names for the sides of the shape, it is easy to workout which side of the shape the variable refers to. This is very useful when you are trying to find errors in programs, especially large programs. A flow chart is a diagram that represents a series of events using shapes linked by arrows. Ovals are usually used to start and finish flow charts inputs and outputs are represented by rhomboids. Rectangles are used for operations. Arrows denote the flow. Unit 12- Programming a quiz Key words: - Debug: The process of correcting code to fix mistakes 12.1 Abstraction Taking up a quiz abstractly by removing the detail of the questions and their answers helps you to focus on what is actually happening. Obstruction is an important skill for computer scientists. Variables: When the user inputs data into a computer the computer stores it and retrieves it from a name place in the memory called a variable the programmer can decide whether variables will be constant or changeable depending on what the program needs in our math quiz you can therefore decide to generate automatically the numbers that make up the questions by calling the 1^st^ variable and the 2^nd^ variable and randomly generating a new value for each variable on loop 12.2 decomposition and Generalization In computer science, decomposition is the name given to the process of breaking down a problem or a program down into smaller and manageable chunks, Computer scientists do this so they can concentrate on finding a solution to a specific part of a problem without worrying about all of it in one go. It is a useful tool for programmers too because most programs are created by teams of people and, if the program is decomposed using procedures and functions then, everyone can work on the program separately. The random number generator generates a sequence of numbers, characters or symbols that appear to lack a pattern and seem to be random. Random number generators can be computational and physical There are ways to measure randomness using statistics, which require large amounts of data. A sequence of numbers, characters or symbols, is said to be statistical random when it contains no recognizable patterns or regularities. But it doesn't mean that it is truly random. Computational random number generators create sequences that appear to have no pattern, but often have repeated patterns over our very long sequence. The required quality of the randomness, the level of unpredictability of an algorithm for generating random numbers depends on its use. For example, the randomness of cryptography is very high. However, algorithms that generate questions for a quiz or searching and sorting require low practice, low level of unpredictability. One of the beauties of computer science is replacing many with the generalization replaces multiple blocks code that do a very similar job with 1 function or procedure that uses variables to provide the differences. Generalizing, you can then write a program that includes these features as variables, so you can identify the number of times these things, occur in the house. Generalization has helped computer scientists automate manufacturers using generalization to help with the challenge can be changed. By making strong modifications and making them perform other tasks. 12.3 adding a timer. Adding a timer to a quiz can provide an extra sense of excitement and challenge. Countdown timers can be used to fix the time available to answer a question or complete a whole quiz. The computer knows how long a second is, because it uses a built-in clock to manage the CPU, which was discussed in unit 1. Count up timers can be used to tell the quiz taker how long it takes them to answer each question or to complete the whole quiz. The time taken can be subtracted from the quiz taker's score.

Use Quizgecko on...
Browser
Browser