SlideShare a Scribd company logo
1 of 9
Instruction format
1.Three address instruction format
2.Two address instruction format
3.One address instruction format
4. Zero address instruction format
Instruction
• Programme: a sequence of instructions
• Instructions: An instruction is a command given to the computer to
perform a specific operation.
• An instruction is a group of bits (binary code) that instructs the
computer to perform a specific operation.
• The purpose of an instruction is to specify both operation to be
performed by CPU and the set of a operands or data.
• Operation. Include add, subtract, multiplication, shift etc. Operations
are performed on data (operands).
• Operands include the input data and the results that are produced.
What is instruction format?
• An instruction format is a binary format which specifies a computer
instruction
• The bits of the instructions are divided into groups called fields.
• The most common fields in instruction format are:
• Opcode( operation code): An operation code field is specifies the operation
to be performed such as add, subtract ,multiplication, shift etc.
• Address: An address field specifies a memory address or processor register
where operand is stored.
• Mode: A Mode field specifies the way the operand or the effective address
of the Operand is determind ( or located).
CPU organisations and types of instructions
• Computers may have instructions of several different lengths
containing varying number of addresses (address field maybe 3,2,1,0).
• The number of address field in the instruction format depends on the
internal organisation of its registers.
• Most computers fall into one of the three types of CPU organisations
• Single accumulator organisation
• General register organisation
• Stack organisation
Types of instruction format/ types of address
instructions
• 1.General register organisation
• Three address instruction format
• Two address instruction format
• 2.Single accumulator organisation
• One address instruction format
• 3.Stack Organisation
• Zero address instruction format
Classification of instructions based on CPU
organisations
• Single accumulator organisation
• All operations are performed on one implied accumulator(AC)register.
• With one operand implicitly in the accumulated register minimise the internal complexity of the
machine and allow for short instructions.
• The instruction format uses only one address field.
• Ex. Evaluate X=(A+B) *(C+D)
• LOAD. A. AC<— M[A]
• ADD B. AC<—AC+M[B]
• STORE. T. M[T]<— AC
• LOAD C. AC M[C]
• ADD D. AC<—AC+M[D]
• MUL. T. AC<—AC*. M[T]
• STORE. X. M[X]<—AC
General register organisation
• It uses set of general purpose register R0, R1 ,R2…. one of the most
widely accepted models for machine architecture today.
• The instruction format needs two or three address fields according to
the operation.
• Ex. Evaluate X=(A+B)*(C+D)
• Three address instructions
• ADD R1,A,B R1<—M[A]+M[B]
• ADD R2,C,D R2<—M[C]+M[D]
• MUL X,R1,R2 M[X]<—R1*R2
Two address instruction
• Ex. X=(A+B)*(C+D)
• MOV R1,A R1<—M[A]
• ADD R1,B R1<—R1+M[B]
• MOV R2,C R2<—M[C]
• ADD R2,D R2<—R2+M[D]
• MUL R1,R2 R1<—R1+R2
• MOV X,R1 M[X]<—R1
Zero address instruction
• PUSH A TOS<—A
• PUSH B TOS<—B
• ADD TOS<—(A+B)
• PUSH C TOS<—C
• PUSH D TOS<—D
• ADD TOS<—(C+D)
• MUL TOS<—(C+D)*(A+B)
• POP X M[X]<—TOS

More Related Content

What's hot

Instruction Set Architecture (ISA)
Instruction Set Architecture (ISA)Instruction Set Architecture (ISA)
Instruction Set Architecture (ISA)Gaditek
 
instruction format and addressing modes
instruction format and addressing modesinstruction format and addressing modes
instruction format and addressing modesRamaPrabha24
 
memory reference instruction
memory reference instructionmemory reference instruction
memory reference instructionDeepikaT13
 
General register organization (computer organization)
General register organization  (computer organization)General register organization  (computer organization)
General register organization (computer organization)rishi ram khanal
 
Register transfer and micro-operation
Register transfer and micro-operationRegister transfer and micro-operation
Register transfer and micro-operationNikhil Pandit
 
Computer registers
Computer registersComputer registers
Computer registersDeepikaT13
 
Memory organization in computer architecture
Memory organization in computer architectureMemory organization in computer architecture
Memory organization in computer architectureFaisal Hussain
 
Register transfer language
Register transfer languageRegister transfer language
Register transfer languageSanjeev Patel
 
Instruction cycle
Instruction cycleInstruction cycle
Instruction cycleKumar
 
