You are on page 1of 16

Central processing unit (CPU) Brain of computer Organizes data The architecture and components vary from microprocessor

to microprocessor

Engr:Sajida Introduction to computing

Block diagram

Engr:Sajida Introduction to computing

Components of CPU The ALU (arithmetic logic unit ) The control unit Registers

Engr:Sajida Introduction to computing

Arithmetic logic unit Performs arithmetic and logical operations Arithmetic operations includes addition, subtractions, multiplications and divisions Logical operations includes comparisons operations such as equal to not equal to ,greater than or not grater than etc

Engr:Sajida Introduction to computing

Arithmetic operations Add + Subtract Multiply * Divide / Raised by a power ^

Engr:Sajida Introduction to computing

Logical operations Equal to, not equal to Greater than ,not greater than Less than ,not less than Greater than or equal to ,not greater than or equal to Less than or equal to ,not less than or not equal to

Engr:Sajida Introduction to computing

Control unit Coordinates and controls the computers operations such as retrieving instructions and passing them to the ALU for execution tells the ALU what to do and making sure every thing happens at the right time

Engr:Sajida Introduction to computing

Registers Group of high speed memory located within the CPU into which data is transferred just before processing ALU uses register to temporary store data intermediary calculation and final result of processing CPU uses different registers for different purposes Instruction register IR Accumulator register

Engr:Sajida Introduction to computing

Prefetch unit Requests instruction and data from cache or RAM Retrieve the necessary instructions and data before the time Helps to avoid delays in processing

Engr:Sajida Introduction to computing

Decode unit Take instruction from the Prefetch unit and translates them into a form that control unit understand them Internal cache L1 and L2 cache is used to store frequently used instructions and data If necessary items are not in internal cache than they must be retrieved from external cache or RAM

Engr:Sajida Introduction to computing

Bus Interface unit Place where instruction and data flows in and out of the CPU It connects the CPU

Engr:Sajida Introduction to computing

Machine Cycles Each time the CPU executes the instruction it takes many steps complete series of steps is called a machine cycle Instruction set Collection of basic machine language commands that the CPU can understand each instruction set is broken down in to many smaller machine level instructions called microcode

Engr:Sajida Introduction to computing

Machine cycle is broken down into two small cycles instruction cycle execution cycle Instruction cycle completes in to two steps 1- fetching 2- decoding Execution cycle completes in to two steps 1-Executing 2-Storing

Engr:Sajida Introduction to computing

Fetch unit The fetch unit is in charge of loading instructions from memory. First, it will look if the instruction required by the CPU is in the L1 instruction cache. If it is not, it goes to the L2 memory cache. If the instruction is also not there, then it has to directly load from the slow system RAM memory

Engr:Sajida Introduction to computing

Decode unit
After the fetch unit instruction required by the CPU to be processed, it sends it to the decode unit. The decode unit will then figure out what that particular instruction does. It breaks down the instruction into small parts called microcode. After the decode unit translated the instruction and grabbed all required data to execute the instruction, it will pass all data and the step-by-step cookbook on how to execute that instruction to the execute unit.

Engr:Sajida Introduction to computing

The execute unit will finally execute the instruction. On modern CPUs you will find more than one execution unit working in parallel. This is done in order to increase the processor performance.

Engr:Sajida Introduction to computing

You might also like