View
121
Download
0
Tags:
Embed Size (px)
Citation preview
CPU EXECUTION OF STATEMENTS
ARUN RJ
Facebook Profile
Twitter Profile
Linkedin /ARUN RJ
Disclaimer: This presentation is prepared by trainees ofbaabtra.com as a part of mentoring program. This is notofficial document of baabtra.com – Mentoring Partner
CPU
• CPU or central processing unit is the brain of all computer.
ALU
Arithematic or Logic unit contains electronic circuitry thatexecutes all arithematic and logic operations
CONTROL UNIT
• Control unit of the cpu contains circitry that uses electricalsignals to direct the entire computer system to carry out orexecute stored program instructions
• The control unit must communicate with both the ALU andmemory
SYSTEM BUS
CONTROL BUSThe control bus is used by the computer to direct and monitor the actions of the the other functional areas of the computer
ADDRESS BUSAddress bus consists of all the signals to define any of the memory location in the computer
DATA BUSThe bi directional data bus carries all data and instructions between functional areas of computer
REGISTERS
GENERAL PURPOSE REGISTERSA general purpose register is amemory cellEach general purpose register has aunique nameIt is used to store intrmediate result of complex computation
ACCUMULATOR
This register is used for storing the results those are produced by the register
INSTRUCTION REGISTER
IR contains the current instructions being executed by the cpuThe CPU will perform the operation indicated by the instruction code contained in the IR
MAR(MEMORY ADDRESS REGISTER)
This register holds the memory address of data and instructions.This register is used to access data and instructions from memory during the execution of an instruction.
MDR(MEMORY DATA REGISTER)
It is the register that contain the data to be stored in the computer storage or data after a fetch from the computer storageIt acts like a buffer and holds anything that is copied from the memory ready for the processor to use it.
INDEX REGISTERA hardware element which holds a number that can be added to the address portion of a computer instruction to form an effective addressAn index registrer in a cpu is a register used for modifying operand address during the run of a program
DATA REGISTERA register used in microcomputers to temporarily store data being transmitted to or from a peripheral device
PROGRAM COUNTER
This register contains the address of next instructionThe value in the program counter will be increased after the cpu finishes executing one instruction
PROCESS STATUS REGISTER
This register contains the various information about the cpu.For example the result of a comparison operation.When cpu compares 2 numbers a and b the outcome of comparison is stored in the PSR.The outcome of a compare operation will allow the cpu to determine the following fact between a and b.
equalnot equalgreater thangreater than or equalless thanless than or equal
PRO
INSTRUCTION EXECUTION CYCLE
FETCH THE INSTRUCTION
DECODE THE INSTRUCTIONEXECUTE THE INSTRUCTIONSTORE THE INSTRUCTION
FETCH
1 Load the address of next instruction in the PC to MAR,sothat the control unit can fetch the instruction from right part of the memory2 Copy the instruction/data that is in the memory address given by the MAR into the MDR3 Increment the PC by 1,so thaat it contains address of next instruction,assuming that the instructions are in consequtivelocation 4 Load the instruction or data that is in the MDR into the IR
EXECUTE
If the instruction is jump instruction then,load the address part of the instruction in IR into PC
If the instruction is an input or load(directly) instruction then take input and place in accumulator
If the instruction is an a load(from memory) instruction then take input and place in accumulator
copy address of the instruction(to load from)in the IR into MAR
copy data from memory address held in MAR to MDRcopy data in MDR into accumulator
• Execute contdIf the instruction is a store instruction then:Copy address part of the instruction (to store in) in the IR in to MAR.Copy data in to accumulator to MDR.Copy data in to MDR in to memory address held in MAR.
If the instruction is a add instruction then:Copy address part of the instruction (of number to add ) in the IR in to MAR.Copy number from memory address held in MAR in to MDR.Add number in MDR to number in accumulater.
If the instruction is an output (from memory) instruction then:
Copy address part of the instruction (of data to output) in the IR
into MAR.Output contents of MDR.
STORE THE OUTPUT
Result of calculations in CPU stored in main memory or sent to output devicesProgram counter could be updated to a new address
THANK YOU
Follow us @ twitter.com/baabtra
Like us @ facebook.com/baabtra
Subscribe to us @ youtube.com/baabtra
Become a follower @ slideshare.net/BaabtraMentoringPartner
Connect to us @ in.linkedin.com/in/baabtra
Give a feedback @ massbaab.com/baabtra
Thanks in advance
www.baabtra.com | www.massbaab.com |www.baabte.com
Emarald Mall (Big Bazar Building)Mavoor Road, Kozhikode,Kerala, India.Ph: + 91 – 495 40 25 550
NC Complex, Near Bus StandMukkam, Kozhikode,Kerala, India.Ph: + 91 – 495 40 25 550
Cafit Square,Hilite Business Park,Near Pantheerankavu,Kozhikode
Start up VillageEranakulam,Kerala, India.
Email: [email protected]
Contact Us