SlideShare uma empresa Scribd logo
1 de 22
CPU & ITS EXECUTION OF
INSTRUCTION
Rajishma T
rajishmatnair@gmail.com
www.facebook.com/
Rajishma T Nair
twitter.com/username
in.linkedin.com/in/profilena
me
9020217968
Disclaimer: This presentation is prepared by trainees of
baabtra as a part of mentoring program. This is not official
document of baabtra –Mentoring Partner
Baabtra-Mentoring Partner is the mentoring division of baabte System Technologies Pvt .
Ltd
CPU
• Cpu or central processing unit is the brain of
every computer.
• Structure of a cpu:
• ALU
– The arithmatic/logic unit contains electronic circuitry that
executes all arithmatic and logical operations.
• CONTROL UNIT
– The control unit of the CPU contains cicuitry that uses
electrical signals to direct the entire computer system to carry
out,or execute,stored program instructions.
– The control unit must communicate with both the
arithmetic/logic unit and memory.
System bus
• Control bus
– The control bus is used by the CPU to direct and monitor the
actions of the other functional areas of the computer.
• Address bus
– The address bus consists of all the signals necessary to define any
of the possible memory address locations within the computer.
– The control bus is used by the CPU to direct and monitor the
actions of the other functional areas of the computer.
• Data Bus
– The bidirectional data bus, sometimes called the memory
bus, handles the transfer of all data and instructions between
functional areas of the computer.
Registers
• General purpose registers:
– A general purpose register is a memory cell.
– Each general purpose register has a unique name
– It is used to store intermediate result of complex computation
• Accumulator
– This Register is used for storing the Results those are produced by the
System..
• Instruction register:
– Instruction register Contains the current instruction being executed by
the CPU.
– The CPU will perform the operation indicated by the instruction code
contained in the instruction register.
• MAR(memory address register):
– This register holds the memory addresses of data and instructions.
– This regster is used to access data and instructions from memory during
the execution of an instruction.
• MDR(Memory data register)
– It is the register that contains the data to be stored in the
computer storage or data after a fetch from the computer
storage.
– It acts like a buffer and holds anything that is copied from the
memory ready for the processor to use it,
• Index register:
– A hardware element which holds a number that can be added
to (or, in some cases, subtracted from) the address portion of
a computer instruction to form an effective address.
– An index register in a computer's CPU is a processor register
used for modifying operand addresses during the run of a
program.
• Data register:
– A register used in microcomputers to temporarily store data
being transmitted to or from a peripheral device.
• Program counter:
– This register contains the address of the next instruction
– The 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 ex: the result of a comparison operation.
– When the CPU compares 2 numbers a and b the outcome of
the 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
• Equal
• Not equal
• Greater than
• Greater than or equal
• Less than
• Less than or equal
Types of instruction
• Cpu executes following 3 types of instructions
• Arithmatic and logic operation
• Eg: +,-,and,or
• The result of an arithmatic operation is often stored
in general purpose registers.
• Memory transfer instruction
• Transfer the content from some specific memory
location to a specific register(memory cell) in the cpu
and vice versa
• Branch instructions
– A branch instruction will cause the cpu to branch or jump to
the specified location in memory.
– after the jump has occurred the cpu will continue to execute
the instructions in sequence until another branch or jump
instruction is encountered
– There are two types of branch instructions:
• A unconditional branch instruction always cause
the cpu to jump to the target location.
• A conditional branch instruction will only cause
the cpu to jump to the target location when the
specified condition is met.
Instruction execution cycle
• Fetch the instruction
• Decode the instruction
• Execute the instruction
• Store the instruction
fetch
1. Load the address of next instruction in the PC into the MAR.
– So that the control unit can fetch the instruction from the right part
of the memory.
2. Copy the instruction/data that is in the memory address
given by the MAR into the MDR.
– MDR is used whenever anything is to go from the CPU to main
memory, or vice versa.
3. Increment the PC by 1.
– So that it contains the address of the next instruction, assuming that
the instructions are in consecutive locations.
4. Load the instruction/data that is now in the MDR into the IR.
– Thus the next instruction is copied from memory -> MDR -> IR.
decode
1. Contents of IR split into operation code and
address if present e.g. store, add or jump
instructions.
2. Decode the instruction that is in the IR
execute
• If the instruction is a jump instruction then
– Load the address part of the instruction in the IR into the PC.
• If the instruction is an input / load (directly) instruction then
take data input and place in accumulator.
• If the instruction is a load (from memory) instruction.
– Copy address part of the instruction (to load from) in the IR into MAR.
– Copy data from memory address held in MAR to MDR.
– Copy data in MDR into accumulator
• Execute contd
• If the instruction is a store instruction then:
– Copy address part of the instruction (to store in) in the IR into MAR.
– Copy data in accumulator to MDR.
– Copy data in MDR into memory address held in MAR.
• If the instruction is an add instruction then:
– Copy address part of the instruction (of number to add) in the IR
into MAR.
– Copy number from memory address held in MAR into MDR.
– Add number in MDR to number in accumulator (accumulator will
now hold the result).
• If the instruction is an output (from memory) instruction
then:
– Copy address part of part of the instruction (of data to output) in IR
into MAR.
– Output contents of MDR.
Store the output
• Result of calculations in cpu stored in main
memory or sent to output devices.
• program Counter could be updated to a new
address
If this presentation helped you, please visit our
page facebook.com/baabtra and like it.
Thanks in advance.
www.baabtra.com | www.massbaab.com |www.baabte.com
Contact Us
Emarald Mall (Big Bazar Building)
Mavoor Road, Kozhikode,
Kerala, India.
Ph: + 91 – 495 40 25 550
NC Complex, Near Bus Stand
Mukkam, Kozhikode,
Kerala, India.
Ph: + 91 – 495 40 25 550
Start up Village
Eranakulam,
Kerala, India.
Email: info@baabtra.com

