Fetch Execute Decode I

P03b

  • Draw and label a diagram of the inside of a computer, label each hardware component and briefly describe its role
  • Explain how the speed of the clock impacts on performance
  • Explain how pipelining improves the performance of the CPU.

Recap

P03b

Instructions and data are stored in the memory (RAM).

Instructions are fetched one at a time into the processor.

The instructions are decoded by the control unit.

The instructions are executed, sometimes using the arithmetic logic unit

Central Processing Unit

P03b

The CPU is the 'brain of the computer’.  

It is the hardware component responsible for all the processing that the computer carries out. 

Its job is to process data. By processing, we mean things such as searching, sorting, calculating and decision making.

Whenever you are on working on your computer, it is the CPU that is at the centre of everything.

Accumulator/
General registers

Input

RAM

Control Unit

Instruction register

Program counter register

Output

ALU

Activity I

P03b

Complete the diagram with the names of each component.
There are eight labels

Accumulator/
General registers

Input

RAM

Control Unit

Instruction register

Program counter register

Output

ALU

Instruction register

Program counter register

Accumulator/
General registers

Output

RAM

Input

ALU

Activity I

P03b

Complete the diagram with the names of each component. There are eight labels

Accumulator/
General registers

Input

RAM

Control Unit

Instruction register

Program counter register

Output

ALU

Control unit

P03b

The control unit receives signals from other parts of the computer system and sends signals to them.

It is responsible for handling hardware interrupts (e.g. inputs from a mouse, keyboard, network, etc.).

It is responsible for fetching, decoding, and executing instructions.

It is the powerhouse of the CPU – it has the most responsibility.

Arithmetic logic unit

P03b

The Arithmetic Logic Unit (ALU) performs actual operations on data.

  • Arithmetic: + / = *
  • Logic: AND, OR, NOT, etc.

It is able to compare numbers against 0.

It can test if two numbers are equal.

It uses logic gates in combination to perform operations.

Registers

P03b

Also known as immediate access storage.

Registers are a type of memory that is extremely fast, much faster than RAM.

Each type of processor has different registers that are designed to hold different information.

Most processors have:

  • an instruction register: holds instruction currently being executed by the CPU.
  • an accumulator: holds the accumulated result of operations carried out by the ALU.
  • a program counter: holds the memory address of the next instruction to be executed.

Clock

P03b

A clock chip determines the speed of the CPU.

This chip uses a vibrating crystal that maintains a constant rate of vibration.

The speed of the clock is measured in Hertz (Hz), which is the amount of cycles per second.

A clock speed of 500Hz means 500 cycles per second.

Current computers have clock speeds of 3GHz, which means 3-billion cycles per second.

Each ‘tick’ means that one part of the fetch-decode-execute cycle can be carried out.

Pipelining

P03b

Each instruction that is carried out has several stages (fetch-decode-execute).

Each component of the CPU has a different job to do in this cycle.

Sometimes, one component has nothing to do whilst it is waiting for the component before it in the sequence to complete its task.

This increases the overall processing time needed.

Pipelining is a method of keeping all the components busy so as to improve overall CPU performance.

Pipelining

P03b

Pipelining attempts to keep every component of the CPU busy at all times.

Instructions flow through the CPU in stages.

This means that an instruction can be completed every clock cycle. This increases CPU throughput allowing overall performance to be optimised.

A CPU is called ‘fully pipelined’ if an instruction can be fetched every clock cycle.

Activity II

P03b

An electronic device that ‘ticks’ at regular intervals and is used to synchronise the actions of the other components of the CPU.

Term Description
Clock
 
Hertz
 
Pipelining


 
Instructions
Fetch-decode-execute
 
Control Unit
 
Arithmetic control unit
RAM

A measure of clock speed. One Hertz equals one cycle per second. 

A way of improving the performance of the CPU. The stages of the fetch-decode-execute cycle are overlapped. While the CPU is executing one instruction, it is decoding a second and fetching a third one from memory. 

An operation that the CPU carries out.

The cycle followed in the CPU to retrieve an instruction or data from memory, look it up in an instruction set to determine its meaning, and then enact the operation.

The unit that decodes the instruction and coordinates all the actions of the other components.

Carries out arithmetic operations (add, shift) and Boolean logic operations (AND, OR, NOT)

The memory where the instructions and data are stored for programs.

Review

P03b

Draw and label a diagram of the inside of a computer, label each hardware component and briefly describe its role.

  • CPU contains the ALU, CU and registers.
  • The other components a computer needs include: input and output devices, RAM, motherboard, and power supply unit.

Explain how the speed of the clock impacts on performance.

  • The faster the clock speed, the more instructions can be carried out per second.

Explain how pipelining improves the performance of the CPU.

  • Pipelining reduces wasted clock cycles.
  • A fully pipelined CPU can fetch an instruction every clock tick.
Made with Slides.com