cpu and execution of instruction
TRANSCRIPT
Sreya chandran v
www.facebook.com/username
twitter.com/username
in.linkedin.com/in/profilename
9747751364
cpu and execution of instruction.
Disclaimer: This presentation is prepared by trainees ofbaabtra as a part of mentoring program. This is not officialdocument of baabtra –Mentoring PartnerBaabtra-Mentoring Partner is the mentoring division of baabte System Technologies Pvt . Ltd
CPUCPU is the brain of computer where most calculations are take place.CPU carries out the instructions of a computer program to performthe basic arithmetical , logical and input output operation of thesystem.
Control Unit
ALU
Memory Unit
Input Devices Output Devices
Instruction Cycle
Fetch Decode
ExecuteWrite Back
Example program : Addition of two numbers
LOAD A,2000
LOAD B,2004
ADD A,B,C
STORE C,2008
100
LOAD A,2000
LOAD B,2004
ADD A,B,C
STORE C,2008
100
104
108
112
Instruction address
100
50
2000
2008
2004
Memory location
PC IR
A B C
ALU
Step 1
100 LOAD A,2000
LOAD A,2000
LOAD B,2004
ADD A,B,C
STORE C,2008
100
104
108
112
100
50
2000
2008
2004
Memory location
PC IR
A B C
ALU
Step 2
100 LOAD A ,2000
100
LOAD A,2000
LOAD B,2004
ADD A,B,C
STORE C,2008
100
104
108
112
100
50
2000
2008
2004
Memory location
PC IR
A B C
ALU
Step 3
104
100
LOAD A,2000
LOAD B,2004
ADD A,B,C
STORE C,2008
100
104
108
112
100
50
2000
2008
2004
Memory location
PC IR
A B C
ALU
Step 4
104 LOAD B,2004
100
LOAD A,2000
LOAD B,2004
ADD A,B,C
STORE C,2008
100
104
108
112
100
50
2000
2008
2004
Memory location
PC IR
A B C
ALU
Step 5
104 LOAD B,2004
100 50
LOAD A,2000
LOAD B,2004
ADD A,B,C
STORE C,2008
100
104
108
112
100
50
2000
2008
2004
Memory location
PC IR
A B C
ALU
Step 6
108
100 50
LOAD A,2000
LOAD B,2004
ADD A,B,C
STORE C,2008
100
104
108
112
100
50
2000
2008
2004
Memory location
PC IR
A B C
ALU
Step 7
108 ADD A,B,C
100 50
LOAD A,2000
LOAD B,2004
ADD A,B,C
STORE C,2008
100
104
108
112
100
50
2000
2008
2004
Memory location
PC IR
A B C
ALU
Step 8
108 ADD A,B,C
100 50 150
LOAD A,2000
LOAD B,2004
ADD A,B,C
STORE C,2008
100
104
108
112
100
50
2000
2008
2004
Memory location
PC IR
A B C
ALU
Step 9
112
100 50 150
LOAD A,2000
LOAD B,2004
ADD A,B,C
STORE C,2008
100
104
108
112
100
50
2000
2008
2004
Memory location
PC IR
A B C
ALU
Step 10
112 STORE C,2008
100 50 150
LOAD A,2000
LOAD B,2004
ADD A,B,C
STORE C,2008
100
104
108
112
100
50
2000
2008
2004
Memory location
PC IR
A B C
ALU
Step 11
112 STORE C,2008
100 50 150
LOAD A,2000
LOAD B,2004
ADD A,B,C
STORE C,2008
100
104
108
112
100
50
150
2000
2008
2004
Memory location
PC IR
A B C
ALU
Step 12
Registers• Instruction decoder
• Program counter(PC)
• Instruction register(IR)
• Process status register
• Accumulator
• General purpose register
• Memory address register
• Memory data register
• Address decoder
Want to learn more about programming or Looking to become a good programmer?
Are you wasting time on searching so many contents online?
Do you want to learn things quickly?
Tired of spending huge amount of money to become a Software professional?
Do an online course @ baabtra.com
We put industry standards to practice. Our structured, activity based courses are so designedto make a quick, good software professional out of anybody who holds a passion for coding.
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