Mais conteúdo relacionado

Mais procurados

Computer architecture pipelining
Computer architecture pipeliningComputer architecture pipelining
Computer architecture pipeliningMazin Alwaaly
 
Control Units : Microprogrammed and Hardwired:control unit
Control Units : Microprogrammed and Hardwired:control unitControl Units : Microprogrammed and Hardwired:control unit
Control Units : Microprogrammed and Hardwired:control unitabdosaidgkv
 
General register organization (computer organization)
General register organization  (computer organization)General register organization  (computer organization)
General register organization (computer organization)rishi ram khanal
 
Direct memory access
Direct memory accessDirect memory access
Direct memory accessshubham kuwar
 
Memory organization in computer architecture
Memory organization in computer architectureMemory organization in computer architecture
Memory organization in computer architectureFaisal Hussain
 
Direct memory access (dma)
Direct memory access (dma)Direct memory access (dma)
Direct memory access (dma)Zubair Khalid
 
Dma transfer
Dma transferDma transfer
Dma transfergmnithya
 
Computer instructions
Computer instructionsComputer instructions
Computer instructionsAnuj Modi
 
Computer architecture control unit
Computer architecture control unitComputer architecture control unit
Computer architecture control unitMazin Alwaaly
 
Computer instruction
Computer instructionComputer instruction
Computer instructionSanjeev Patel
 
Interrupts of 8085
Interrupts of 8085Interrupts of 8085
Interrupts of 8085ShivamSood22
 
Timing and control
Timing and controlTiming and control
Timing and controlchauhankapil
 

Mais procurados (20)

Hardwired control
Hardwired controlHardwired control
Hardwired control
 
Computer architecture pipelining
Computer architecture pipeliningComputer architecture pipelining
Computer architecture pipelining
 
Control Units : Microprogrammed and Hardwired:control unit
Control Units : Microprogrammed and Hardwired:control unitControl Units : Microprogrammed and Hardwired:control unit
Control Units : Microprogrammed and Hardwired:control unit
 
General register organization (computer organization)
General register organization  (computer organization)General register organization  (computer organization)
General register organization (computer organization)
 
Addressing modes
Addressing modesAddressing modes
Addressing modes
 
Registers
RegistersRegisters
Registers
 
Direct memory access
Direct memory accessDirect memory access
Direct memory access
 
Microprogrammed Control Unit
Microprogrammed Control UnitMicroprogrammed Control Unit
Microprogrammed Control Unit
 
