Professional Documents
Culture Documents
to microprocessor
Block diagram
Components of CPU The ALU (arithmetic logic unit ) The control unit Registers
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
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
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
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
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
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
Bus Interface unit Place where instruction and data flows in and out of the CPU It connects the CPU
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
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
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
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.
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.