Friday, June 24, 2011

What is CPU (Central Processing Unit)

CPU or Central Processing Unit is the main functional unit of the computer. CPU performs all the functions and carries out all tasks whether major or minor on the computer; in short CPU is rightly called the ‘Brain’ of the computer.

When the CPU’s were developed in 1960’s they were large machines almost the size of an average room and were quite expensive, but gradually whole machinery was replaced by Integrated circuits (IC’s) and this reduced the size of the CPU to much compact one. Tthe function of the CPU is to execute the assigned task or series of instructions given to it. Most CPU adheres to Von Neumann architecture and carries out the task in four steps
  • Fetch
  • Decode
  • Execute
  • Write back
Fetch – During this step CPU retrieves the instruction from the software program memory. Program counter determines the location in the program memory.

Decode – Once the CPU fetches the instruction next step would be to decode the instruction. During decoding of the instruction, it is arranged and broken down so that it can be easily executed.

Execution –After the information gained from the decoding execution is performed, required memory is allocated for data to perform e.g. if the command for print is given then first the instruction reaches the CPU which then directs the printer to print a page.

Write Back – When the execution step is performed then after that CPU writes back the results onto the main memory or on to the internal CPU register.

Performance of the CPU is measured in terms of Instructions per second (IPS) it can execute. Simply put, we can calculate how many instructions CPU can carry out in a given amount of time to measure its capability Dual core processors are twice as powerful as single processors because they are able to carry out tasks at twice the speed of the latter.

Components of CPU

  • Arithmetic Logic Unit (ALU) – As the name suggests this unit carries out all the arithmetic (mathematical) and logical (comparison) operations. This unit also contains the electronic circuitry.
  • Control Unit – It coordinates the activities of other units and signals to carry out instructions stored in the memory.
  • Registers – This could be defined as small temporary storage areas or memory with high speed and they are controlled by control unit. There are various registers with each register performing specific task.

Various registers in the CPU are:

  • Accumulators – They hold the data after calculations are carried out
  • Address Registers - This stores data which is to be used by programs to carry out the instructions
  • Status Register – This register maintains the status of the last operation executed by the CPU
Block Diagram of CPU

No comments:

Post a Comment