CENTRAL PROCESSING UNIT / CPU / Microprocessor / Processor
Central processing unit is the brain of computer. It is also called CPU or processor. Processor is used to process data according to given instructions. It performs arithmetic and logical operations on data. It controls all activities of different parts of a computer. As brain in human body controls all other parts of body and takes decisions, CPU controls all other parts of the computer and their working. A CPU has three basic parts: Arithmetic Logic unit, Control unit and Registers.
|Figure: Microprocessor or Processor or CPU or Central Processing Unit|
1. ARITHMETIC LOGIC UNIT (ALU)
ALU performs data processing according to given instructions. All computations are done in this unit. ALU is the real place in computer where actual execution of instructions takes place. ALU may be further categorized into two sections according to their function:
ARITHMETIC SECTION of ALU performs arithmetic operations like addition, subtraction, multiplication and division on data.
LOGIC SECTION of ALU performs logical operations like comparison between two values. For example, 10>5 will give TRUE answer. And 5<1 will give FALSE answer. Control unit sends data and instruction to perform calculation on the data to the ALU. ALU then performs this calculation.
2. CONTROL UNIT
Control unit controls all over operations of different parts of computer. For example it takes data and instructions from input unit and stores it into memory. It sends data to ALU for processing. It takes results from ALU and sends it to output device. It can also store results in memory. Control unit performs all these functions by giving commands to relevant part of the computer.
Control unit performs following four functions for executing instructions of a computer program.
- Fetching: obtaining instruction from memory
- Decoding: understanding this instruction
- Data Fetching: If needed, obtaining data from memory
- Executing: Control unit sends the instruction and data to ALU for taking suitable action on the instruction
A register is a very small and temporary memory area in ALU. It holds instruction and data as long as it is being processed by CPU. When instruction and data is fetched from memory then it is stored in a register. ALU contains a number of registers for example AX, BX, CX, DX etc. A Register may be of 8 bits, 16 bits, 32 bits or more.