instruction cycle ppt
instruction cycle pptinstruction cycle ppt
instruction cycle pptsheetal singh
 
Memory Reference Instructions
Memory Reference InstructionsMemory Reference Instructions
Memory Reference InstructionsRabin BK
 
Instruction Execution Cycle
Instruction Execution CycleInstruction Execution Cycle
Instruction Execution Cycleutsav_shah
 

What's hot (20)

Instruction Set Architecture (ISA)
Instruction Set Architecture (ISA)Instruction Set Architecture (ISA)
Instruction Set Architecture (ISA)
 
Instruction cycle
Instruction cycleInstruction cycle
Instruction cycle
 
instruction format and addressing modes
instruction format and addressing modesinstruction format and addressing modes
instruction format and addressing modes
 
memory reference instruction
memory reference instructionmemory reference instruction
memory reference instruction
 
General register organization (computer organization)
General register organization  (computer organization)General register organization  (computer organization)
General register organization (computer organization)
 
Instruction format
Instruction formatInstruction format
Instruction format
 
Modes of transfer
Modes of transferModes of transfer
Modes of transfer
 
Register transfer and micro-operation
Register transfer and micro-operationRegister transfer and micro-operation
Register transfer and micro-operation
 
Computer registers
Computer registersComputer registers
Computer registers
 
Memory organization in computer architecture
Memory organization in computer architectureMemory organization in computer architecture
Memory organization in computer architecture
 
Addressing modes
Addressing modesAddressing modes
Addressing modes
 
ADDRESSING MODES
ADDRESSING MODESADDRESSING MODES
ADDRESSING MODES
 
Register transfer language
Register transfer languageRegister transfer language
Register transfer language
 
Instruction cycle
Instruction cycleInstruction cycle
Instruction cycle
 
instruction cycle ppt
instruction cycle pptinstruction cycle ppt
instruction cycle ppt
 
Memory Reference Instructions
Memory Reference InstructionsMemory Reference Instructions
Memory Reference Instructions
 
Interrupts
InterruptsInterrupts
Interrupts
 
Instruction code
Instruction codeInstruction code
Instruction code
 
Instruction Execution Cycle
Instruction Execution CycleInstruction Execution Cycle
Instruction Execution Cycle
 
Program control
Program controlProgram control
Program control
 

Similar to Instruction Formats and CPU Organizations

Computer_Organization and architecture _unit 1.pptx
Computer_Organization and architecture _unit 1.pptxComputer_Organization and architecture _unit 1.pptx
Computer_Organization and architecture _unit 1.pptxManimegalaM3
 
Computer Organization and Design.pptx
Computer Organization and Design.pptxComputer Organization and Design.pptx
Computer Organization and Design.pptxSherinRappai
 
instruction sets (1).pptx
instruction sets (1).pptxinstruction sets (1).pptx
instruction sets (1).pptxAmanMomin9
 
Computer Organisation and Architecture
Computer Organisation and ArchitectureComputer Organisation and Architecture
Computer Organisation and ArchitectureSubhasis Dash
 
Introduction to Simplified instruction computer or SIC/XE
Introduction to Simplified instruction computer or SIC/XEIntroduction to Simplified instruction computer or SIC/XE
Introduction to Simplified instruction computer or SIC/XETemesgen Molla
 
Machine language program execution 1.1.2.pptx
Machine language program execution 1.1.2.pptxMachine language program execution 1.1.2.pptx
Machine language program execution 1.1.2.pptxAmarRaj22
 
Basic computer organization and design
Basic computer organization and designBasic computer organization and design
Basic computer organization and designmahesh kumar prajapat
 
Computer Organization : CPU, Memory and I/O organization
Computer Organization : CPU, Memory and I/O organizationComputer Organization : CPU, Memory and I/O organization
Computer Organization : CPU, Memory and I/O organizationAmrutaMehata
 
Ch8_CENTRAL PROCESSING UNIT Registers ALU
Ch8_CENTRAL PROCESSING UNIT Registers ALUCh8_CENTRAL PROCESSING UNIT Registers ALU
Ch8_CENTRAL PROCESSING UNIT Registers ALURNShukla7
 
Computer architecture instruction formats
Computer architecture instruction formatsComputer architecture instruction formats
Computer architecture instruction formatsMazin Alwaaly
 
Unit 1 computer architecture (1)
Unit 1   computer architecture (1)Unit 1   computer architecture (1)
Unit 1 computer architecture (1)DevaKumari Vijay
 

Similar to Instruction Formats and CPU Organizations (20)

