SlideShare une entreprise Scribd logo
1  sur  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

Contenu connexe

Tendances

Computer organization and architecture
Computer organization and architectureComputer organization and architecture
Computer organization and architectureSubesh Kumar Yadav
 
memory reference instruction
memory reference instructionmemory reference instruction
memory reference instructionDeepikaT13
 
Instruction Execution Cycle
Instruction Execution CycleInstruction Execution Cycle
Instruction Execution Cycleutsav_shah
 
Fetch decode-execute presentation
Fetch decode-execute presentationFetch decode-execute presentation
Fetch decode-execute presentationchantellemallia
 
instruction cycle ppt
instruction cycle pptinstruction cycle ppt
instruction cycle pptsheetal singh
 
Input Output Organization
Input Output OrganizationInput Output Organization
Input Output OrganizationKamal Acharya
 
Introduction to computer architecture and organization
Introduction to computer architecture and organizationIntroduction to computer architecture and organization
Introduction to computer architecture and organizationMuhammad Ishaq
 
Basic computer organization
Basic computer organizationBasic computer organization
Basic computer organizationNitesh Singh
 
Memory Reference Instructions
Memory Reference InstructionsMemory Reference Instructions
Memory Reference InstructionsRabin BK
 
Instruction Set Architecture
Instruction Set ArchitectureInstruction Set Architecture
Instruction Set ArchitectureDilum Bandara
 
computer system structure
computer system structurecomputer system structure
computer system structureHAMZA AHMED
 
8257 DMA Controller
8257 DMA Controller8257 DMA Controller
8257 DMA ControllerShivamSood22
 
Instruction Set Architecture (ISA)
Instruction Set Architecture (ISA)Instruction Set Architecture (ISA)
Instruction Set Architecture (ISA)Gaditek
 
INSTRUCTION LEVEL PARALLALISM
INSTRUCTION LEVEL PARALLALISMINSTRUCTION LEVEL PARALLALISM
INSTRUCTION LEVEL PARALLALISMKamran Ashraf
 
Computer instruction
Computer instructionComputer instruction
Computer instructionSanjeev Patel
 
instruction format and addressing modes
instruction format and addressing modesinstruction format and addressing modes
instruction format and addressing modesRamaPrabha24
 

Tendances (20)

Computer organization and architecture
Computer organization and architectureComputer organization and architecture
Computer organization and architecture
 
memory reference instruction
memory reference instructionmemory reference instruction
memory reference instruction
 
Instruction Execution Cycle
Instruction Execution CycleInstruction Execution Cycle
Instruction Execution Cycle
 
Fetch decode-execute presentation
Fetch decode-execute presentationFetch decode-execute presentation
Fetch decode-execute presentation
 
instruction cycle ppt
instruction cycle pptinstruction cycle ppt
instruction cycle ppt
 
Input Output Organization
Input Output OrganizationInput Output Organization
Input Output Organization
 
Subroutine
SubroutineSubroutine
Subroutine
 
Introduction to computer architecture and organization
Introduction to computer architecture and organizationIntroduction to computer architecture and organization
Introduction to computer architecture and organization
 
Basic computer organization
Basic computer organizationBasic computer organization
Basic computer organization
 
Memory Reference Instructions
Memory Reference InstructionsMemory Reference Instructions
Memory Reference Instructions
 
Instruction Set Architecture
Instruction Set ArchitectureInstruction Set Architecture
Instruction Set Architecture
 
Cpu & its execution of instruction
Cpu & its execution of instructionCpu & its execution of instruction
Cpu & its execution of instruction
 
computer system structure
computer system structurecomputer system structure
computer system structure
 
Instruction format
Instruction formatInstruction format
Instruction format
 
8257 DMA Controller
8257 DMA Controller8257 DMA Controller
8257 DMA Controller
 
DMA and DMA controller
DMA and DMA controllerDMA and DMA controller
DMA and DMA controller
 
Instruction Set Architecture (ISA)
Instruction Set Architecture (ISA)Instruction Set Architecture (ISA)
Instruction Set Architecture (ISA)
 
INSTRUCTION LEVEL PARALLALISM
INSTRUCTION LEVEL PARALLALISMINSTRUCTION LEVEL PARALLALISM
INSTRUCTION LEVEL PARALLALISM
 
Computer instruction
Computer instructionComputer instruction
Computer instruction
 
instruction format and addressing modes
instruction format and addressing modesinstruction format and addressing modes
instruction format and addressing modes
 

En vedette

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
 
Computer instructions
Computer instructionsComputer instructions
Computer instructionsAnuj Modi
 
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
 

En vedette (9)

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
 
Computer instructions
Computer instructionsComputer instructions
Computer instructions
 
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
 

Similaire à 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
 
Computer Organization & Architecture (COA) Unit 2
Computer Organization & Architecture (COA) Unit 2Computer Organization & Architecture (COA) Unit 2
Computer Organization & Architecture (COA) Unit 2parthivrathodlits
 

Similaire à 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 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
 
Computer Organization & Architecture (COA) Unit 2
Computer Organization & Architecture (COA) Unit 2Computer Organization & Architecture (COA) Unit 2
Computer Organization & Architecture (COA) Unit 2
 

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

Plus 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
 

Dernier

Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxBkGupta21
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESmohitsingh558521
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 

Dernier (20)

Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptx
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 

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