Memory organization in computer architecture
Memory organization in computer architectureMemory organization in computer architecture
Memory organization in computer architecture
 
Direct memory access (dma)
Direct memory access (dma)Direct memory access (dma)
Direct memory access (dma)
 
Instruction cycle
Instruction cycleInstruction cycle
Instruction cycle
 
Modes of transfer
Modes of transferModes of transfer
Modes of transfer
 
Dma transfer
Dma transferDma transfer
Dma transfer
 
Instruction format
Instruction formatInstruction format
Instruction format
 
ADDRESSING MODES
ADDRESSING MODESADDRESSING MODES
ADDRESSING MODES
 
Computer instructions
Computer instructionsComputer instructions
Computer instructions
 
Computer architecture control unit
Computer architecture control unitComputer architecture control unit
Computer architecture control unit
 
Computer instruction
Computer instructionComputer instruction
Computer instruction
 
Interrupts of 8085
Interrupts of 8085Interrupts of 8085
Interrupts of 8085
 
Timing and control
Timing and controlTiming and control
Timing and control
 

Destaque

Ch1 introducing computer systems
Ch1 introducing computer  systemsCh1 introducing computer  systems
Ch1 introducing computer systemscs001
 
Fetch Execute Cycle
Fetch Execute CycleFetch Execute Cycle
Fetch Execute Cyclepy7rjs
 
Instruction cycle
Instruction cycleInstruction cycle
Instruction cycleKumar
 
Introduction to computer
Introduction  to  computerIntroduction  to  computer
Introduction to computerhina amir
 
Introduction to Computers
Introduction to ComputersIntroduction to Computers
Introduction to ComputersSamudin Kassan
 
Computer networking devices
Computer networking devicesComputer networking devices
Computer networking devicesRajesh Sadhukha
 

Destaque (8)

New Coding Vocabulary
New Coding VocabularyNew Coding Vocabulary
New Coding Vocabulary
 
Ch1 introducing computer systems
Ch1 introducing computer  systemsCh1 introducing computer  systems
Ch1 introducing computer systems
 
Fetch Execute Cycle
Fetch Execute CycleFetch Execute Cycle
Fetch Execute Cycle
 
Instruction cycle
Instruction cycleInstruction cycle
Instruction cycle
 
Introduction to computer
Introduction  to  computerIntroduction  to  computer
Introduction to computer
 
Cpu ppt cse
Cpu ppt cseCpu ppt cse
Cpu ppt cse
 
Introduction to Computers
Introduction to ComputersIntroduction to Computers
Introduction to Computers
 
Computer networking devices
Computer networking devicesComputer networking devices
Computer networking devices
 

Semelhante a Cpu & its execution of instruction

Computer Organisation & Architecture (chapter 1)
Computer Organisation & Architecture (chapter 1) Computer Organisation & Architecture (chapter 1)
Computer Organisation & Architecture (chapter 1) Subhasis Dash
 
Computer Organization and Architechuture basics
Computer Organization and Architechuture basicsComputer Organization and Architechuture basics
Computer Organization and Architechuture basicsLucky Sithole
 
Central Processing Unit (Instruction Circle)
Central Processing Unit (Instruction Circle)Central Processing Unit (Instruction Circle)
Central Processing Unit (Instruction Circle)muhd afiq
 
its about information process cycle and its components
its about information process cycle and its componentsits about information process cycle and its components
its about information process cycle and its componentsssuserf86fba
 
Computer Architecture | Computer Fundamental and Organization
Computer Architecture | Computer Fundamental and OrganizationComputer Architecture | Computer Fundamental and Organization
Computer Architecture | Computer Fundamental and OrganizationSmit Luvani
 
Unit 1 processormemoryorganisation
Unit 1 processormemoryorganisationUnit 1 processormemoryorganisation
Unit 1 processormemoryorganisationKarunamoorthy B
 
Unit 2 processor&memory-organisation
Unit 2 processor&memory-organisationUnit 2 processor&memory-organisation
Unit 2 processor&memory-organisationPavithra S
 