COA.pptx
COA.pptxCOA.pptx
COA.pptx
 
Computer_Organization and architecture _unit 1.pptx
Computer_Organization and architecture _unit 1.pptxComputer_Organization and architecture _unit 1.pptx
Computer_Organization and architecture _unit 1.pptx
 
UNIT-3.pptx
UNIT-3.pptxUNIT-3.pptx
UNIT-3.pptx
 
Computer Organization and Design.pptx
Computer Organization and Design.pptxComputer Organization and Design.pptx
Computer Organization and Design.pptx
 
instruction sets (1).pptx
instruction sets (1).pptxinstruction sets (1).pptx
instruction sets (1).pptx
 
instruction format.pptx
instruction format.pptxinstruction format.pptx
instruction format.pptx
 
Chapter3.ppt
Chapter3.pptChapter3.ppt
Chapter3.ppt
 
Computer Organisation and Architecture
Computer Organisation and ArchitectureComputer Organisation and Architecture
Computer Organisation and Architecture
 
Introduction to Simplified instruction computer or SIC/XE
Introduction to Simplified instruction computer or SIC/XEIntroduction to Simplified instruction computer or SIC/XE
Introduction to Simplified instruction computer or SIC/XE
 
Basic non pipelined cpu architecture
Basic non pipelined cpu architectureBasic non pipelined cpu architecture
Basic non pipelined cpu architecture
 
Machine language program execution 1.1.2.pptx
Machine language program execution 1.1.2.pptxMachine language program execution 1.1.2.pptx
Machine language program execution 1.1.2.pptx
 
Basic computer organization and design
Basic computer organization and designBasic computer organization and design
Basic computer organization and design
 
Computer Organization : CPU, Memory and I/O organization
Computer Organization : CPU, Memory and I/O organizationComputer Organization : CPU, Memory and I/O organization
Computer Organization : CPU, Memory and I/O organization
 
Computer architecture
Computer architectureComputer architecture
Computer architecture
 
Ch8_CENTRAL PROCESSING UNIT Registers ALU
Ch8_CENTRAL PROCESSING UNIT Registers ALUCh8_CENTRAL PROCESSING UNIT Registers ALU
Ch8_CENTRAL PROCESSING UNIT Registers ALU
 
Cpu unit
Cpu unitCpu unit
Cpu unit
 
Computer architecture instruction formats
Computer architecture instruction formatsComputer architecture instruction formats
Computer architecture instruction formats
 
Central processor organization
Central processor organizationCentral processor organization
Central processor organization
 
Unit 1 computer architecture (1)
Unit 1   computer architecture (1)Unit 1   computer architecture (1)
Unit 1 computer architecture (1)
 
CSA PPT UNIT 1.pptx
CSA PPT UNIT 1.pptxCSA PPT UNIT 1.pptx
CSA PPT UNIT 1.pptx
 

More from RaaviKapoor

CENSORSHIP OF MEDIA : PROS & CONS
CENSORSHIP OF MEDIA : PROS & CONSCENSORSHIP OF MEDIA : PROS & CONS
CENSORSHIP OF MEDIA : PROS & CONSRaaviKapoor
 
B tree ,B plus and graph
B tree ,B plus and graph B tree ,B plus and graph
B tree ,B plus and graph RaaviKapoor
 
PARTIES AND THE PARTY SYSTEM IN INDIA
PARTIES AND THE PARTY SYSTEM IN INDIAPARTIES AND THE PARTY SYSTEM IN INDIA
PARTIES AND THE PARTY SYSTEM IN INDIARaaviKapoor
 
Era of one party dominance
Era of one party dominanceEra of one party dominance
Era of one party dominanceRaaviKapoor
 
Politics of planned development
Politics of planned developmentPolitics of planned development
Politics of planned developmentRaaviKapoor
 
Plant Presentation
Plant PresentationPlant Presentation
Plant PresentationRaaviKapoor
 
Binary Search Tree.pptx
Binary Search Tree.pptxBinary Search Tree.pptx
Binary Search Tree.pptxRaaviKapoor
 

More from RaaviKapoor (10)

CENSORSHIP OF MEDIA : PROS & CONS
CENSORSHIP OF MEDIA : PROS & CONSCENSORSHIP OF MEDIA : PROS & CONS
CENSORSHIP OF MEDIA : PROS & CONS
 
B tree ,B plus and graph
B tree ,B plus and graph B tree ,B plus and graph
B tree ,B plus and graph
 
