Presentation is loading. Please wait.

Presentation is loading. Please wait.

Chapter 2.1 CPU.

Similar presentations


Presentation on theme: "Chapter 2.1 CPU."— Presentation transcript:

1 Chapter 2.1 CPU

2

3 1.2 CPU What is a CPU? What does it do?

4 1.2 CPU State the purpose of the CPU What is the CPU?
CPU stands for Central Processing Unit. The CPU is the brains of the computer where most calculations take place. Without a CPU the computer would not work.

5 1.2 CPU State the purpose of the CPU The CPU
The CPU has two main parts: The Control Unit This uses machine code (binary) to tell the computer what to do and where to find the data in the memory. The Arithmetic and Logic Unit (ALU) The performs the calculations such as add, subtract and compare values (for instance equal to, greater than and less than).

6 1.2 CPU State the purpose of the CPU How is Data Stored in a Computer?
Memory is split up into many different sections and all of these locations have a location (“address”) which helps the computer find the data again. The data is stored in binary form as this is how a computer understands numbers. Location 1 Location 2 Location 3 Location 4 101010 100101 110110 000000

7 The Fetch-Execute Cycle
The CPU works on something called the fetch-execute cycle. It needs to fetch the data or instructions from the memory locations (fetch) It needs to work out what these data or instruction mean (decode) It then performs that task (execute) The whole process is repeated again. Fetch Decode Execute

8 What Happens When a Computer is Switched On?
When the computer is first switched on the CPU will look in a specific location in the Read Only Memory (ROM) to tell it what the first instruction is to load and execute. This is what happens when it is “Booting up”. This takes a little while as the computer has to get up and running and load the operating system and get the computer started. After this process is completed, the CPU will hand over most of the control to the operating system to provide the programs for the computer to run.

9 Clock Speed Scientists discovered that when an electronic current is passed through a quartz crystal it vibrates at a constant speed. A quartz crystal is used to measure the speed that the fetch-execute cycle takes to complete and this is measured in hertz (Hz). The CPU synchronises all processes in line with this clock speed. 4 GHz means that the processor can complete 4 billion cycles every second. This means that, in theory, if the computer was doing nothing else it would be able to perform 4 billion simple calculations in a second.

10 Actual Clock Speed Think back to the role play we did.
What would have happened to the speed of the fetch-execute cycle if the memory locations were in another building instead of being in the same classroom? As the memory locations in the CPU are not located on the chip itself, the speed the computer actually performs its fetch-execute cycle is dramatically lower when the memory is further away.

11 Cache Memory CPU Cache Memory Main Memory
If the CPU has to wait for the values and instructions to be returned from the main memory, this affects the speed at which it can work. To get around this problem, a cache memory is used which is smaller than the usual memory but is located a lot closer to the CPU. If data is not in cache then data is retrieved from main memory Requests data CPU Cache Memory Main Memory Next packet of data copied to cache ready Data sent to CPU

12 Size of Cache The more cache memory there is, the more likely that the data will have already been requested from the main memory and placed into the cache. Therefore, it is less likely it will have to be retrieved from the main memory so the CPU can run faster. The cache memory is very fast but also very expensive so it is a lot smaller than the main memory in a computer.

13 Levels of Cache Generally there are three levels of cache memory:
This is usually located on the CPU chip itself but has a very low capacity and runs at the same speed as the CPU. Level 2 This is a little further away from the CPU and is larger but slower than the CPU. Level 3 This is the largest of the three levels but also the furthest away and therefore the slowest.

14 Bus Data is sent around the system in “busses”
A bus is a connection between the different parts of the motherboard. This allows data to transfer between the separate areas.

15 Bus The busses also carry data between the CPU, memory and the controllers for peripheral devices such as the monitor, keyboard and printer.

16 Multi-Core Processors
Instead of having just one processor, a dual-core processor has two CPUs working together which can each fetch and execute instructions simultaneously - the computer is then able to process more instructions in the same amount of time. How many CPUs will a quad-core processor have in it?

17 Speed of a CPU What would affect the speed of the CPU?
Processor speed (in GHz) Bus speed Amount of Cache available Number of cores available

18 Questions State the purpose of the CPU
Describe the function of the CPU as fetching and executing instructions stored in memory Explain how common characteristics of CPUs such as clock speed, cache size and number of cores affect their performance.


Download ppt "Chapter 2.1 CPU."

Similar presentations


Ads by Google