Computer Science BC

  • Created by: Kaja Koz
  • Created on: 09-10-18 20:10

Purpose of a CPU

A computer is made up of 'hardware' and 'software'. These work together to make up a complete computer system. This computer system can then process instructions and data using the brain of the computer, known as the Central Processing Unit (CPU).

1 of 19

Purpose of a CPU (2)

Hardware, software and peripherals

-Hardware is anything that is physical, that you can touch, such as a keyboard, a webcam, a stick of RAM, a CPU chip or a pen drive.

-Software are the programs (or sets of instructions) that make the hardware do useful things. Examples of software include your favourite music program, a word processing program, your operating system and a web browser.

-A peripheral is simply any piece of hardware that you can connect to the computer. Normally, you would do this by plugging it into somewhere on the outside of your computer system, such as a USB port or by using a wireless connection such such as Bluetooth. When you plug a peripheral into your computer, you are making a direct connection from the peripheral to the CPU, so it can be used.

2 of 19

Purpose of a CPU (3)

Overview of a computer system and the purpose of the CPU

Data from the real world enters the computer via a range of input devices. Examples include a keyboard, mouse, microphone and graphics tablet. Once inside, the CPU processes the data. This simply means it works on it. When the data has been processed, the computer either outputs the results to the real world so we can use the results using a range of output devices such as speakers, a monitor or printer, or it stores the results using a range of storage media, such as a hard disk, a flash drive or a DVD.


3 of 19

Purpose of a CPU (4)

  • The CPU processes data according to sets of instructions, (usually called 'programs' or 'applications'), written by programmers.

  • All the applications that have been loaded into a computer are stored on the hard disk.

  • When one needs to be used, a copy of that program is made and put into RAM.

  • The CPU can only work with programs in RAM.

  • The CPU cannot directly work with any programs or your files held on a storage medium such as a hard drive or pen drive.

  • If the CPU wants to use a program or file, it must move them into RAM first.

4 of 19

Purpose of a CPU (5)

The CPU can work on billions of instructions in a second and many different programs, all (apparently) at the same time. In fact, the most commonly found CPU (the Von Neumann CPU) can work on only one program at a time, but it works so fast, switching between different programs, that it seems like you are using many different programs at once! So when you are next using a computer, with some music playing, with Skype open, a messenger program open and doing your homework in Word, remember that the computer is only ever using one application at a time!

5 of 19

Von Neumann architecture

Processor architectures

The way that a processor is designed is known as its 'architecture' and this has a significant effect on its performance. There are a number of different designs of CPU. The most common one is the Von Neumann processor, found in nearly all personal computers, laptops, tablets, mobile phones, gaming consoles and other common computer-based devices.

6 of 19

Von Neumann architecture (2)

Von Neumann architecture

In the 1940s, a mathematician called John Von Neumann described the basic arrangement (or architecture) of a computer.

A Von Neumann-based processor is defined as one that:

  • Uses a single processor.

  • Uses one memory for both instructions and data.

  • Executes programs by doing one instruction after the next in a serial manner using a fetch-decode-execute cycle.

7 of 19

Von Neumann architecture (3)

The Harvard processor

This type of processor has two separate memories accessed by their own busses; one memory for instructions (programs) and a different memory for data. A Harvard processor can fetch an instruction from the instruction memory using its dedicated instruction bus at the same time as fetching data from the data memory using its dedicated data bus. This potentially can increase the overall speed of the processor compared to a Von Neumann processor, whose busses have to be used for both fetching instructions and fetching data; this conflict for resources slows down the speed of processing instructions.

8 of 19

Fetch-decode-execute cycle

The first step the CPU carries out is to fetch some data and instructions (program) from main memory then store them in its own internal temporary memory areas. These memory areas are called 'registers'.

This is called the 'fetch' part of the cycle.

For this to happen, the CPU makes use of a vital hardware path called the 'address bus'.