Memory & the fetch decode-execute cycle
Memory & the fetch decode-execute cycleMemory & the fetch decode-execute cycle
Memory & the fetch decode-execute cyclechantellemallia
 
Computer Organization and Design.pptx
Computer Organization and Design.pptxComputer Organization and Design.pptx
Computer Organization and Design.pptxSherinRappai
 
HHCJ AMUMARA:COMPUTER STUDIES LECTURE NOTE FOR SS3:005
HHCJ AMUMARA:COMPUTER STUDIES LECTURE NOTE FOR SS3:005HHCJ AMUMARA:COMPUTER STUDIES LECTURE NOTE FOR SS3:005
HHCJ AMUMARA:COMPUTER STUDIES LECTURE NOTE FOR SS3:005SOLOMONCHINAEMEUCHEA
 

Semelhante a Cpu & its execution of instruction (20)

Cpu and its execution statements
Cpu and its execution statementsCpu and its execution statements
Cpu and its execution statements
 
Cpu & its execution of instruction
Cpu & its execution of instructionCpu & its execution of instruction
Cpu & its execution of instruction
 
CPU and its execution of instruction
CPU and its execution of instructionCPU and its execution of instruction
CPU and its execution of instruction
 
Cpu execution
Cpu executionCpu execution
Cpu execution
 
CAO.pptx
CAO.pptxCAO.pptx
CAO.pptx
 
Computer Organisation & Architecture (chapter 1)
Computer Organisation & Architecture (chapter 1) Computer Organisation & Architecture (chapter 1)
Computer Organisation & Architecture (chapter 1)
 
Computer Organization and Architechuture basics
Computer Organization and Architechuture basicsComputer Organization and Architechuture basics
Computer Organization and Architechuture basics
 
Chap 3 CA.pptx
Chap 3 CA.pptxChap 3 CA.pptx
Chap 3 CA.pptx
 
Central Processing Unit (Instruction Circle)
Central Processing Unit (Instruction Circle)Central Processing Unit (Instruction Circle)
Central Processing Unit (Instruction Circle)
 
its about information process cycle and its components
its about information process cycle and its componentsits about information process cycle and its components
its about information process cycle and its components
 
Computer Architecture | Computer Fundamental and Organization
Computer Architecture | Computer Fundamental and OrganizationComputer Architecture | Computer Fundamental and Organization
Computer Architecture | Computer Fundamental and Organization
 
Unit 1 processormemoryorganisation
Unit 1 processormemoryorganisationUnit 1 processormemoryorganisation
Unit 1 processormemoryorganisation
 
Unit 2 processor&memory-organisation
Unit 2 processor&memory-organisationUnit 2 processor&memory-organisation
Unit 2 processor&memory-organisation
 
INSTRUCTION CYCLE
INSTRUCTION CYCLEINSTRUCTION CYCLE
INSTRUCTION CYCLE
 
Memory & the fetch decode-execute cycle
Memory & the fetch decode-execute cycleMemory & the fetch decode-execute cycle
Memory & the fetch decode-execute cycle
 
Computer Organization and Design.pptx
Computer Organization and Design.pptxComputer Organization and Design.pptx
Computer Organization and Design.pptx
 
HHCJ AMUMARA:COMPUTER STUDIES LECTURE NOTE FOR SS3:005
HHCJ AMUMARA:COMPUTER STUDIES LECTURE NOTE FOR SS3:005HHCJ AMUMARA:COMPUTER STUDIES LECTURE NOTE FOR SS3:005
HHCJ AMUMARA:COMPUTER STUDIES LECTURE NOTE FOR SS3:005
 
Chapter 8
Chapter 8Chapter 8
Chapter 8
 
Chapter01 (1).ppt
Chapter01 (1).pptChapter01 (1).ppt
Chapter01 (1).ppt
 
Central processing unit i
Central processing unit iCentral processing unit i
Central processing unit i
 

Mais de baabtra.com - No. 1 supplier of quality freshers

Mais de baabtra.com - No. 1 supplier of quality freshers (20)

Agile methodology and scrum development
Agile methodology and scrum developmentAgile methodology and scrum development
Agile methodology and scrum development
 
Best coding practices
Best coding practicesBest coding practices
Best coding practices
 