PARTIES AND THE PARTY SYSTEM IN INDIA
PARTIES AND THE PARTY SYSTEM IN INDIAPARTIES AND THE PARTY SYSTEM IN INDIA
PARTIES AND THE PARTY SYSTEM IN INDIA
 
Era of one party dominance
Era of one party dominanceEra of one party dominance
Era of one party dominance
 
Politics of planned development
Politics of planned developmentPolitics of planned development
Politics of planned development
 
Plant Presentation
Plant PresentationPlant Presentation
Plant Presentation
 
Linked List
Linked ListLinked List
Linked List
 
Binary Search Tree.pptx
Binary Search Tree.pptxBinary Search Tree.pptx
Binary Search Tree.pptx
 
Acid Rain
Acid RainAcid Rain
Acid Rain
 
IT.pptx
IT.pptxIT.pptx
IT.pptx
 

Recently uploaded

Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024BookNet Canada
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Bluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfBluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfngoud9212
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
Unlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power SystemsUnlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power SystemsPrecisely
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsAndrey Dotsenko
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
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
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDGMarianaLemus7
 

Recently uploaded (20)

Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Bluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfBluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdf
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
Unlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power SystemsUnlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power Systems
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort ServiceHot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
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
 
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptxVulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDG
 

Instruction Formats and CPU Organizations

  • 1. Instruction format 1.Three address instruction format 2.Two address instruction format 3.One address instruction format 4. Zero address instruction format
  • 2. Instruction • Programme: a sequence of instructions • Instructions: An instruction is a command given to the computer to perform a specific operation. • An instruction is a group of bits (binary code) that instructs the computer to perform a specific operation. • The purpose of an instruction is to specify both operation to be performed by CPU and the set of a operands or data. • Operation. Include add, subtract, multiplication, shift etc. Operations are performed on data (operands). • Operands include the input data and the results that are produced.
  • 3. What is instruction format? • An instruction format is a binary format which specifies a computer instruction • The bits of the instructions are divided into groups called fields. • The most common fields in instruction format are: • Opcode( operation code): An operation code field is specifies the operation to be performed such as add, subtract ,multiplication, shift etc. • Address: An address field specifies a memory address or processor register where operand is stored. • Mode: A Mode field specifies the way the operand or the effective address of the Operand is determind ( or located).
  • 4. CPU organisations and types of instructions • Computers may have instructions of several different lengths containing varying number of addresses (address field maybe 3,2,1,0). • The number of address field in the instruction format depends on the internal organisation of its registers. • Most computers fall into one of the three types of CPU organisations • Single accumulator organisation • General register organisation • Stack organisation
  • 5. Types of instruction format/ types of address instructions • 1.General register organisation • Three address instruction format • Two address instruction format • 2.Single accumulator organisation • One address instruction format • 3.Stack Organisation • Zero address instruction format
  • 6. Classification of instructions based on CPU organisations • Single accumulator organisation • All operations are performed on one implied accumulator(AC)register. • With one operand implicitly in the accumulated register minimise the internal complexity of the machine and allow for short instructions. • The instruction format uses only one address field. • Ex. Evaluate X=(A+B) *(C+D) • LOAD. A. AC<— M[A] • ADD B. AC<—AC+M[B] • STORE. T. M[T]<— AC • LOAD C. AC M[C] • ADD D. AC<—AC+M[D] • MUL. T. AC<—AC*. M[T] • STORE. X. M[X]<—AC
  • 7. General register organisation • It uses set of general purpose register R0, R1 ,R2…. one of the most widely accepted models for machine architecture today. • The instruction format needs two or three address fields according to the operation. • Ex. Evaluate X=(A+B)*(C+D) • Three address instructions • ADD R1,A,B R1<—M[A]+M[B] • ADD R2,C,D R2<—M[C]+M[D] • MUL X,R1,R2 M[X]<—R1*R2
  • 8. Two address instruction • Ex. X=(A+B)*(C+D) • MOV R1,A R1<—M[A] • ADD R1,B R1<—R1+M[B] • MOV R2,C R2<—M[C] • ADD R2,D R2<—R2+M[D] • MUL R1,R2 R1<—R1+R2 • MOV X,R1 M[X]<—R1
  • 9. Zero address instruction • PUSH A TOS<—A • PUSH B TOS<—B • ADD TOS<—(A+B) • PUSH C TOS<—C • PUSH D TOS<—D • ADD TOS<—(C+D) • MUL TOS<—(C+D)*(A+B) • POP X M[X]<—TOS