View Single Post
  #1  
Old Sunday, May 31, 2009
Lord AvaLon's Avatar
Lord AvaLon Lord AvaLon is offline
Senior Member
Medal of Appreciation: Awarded to appreciate member's contribution on forum. (Academic and professional achievements do not make you eligible for this medal) - Issue reason:
 
Join Date: Feb 2009
Location: Quetta
Posts: 277
Thanks: 169
Thanked 263 Times in 163 Posts
Lord AvaLon is a jewel in the roughLord AvaLon is a jewel in the roughLord AvaLon is a jewel in the rough
Default

CPU (Central Processing Unit)


Also known as a processor, is an electronic circuit that executes computer programs. It is responsible for carrying out arithmetic and logic functions as well as executing instructions to other components. The components of a CPU work together, and depending on how they are made, determine exactly how fast these operations can be carried out along with how complex the operations can be.



Operation of CPU

The primary responsibility of a computer processor is to execute a sequential set of instructions that constitute a program. CPU operation can be divided into four basic steps, namely, fetch, decode, execute and write back. During the fetch step, the processor retrieves program instructions from memory. In the decode step, the instruction is broken down into parts. The instruction set architecture of the CPU defines the way in which an instruction is decoded. In the execute step, CPU performs the operation implied by the program instruction. During the write back step, the CPU writes back the results of execution, to the computer's memory.


Main Components of a CPU

1. Arithmetic Logic Unit
2. Control Unit
3. Registers

Arithmetic Logic Unit:
It is the component of central processing unit which contains the basic operations or set of instruction and applies them to data. As clear from the name, it performs arithmetic which includes addition, subtraction, multiplication and division and logical operations which includes compare numbers, letters and special characters.


As shown in the picture above, the accumolator is used to accumulate results. It is the place where the answers from many operations are stored temporarily before being put out to the computer's memory while the other genral-pupose registers hold data on which operations are to be performed by the ALU.

Control Unit:
The component of CPU of a computer which organizes the processing of data or commands is called Control Unit. Control Unit is an internal part of the CPU which co-ordinates the input and output devices of a computer. The functions performed by the control unit vary by the internal architecture of the CPU. However basically its funtion is to directs the entire computer system to carry out stored program instructions by communicating with ALU and register. The CU uses instructions contained in Instruction resgiter in order to decide which circuit needs to be activated. Moreover it also instruct the ALU to either perform the arithmetic or logical operation.


When a program is run, one register called the program counter keeps track of which program instruction comes next.


Register:
These are special, high-speed storage area within the Central processing unit. The data must be represented in a register before it can be processed e.g. if two numbers are to be multiplied, both numbers must be in registers, and the result is also placed in a register.

The number of registers that a CPU has and the size of each (number of bits) help determine the power and speed of a CPU i.e. 32-bit CPU is one in which each register is 32 bits wide. Therefore, each CPU instruction can manipulate 32 bits of data.
Reply With Quote
The Following 3 Users Say Thank You to Lord AvaLon For This Useful Post:
ASP imran khan (Monday, August 16, 2010), Last Island (Sunday, May 31, 2009), Mumtaz Hayat Maneka (Sunday, May 31, 2009)