Core java - baabtra
Core java - baabtraCore java - baabtra
Core java - baabtra
 
Acquiring new skills what you should know
Acquiring new skills   what you should knowAcquiring new skills   what you should know
Acquiring new skills what you should know
 
Baabtra.com programming at school
Baabtra.com programming at schoolBaabtra.com programming at school
Baabtra.com programming at school
 
99LMS for Enterprises - LMS that you will love
99LMS for Enterprises - LMS that you will love 99LMS for Enterprises - LMS that you will love
99LMS for Enterprises - LMS that you will love
 
Php sessions & cookies
Php sessions & cookiesPhp sessions & cookies
Php sessions & cookies
 
Php database connectivity
Php database connectivityPhp database connectivity
Php database connectivity
 
Chapter 6 database normalisation
Chapter 6  database normalisationChapter 6  database normalisation
Chapter 6 database normalisation
 
Chapter 5 transactions and dcl statements
Chapter 5  transactions and dcl statementsChapter 5  transactions and dcl statements
Chapter 5 transactions and dcl statements
 
Chapter 4 functions, views, indexing
Chapter 4  functions, views, indexingChapter 4  functions, views, indexing
Chapter 4 functions, views, indexing
 
Chapter 3 stored procedures
Chapter 3 stored proceduresChapter 3 stored procedures
Chapter 3 stored procedures
 
Chapter 2 grouping,scalar and aggergate functions,joins inner join,outer join
Chapter 2  grouping,scalar and aggergate functions,joins   inner join,outer joinChapter 2  grouping,scalar and aggergate functions,joins   inner join,outer join
Chapter 2 grouping,scalar and aggergate functions,joins inner join,outer join
 
Chapter 1 introduction to sql server
Chapter 1 introduction to sql serverChapter 1 introduction to sql server
Chapter 1 introduction to sql server
 
Chapter 1 introduction to sql server
Chapter 1 introduction to sql serverChapter 1 introduction to sql server
Chapter 1 introduction to sql server
 
Microsoft holo lens
Microsoft holo lensMicrosoft holo lens
Microsoft holo lens
 
Blue brain
Blue brainBlue brain
Blue brain
 
5g
5g5g
5g
 
Aptitude skills baabtra
Aptitude skills baabtraAptitude skills baabtra
Aptitude skills baabtra
 
Gd baabtra
Gd baabtraGd baabtra
Gd baabtra
 

Último

What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 

Último (20)

What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 

