4. The CPU
• CPU stands for central processing unit. it is brain of computer
• It is most important component of the computer. it is also
called processor.
• Converts data into information
• It continually receives instructions to execute. Each instruction
tells CPU to process data.
• CPU performs all operations on data according to the given
instructions.
• It executes instructions and tells other parts of computers what
to do.
• Most of the work consists of calculations and data transfer.
• Two parts
– Control Unit (CU)
– Arithmetic and Logic Unit (ALU)
5. Control Unit
CU
• Control Unit is an important component of CPU. It acts Like a
supervisor of the computer.
• It controls all activities of the computer system
• All the computers resources are managed from the control unit.
• Think of the control unit as a traffic signal directing the flow of data
through the CPU.
• The CPU´s instruction for carrying out commands are built into the
control unit.
• The instruction or instruction set, list all the operations that the CPU
can perform.
• Each instruction in the instruction set is a series of basic directions
that tell the CPU how to execute more complex operations.
6. Control Unit
CU
It performs the following operations:
1. It fetches or retrieve instruction from main memory.
2. It interprets the instruction to find what operation is to
be performed.
3. It controls the execution of instruction. The control unit
determines the sequence in which computer programs
and instructions are executed
7. System Clock
• In computers, sequence is everything. The system clock
synchronizes the tasks in a computer, like loading data
before manipulating it, etc.
• The system clock is a circuit that emits a continuous
stream of precise high and low pulses that are all exactly
the same length.
• One clock cycle is the time that passes from the start of
one high pulse, until the start of the next.
• If several events are supposed to happen in one clock
cycle, the cycle is subdivided by inserting a circuit with a
known delay in it, thus providing more highs and more
lows.
8. Arithmetic / Logic Unit
ALU
ALU is a part of CPU. Actual Execution of instructions
takes place in this part. All Arithmetic and Logical
operations are performed in ALU.
It consists of two units
• Arithmetic Unit
Performs arithmetic operations
• Logic Unit
Performs logical operations
11. ALU
• When the control unit encounters an instruction that involves
arithmetic or logic , however, it passes that instruction to the
second component of the CPU, the ALU.
• The ALU performs these operations.
• ALU includes a group of registers--- high speed memory
locations built directly into the CPU that are used to hold the
data currently being processed.
12. ALU
• ALU will use the register to hold the data currently being used
for calculation.
For example
• CU might load two numbers from memory into the registers in
the ALU.
• Then it might tell the ALU divide the two numbers (an arithmetic
operation) or to see whether the numbers are equal (a logical
operation).
• The answer to this calculation will be stored in another register
before being sent out of the CPU.
13. Registers
• A location used for temporarily hold data
or instructions at the moment of execution
• The storage capacity of registers
measures in bytes (can be 1,2,4 or 8
bytes registers).
14. Registers in ALU
• Accumulator (Acc)
– storing intermediate results of computations
• Status Register (SR)
– to store the status of the result
15. Registers in CU
• Program Counter (PC)
– to contain the address of next instruction to
be executed
– keep a record of the sequence of execution.
• Instruction Register (IR)
– to contain instruction that is being executed.
16. Registers in CU
• Memory Address Register (MAR)
– to store the address of the data or instruction
to be processed
• Memory Data Register (MDR)
– to store data or instruction to be processed.