The CPU places the address of the next item to be fetched on to the address bus.Data from this address then moves from main memory into the CPU by travelling along another hardware path called the 'data bus'.

9 of 19

Fetch-decode-execute cycle (2)

The next step is for the CPU to make sense of the instruction it has just fetched.

This process is called 'decode'.

The CPU is designed to understand a specific set of commands. These are called the 'instruction set' of the CPU. Each make of CPU has a different instruction set.

The CPU decodes the instruction and prepares various areas within the chip in readiness of the next step.

10 of 19

Fetch-decode-execute cycle (3)


This is the part of the cycle when data processing actually takes place. The instruction is carried out upon the data (executed). The result of this processing is stored in yet another register.

Once the execute stage is complete, the CPU sets itself up to begin another cycle once more.

11 of 19

Common CPU components

Control Unit: performs the tasks of fetching, decoding and managing the execution of instructions and the storing of the results. It does this mainly by controlling the links between the other components of the CPU. It also contains various registers such as:

  • the Program Counter which stores the memory address of the next instruction.

  • the Current Instruction register which stores the instruction currently being executed.

12 of 19

Common CPU components (2)

The Arithmetic Logic Unit (ALU): Executes basic arithmetic and logical operations on integer data that it is linked to. Examples of such operations include:

  • Integer arithmetic operations (addition, subtraction)

  • Logic operations (AND, NOT, OR, XOR)

  • Various registers such as the accumulator that are used to temporarily store data while instructions are being executed

13 of 19

Common CPU components (3)

Cache: a hardware or software component that stores data so that future requests for that data can be served faster; the data stored in a cache might be the result of an earlier computation or a copy of data stored elsewhere.

14 of 19

How do the characteristics of a CPU affect its per

Clock Speed:

  • This is the rate at which the CPU runs and is controlled by an electronic clock built into the CPU. The frequency of this clock is measured in Hertz (Hz) so a 900 MHz CPU would complete 900 million clock cycles per second.

  • Few of the instructions that the CPU processes are actually completed in a single clock cycle and the actual number of cycles required will depend on the CPU design (this means that comparing one CPU with another just on clock speed can be too simplistic).

  • SUMMARY: A CPU with a high clock speed will process more instructions per second and will therefore have a higher performance than the equivalent CPU with a lower clock speed.

15 of 19

How do the characteristics of a CPU affect its per

Cache Size:

  • If the CPU can process instructions and data faster than they can be fetched or exchanged with RAM then the CPU is in effect idle for some clock cycles. One solution is to build very fast cache memory into the CPU and use it as a buffer.

SUMMARY: The larger the cache size the higher the CPU performance because the CPU will spend less time accessing RAM so programs will execute faster.

16 of 19

How do the characteristics of a CPU affect its per

Number of cores:

  • Processors originally had only one core so could only process one instruction at a time. A multi-core processor is made up of two or more independent processors (called cores).

  • A dual-core processor contains two cores and a quad-core processor contains four cores. Each core can process instructions independently of the other cores.

  • The biggest performance gain when using a multi-core processor is when the software has been specifically written to run on multiple cores.

SUMMARY: A multi-core CPU will have a higher performance than a single-core CPU with the same clock speed.

17 of 19

Embedded Systems

Purpose of Embedded systems:

An embedded system is a programmed controlling and operating system with a dedicated function within a larger mechanical or electrical system, often with real-time computing constraints. It is embedded as part of a complete device often including hardware and mechanical parts.

18 of 19

Embedded Systems (2)

Examples of Embedded systems:

Some examples of embedded systems are MP3 players, mobile phones, video game consoles, digital cameras, DVD players, and GPS. Household appliances, such as microwave ovens, washing machines and dishwashers, include embedded systems to provide flexibility and efficiency.

19 of 19


No comments have yet been made

Similar Computing resources:

See all Computing resources »See all Computer systems resources »