Cpu & its execution of instruction

  • 1.
  • 2. CPU & ITS EXECUTION OF INSTRUCTION Rajishma T rajishmatnair@gmail.com www.facebook.com/ Rajishma T Nair twitter.com/username in.linkedin.com/in/profilena me 9020217968
  • 3. Disclaimer: This presentation is prepared by trainees of baabtra as a part of mentoring program. This is not official document of baabtra –Mentoring Partner Baabtra-Mentoring Partner is the mentoring division of baabte System Technologies Pvt . Ltd
  • 4. CPU • Cpu or central processing unit is the brain of every computer. • Structure of a cpu:
  • 5. • ALU – The arithmatic/logic unit contains electronic circuitry that executes all arithmatic and logical operations. • CONTROL UNIT – The control unit of the CPU contains cicuitry that uses electrical signals to direct the entire computer system to carry out,or execute,stored program instructions. – The control unit must communicate with both the arithmetic/logic unit and memory.
  • 6. System bus • Control bus – The control bus is used by the CPU to direct and monitor the actions of the other functional areas of the computer. • Address bus – The address bus consists of all the signals necessary to define any of the possible memory address locations within the computer. – The control bus is used by the CPU to direct and monitor the actions of the other functional areas of the computer. • Data Bus – The bidirectional data bus, sometimes called the memory bus, handles the transfer of all data and instructions between functional areas of the computer.
  • 7. Registers • General purpose registers: – A general purpose register is a memory cell. – Each general purpose register has a unique name – It is used to store intermediate result of complex computation • Accumulator – This Register is used for storing the Results those are produced by the System..
  • 8. • Instruction register: – Instruction register Contains the current instruction being executed by the CPU. – The CPU will perform the operation indicated by the instruction code contained in the instruction register. • MAR(memory address register): – This register holds the memory addresses of data and instructions. – This regster is used to access data and instructions from memory during the execution of an instruction.
  • 9. • MDR(Memory data register) – It is the register that contains the data to be stored in the computer storage or data after a fetch from the computer storage. – It acts like a buffer and holds anything that is copied from the memory ready for the processor to use it, • Index register: – A hardware element which holds a number that can be added to (or, in some cases, subtracted from) the address portion of a computer instruction to form an effective address. – An index register in a computer's CPU is a processor register used for modifying operand addresses during the run of a program.
  • 10. • Data register: – A register used in microcomputers to temporarily store data being transmitted to or from a peripheral device. • Program counter: – This register contains the address of the next instruction – The value in the program counter will be increased after the cpu finishes executing one instruction.
  • 11. • Process status register: – This register contains the various information about the cpu. – For ex: the result of a comparison operation. – When the CPU compares 2 numbers a and b the outcome of the 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 • Equal • Not equal • Greater than • Greater than or equal • Less than • Less than or equal
  • 12. Types of instruction • Cpu executes following 3 types of instructions • Arithmatic and logic operation • Eg: +,-,and,or • The result of an arithmatic operation is often stored in general purpose registers. • Memory transfer instruction • Transfer the content from some specific memory location to a specific register(memory cell) in the cpu and vice versa
  • 13. • Branch instructions – A branch instruction will cause the cpu to branch or jump to the specified location in memory. – after the jump has occurred the cpu will continue to execute the instructions in sequence until another branch or jump instruction is encountered – There are two types of branch instructions: • A unconditional branch instruction always cause the cpu to jump to the target location. • A conditional branch instruction will only cause the cpu to jump to the target location when the specified condition is met.
  • 14. Instruction execution cycle • Fetch the instruction • Decode the instruction • Execute the instruction • Store the instruction
  • 15. fetch 1. Load the address of next instruction in the PC into the MAR. – So that the control unit can fetch the instruction from the right part of the memory. 2. Copy the instruction/data that is in the memory address given by the MAR into the MDR. – MDR is used whenever anything is to go from the CPU to main memory, or vice versa. 3. Increment the PC by 1. – So that it contains the address of the next instruction, assuming that the instructions are in consecutive locations. 4. Load the instruction/data that is now in the MDR into the IR. – Thus the next instruction is copied from memory -> MDR -> IR.
  • 16. decode 1. Contents of IR split into operation code and address if present e.g. store, add or jump instructions. 2. Decode the instruction that is in the IR
  • 17. execute • If the instruction is a jump instruction then – Load the address part of the instruction in the IR into the PC. • If the instruction is an input / load (directly) instruction then take data input and place in accumulator. • If the instruction is a load (from memory) instruction. – Copy address part of the instruction (to load from) in the IR into MAR. – Copy data from memory address held in MAR to MDR. – Copy data in MDR into accumulator
  • 18. • Execute contd • If the instruction is a store instruction then: – Copy address part of the instruction (to store in) in the IR into MAR. – Copy data in accumulator to MDR. – Copy data in MDR into memory address held in MAR. • If the instruction is an add instruction then: – Copy address part of the instruction (of number to add) in the IR into MAR. – Copy number from memory address held in MAR into MDR. – Add number in MDR to number in accumulator (accumulator will now hold the result).
  • 19. • If the instruction is an output (from memory) instruction then: – Copy address part of part of the instruction (of data to output) in IR into MAR. – Output contents of MDR.
  • 20. Store the output • Result of calculations in cpu stored in main memory or sent to output devices. • program Counter could be updated to a new address
  • 21. If this presentation helped you, please visit our page facebook.com/baabtra and like it. Thanks in advance. www.baabtra.com | www.massbaab.com |www.baabte.com
  • 22. Contact Us Emarald Mall (Big Bazar Building) Mavoor Road, Kozhikode, Kerala, India. Ph: + 91 – 495 40 25 550 NC Complex, Near Bus Stand Mukkam, Kozhikode, Kerala, India. Ph: + 91 – 495 40 25 550 Start up Village Eranakulam, Kerala, India. Email: info@baabtra.com