SlideShare ist ein Scribd-Unternehmen logo
1 von 27
INSTRUCTION SET ARCHITECTURE
M JAFFER HAADI
INSTRUCTION SET ARCHITECTURE (ISA)
ISA (instruction set architecture)
 A well-defined hardware/software interface
 The “contract” between software and hardware
 Functional definition of storage locations &
operations
 Storage locations: registers, memory
 Operations: add, multiply, branch, load, store, etc
 Precise description of how to invoke & access them
• How operations are implemented
• Which operations are fast and which are slow and when
• Which operations take more power and which take less
• Instructions
 Bit-patterns hardware interprets as commands
 Instruction → Insn (instruction is too long to write in
slides)
A LANGUAGE ANALOGY FOR ISAS
Communication
 Person-to-person → software-to-hardware
Similar structure
 Narrative → program
 Sentence → insn
 Verb → operation (add, multiply, load, branch)
 Noun → data item (immediate, register value, memory
value)
 Adjective → addressing mode
Many different languages, many different ISAs
 Similar basic structure, details differ (sometimes greatly)
Key differences between languages and ISAs
 Languages evolve organically, many ambiguities,
inconsistencies
 ISAs are explicitly engineered and extended, unambiguous
PROGRAM COMPILATION
Program written in a “high-level” programming language
 C, C++, Java, C#
 Hierarchical, structured control: loops, functions, conditionals
 Hierarchical, structured data: scalars, arrays, pointers, structures
Compiler: translates program to assembly
 Parsing and straight-forward translation
 Compiler also optimizes
 Compiler itself another application … who compiled compiler?
INSTRUCTION EXECUTION MODEL
The computer is just finite state machine
 Registers (few of them, but fast)
 Memory (lots of memory, but slower)
 Program counter (next insn to execute)
 Called “instruction pointer” in x86
A computer executes instructions
 Fetches next instruction from memory
 Decodes it (figure out what it does)
 Reads its inputs (registers & memory)
 Executes it (adds, multiply, etc.)
 Write its outputs (registers & memory)
 Next insn (adjust the program counter)
Program is just “data in memory”
 Makes computers programmable (“universal”)
THE SEQUENTIAL MODEL
Basic structure of all modern ISAs
 Often called VonNeuman, but in ENIAC before
Program order: total order on dynamic insns
 Order and named storage define computation
Convenient feature: Program counter (PC)
 Insn itself stored in memory at location pointed to
by PC
 Next PC is next insn unless insn says otherwise
Processor logically executes loop at left
Atomic: insn finishes before next insn starts
 Implementations can break this constraint physically
 But must maintain illusion to preserve correctness
WHAT MAKES A GOOD ISA?
Programmability
 Easy to express programs efficiently?
Performance/Implementability
Easy to design high-performance implementations?
More recently
Easy to design low-power implementations?
Easy to design low-cost implementations?
Compatibility
Easy to maintain as languages, programs, and technology
evolve?
x86 (IA32) generations: 8086, 286, 386, 486, Pentium,
PentiumII,
PentiumIII, Pentium4, Core2, Core i7, …
TYPES OF INSTRUCTION SETS
1. Stack Architecture:
 The operands are put into the stack. Operations
take place at the top two locations on the stack,
destroying the operands, and leaving the result
on the top of the stack.
 Two operations, push and pop, have one
operand. Push a value at the top of the stack, or
pop the top element of the stack to a destination.
 This architecture was used in computers in 1960s.
TYPES OF INSTRUCTION SETS
1. Stack Architecture:
Suppose we want to ask a stack architecture machine to
conduct the operation C = A + B, where A, B, and C are
memory addresses. The result of A + B are stored at
location C.
- Then, to implement the operation in a stack
architecture, we
need the following steps:
PUSH A # push value at location A to the top of the stack
PUSH B # push value at location B to the top of the stack
ADD # add the top two elements of the stack and save the result back to the top of the stack
POP C # store the value at the top of the stack (which is the result) to location C
TYPES OF INSTRUCTION SETS
2. Accumulator Architecture
It places one operand in the accumulator and one in memory.
The one in the accumulator is implicit, and the one in the
memory is an explicit memory address. The result of ALU is
written back to the accumulator.
 The operand in the accumulator is loaded from memory
using the command LOAD, and the result is stored in
memory from accumulator using the command STORE.
 This architecture was used by early computers like IBM
7090. Today, it’s used by some microprocessor chips,
such as some digital signal processors.
TYPES OF INSTRUCTION SETS
2. Accumulator Architecture
Suppose we want to ask an accumulator architecture
machine to conduct the same operation C = A + B as above.
- Then, to implement the operation in an accumulator
architecture, we need the following steps:
LOAD A # load value at location A from main memory to ACC
ADD B # fetch the value at location B, add it with the value at ACC (which is the value A), and
save the result back to ACC
STORE C # store the value at ACC (which is the result of A + B) to location C
TYPES OF INSTRUCTION SETS
3. Register-Set Architecture: Modern CPUs have a number of general-
purpose registers (GPR's) for internal storage: at least 8 and as many as 32.
• GPR machines are the most flexible of all, because they allow the user to
access any of several registers.
• The load/store commands must typically specify a register and memory
location, to indicate both source and destination of the data.
• Any register can be used as an accumulator, an index register, or for
temporary storage, etc., so many variables and addresses can be
manipulated without extra memory accesses.
• The major bad point of having many registers is the large amount of internal
CPU state that must be saved/restore for calls, returns, and interrupts.
• There are 8 general-purpose registers in the 8086 microprocessor.
EXAMPLE
Lets look at the assembly code of
C = A + B;
in all 3 architectures:
CISC & RISC ARCHITECTURE
Need Of CISC:
In the past, it was believed that hardware design was easier than compiler
design
 Most programs were written in assembly language
 Hardware concerns of the past:
 Limited and slower memory
 Few registers
Register:
Registers are a type of computer memory used to quickly accept, store, and
transfer data and instructions that are being used immediately by the CPU.
The registers used by the CPU are often termed as Processor registers.
CISC & RISC ARCHITECTURE
CISC, which stands for Complex Instruction Set Computer.
 Each instruction executes multiple low level operations.
 Ex. A single instruction can load from memory, perform an
arithmetic operation, and store the result in memory.
 Smaller program size.
CISC & RISC ARCHITECTURE
CISC Characteristics
 A large number of instructions.
 Some instructions for special tasks used infrequently.
 A large variety of addressing modes (5 to 20).
 Variable length instruction formats.
Disadvantages :
However, it soon became apparent that a complex instruction set has a
number of disadvantages:
 These include a complex instruction decoding scheme, an
increased size of the control unit, and increased logic delays.
CISC & RISC ARCHITECTURE
RISC: RISC Stands for Reduced Instruction Set Computer.
 It is a microprocessor that is designed to perform a smaller number of types of
computer instruction so that it can operate at a higher speed.
RISC Characteristics :
 Relatively few instructions
 128 or less
 Relatively few addressing modes.
 Memory access is limited to LOAD and STORE instructions.
 All operations done within the registers of the CPU.
 This architectural feature simplifies the instruction set and encourages the optimization of
register manipulation.
 An essential RISC philosophy is to keep the most frequently accessed operands in
registers and minimize register-memory operations.
CISC & RISC ARCHITECTURE
CISC & RISC ARCHITECTURE
CISC & RISC ARCHITECTURE
CISC & RISC ARCHITECTURE
CISC & RISC ARCHITECTURE
CISC & RISC ARCHITECTURE
QUESTIONS:
 Q1: What is Instruction Set Architecture?
 An Instruction Set Architecture (ISA) is part of the abstract model of a computer that defines how
the CPU is controlled by the software. The ISA acts as an interface between the hardware and the
software, specifying both what the processor is capable of doing as well as how it gets done.
 Q2: What is Instruction Execution Model?
 The three cycle instruction. execution model. • To execute a program, the microprocessor “reads”
each instruction from memory, “interprets” it, then “executes” it.
 Q3: What is Stack Architecture?
 The stack is a list of data words. It uses the Last In First Out (LIFO) access method which is the most
popular access method in most of the CPU. A register is used to store the address of the topmost
element of the stack which is known as Stack pointer (SP).
QUESTIONS:
 Q4: Difference between CISC and RISC.
 The primary difference between RISC and CISC architecture is that RISC-based machines execute
one instruction per clock cycle. RISC does the opposite, reducing the cycles per instruction at the
cost of the number of instructions per program. In a CISC processor, each instruction performs so
many actions that it takes several clock cycles to complete. The CISC approach attempts to minimize
the number of instructions per program, sacrificing the number of cycles per instruction.
 Q5: What is Register?
 A processor register (CPU register) is one of a small set of data holding places that are part of the
computer processor. A register may hold an instruction, a storage address, or any kind of data (such
as a bit sequence or individual characters). Some instructions specify registers as part of the
instruction.
REFERENCES
 https://www.tutorialspoint.com/what-are-the-cpu-general-purpose-
registers#:~:text=General%20purpose%20registers%20are%20additional,address%20or%20data%20whe
never%20needed.
 https://www.learncomputerscienceonline.com/instruction-set-architecture/
 http://www.cs.kent.edu/~durand/CS0/Notes/Chapter05/isa.html
 https://people.engr.tamu.edu/djimenez/taco/utsa-www/cs5513-fall07/lecture2.html
 https://www.microcontrollertips.com/risc-vs-cisc-architectures-one-better/
THANK YOU
BSF1901551@UE.EDU.PK

Weitere ähnliche Inhalte

Was ist angesagt?

Cache memory
Cache memoryCache memory
Cache memory
Anuj Modi
 

Was ist angesagt? (20)

Von-Neumann machine and IAS architecture
Von-Neumann machine and  IAS architectureVon-Neumann machine and  IAS architecture
Von-Neumann machine and IAS architecture
 
Cache memory
Cache memoryCache memory
Cache memory
 
RISC - Reduced Instruction Set Computing
RISC - Reduced Instruction Set ComputingRISC - Reduced Instruction Set Computing
RISC - Reduced Instruction Set Computing
 
Cache memory
Cache memoryCache memory
Cache memory
 
Lil endian.ppt
Lil endian.pptLil endian.ppt
Lil endian.ppt
 
Cache memory
Cache  memoryCache  memory
Cache memory
 
Control Unit Design
Control Unit DesignControl Unit Design
Control Unit Design
 
Cache memory
Cache memoryCache memory
Cache memory
 
Memory system
Memory systemMemory system
Memory system
 
Processor organization & register organization
Processor organization & register organizationProcessor organization & register organization
Processor organization & register organization
 
Computer Organization Lecture Notes
Computer Organization Lecture NotesComputer Organization Lecture Notes
Computer Organization Lecture Notes
 
Microprogrammed Control Unit
Microprogrammed Control UnitMicroprogrammed Control Unit
Microprogrammed Control Unit
 
Instruction Set Architecture
Instruction  Set ArchitectureInstruction  Set Architecture
Instruction Set Architecture
 
Cache management
Cache managementCache management
Cache management
 
Instruction cycle
Instruction cycleInstruction cycle
Instruction cycle
 
Memory mapping
Memory mappingMemory mapping
Memory mapping
 
Basic Computer Architecture
Basic Computer ArchitectureBasic Computer Architecture
Basic Computer Architecture
 
Computer architecture
Computer architectureComputer architecture
Computer architecture
 
Harvard vs Von Neumann Architecture
Harvard vs Von Neumann ArchitectureHarvard vs Von Neumann Architecture
Harvard vs Von Neumann Architecture
 
Computer organization memory hierarchy
Computer organization memory hierarchyComputer organization memory hierarchy
Computer organization memory hierarchy
 

Ähnlich wie Instruction Set Architecture

Ähnlich wie Instruction Set Architecture (20)

CS304PC:Computer Organization and Architecture UNIT V_merged_merged.pdf
CS304PC:Computer Organization and Architecture UNIT V_merged_merged.pdfCS304PC:Computer Organization and Architecture UNIT V_merged_merged.pdf
CS304PC:Computer Organization and Architecture UNIT V_merged_merged.pdf
 
Processors used in System on chip
Processors used in System on chip Processors used in System on chip
Processors used in System on chip
 
Computer Organization.pptx
Computer Organization.pptxComputer Organization.pptx
Computer Organization.pptx
 
CISC & RISC Architecture
CISC & RISC Architecture CISC & RISC Architecture
CISC & RISC Architecture
 
Pragmatic optimization in modern programming - modern computer architecture c...
Pragmatic optimization in modern programming - modern computer architecture c...Pragmatic optimization in modern programming - modern computer architecture c...
Pragmatic optimization in modern programming - modern computer architecture c...
 
esunit1.pptx
esunit1.pptxesunit1.pptx
esunit1.pptx
 
Advanced Processor Power Point Presentation
Advanced Processor  Power Point  PresentationAdvanced Processor  Power Point  Presentation
Advanced Processor Power Point Presentation
 
Risc
RiscRisc
Risc
 
Presentation1.pptx
Presentation1.pptxPresentation1.pptx
Presentation1.pptx
 
risc_and_cisc.ppt
risc_and_cisc.pptrisc_and_cisc.ppt
risc_and_cisc.ppt
 
isa architecture
isa architectureisa architecture
isa architecture
 
Risc and cisc eugene clewlow
Risc and cisc   eugene clewlowRisc and cisc   eugene clewlow
Risc and cisc eugene clewlow
 
Risc and cisc eugene clewlow
Risc and cisc   eugene clewlowRisc and cisc   eugene clewlow
Risc and cisc eugene clewlow
 
Cao 2012
Cao 2012Cao 2012
Cao 2012
 
Cisc(a022& a023)
Cisc(a022& a023)Cisc(a022& a023)
Cisc(a022& a023)
 
Microcontroller architecture
Microcontroller architectureMicrocontroller architecture
Microcontroller architecture
 
M&i(lec#01)
M&i(lec#01)M&i(lec#01)
M&i(lec#01)
 
Microprocessor and Microcontroller Based Systems.ppt
Microprocessor and Microcontroller Based Systems.pptMicroprocessor and Microcontroller Based Systems.ppt
Microprocessor and Microcontroller Based Systems.ppt
 
Unit I_MT2301.pdf
Unit I_MT2301.pdfUnit I_MT2301.pdf
Unit I_MT2301.pdf
 
VTU University Micro Controllers-06ES42 lecturer Notes
VTU University Micro Controllers-06ES42 lecturer NotesVTU University Micro Controllers-06ES42 lecturer Notes
VTU University Micro Controllers-06ES42 lecturer Notes
 

Kürzlich hochgeladen

Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
ZurliaSoop
 

Kürzlich hochgeladen (20)

How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentation
 
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptxCOMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdf
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the Classroom
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
 
Wellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxWellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptx
 
How to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxHow to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptx
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 

Instruction Set Architecture

  • 2. INSTRUCTION SET ARCHITECTURE (ISA) ISA (instruction set architecture)  A well-defined hardware/software interface  The “contract” between software and hardware  Functional definition of storage locations & operations  Storage locations: registers, memory  Operations: add, multiply, branch, load, store, etc  Precise description of how to invoke & access them • How operations are implemented • Which operations are fast and which are slow and when • Which operations take more power and which take less • Instructions  Bit-patterns hardware interprets as commands  Instruction → Insn (instruction is too long to write in slides)
  • 3. A LANGUAGE ANALOGY FOR ISAS Communication  Person-to-person → software-to-hardware Similar structure  Narrative → program  Sentence → insn  Verb → operation (add, multiply, load, branch)  Noun → data item (immediate, register value, memory value)  Adjective → addressing mode Many different languages, many different ISAs  Similar basic structure, details differ (sometimes greatly) Key differences between languages and ISAs  Languages evolve organically, many ambiguities, inconsistencies  ISAs are explicitly engineered and extended, unambiguous
  • 4. PROGRAM COMPILATION Program written in a “high-level” programming language  C, C++, Java, C#  Hierarchical, structured control: loops, functions, conditionals  Hierarchical, structured data: scalars, arrays, pointers, structures Compiler: translates program to assembly  Parsing and straight-forward translation  Compiler also optimizes  Compiler itself another application … who compiled compiler?
  • 5. INSTRUCTION EXECUTION MODEL The computer is just finite state machine  Registers (few of them, but fast)  Memory (lots of memory, but slower)  Program counter (next insn to execute)  Called “instruction pointer” in x86 A computer executes instructions  Fetches next instruction from memory  Decodes it (figure out what it does)  Reads its inputs (registers & memory)  Executes it (adds, multiply, etc.)  Write its outputs (registers & memory)  Next insn (adjust the program counter) Program is just “data in memory”  Makes computers programmable (“universal”)
  • 6. THE SEQUENTIAL MODEL Basic structure of all modern ISAs  Often called VonNeuman, but in ENIAC before Program order: total order on dynamic insns  Order and named storage define computation Convenient feature: Program counter (PC)  Insn itself stored in memory at location pointed to by PC  Next PC is next insn unless insn says otherwise Processor logically executes loop at left Atomic: insn finishes before next insn starts  Implementations can break this constraint physically  But must maintain illusion to preserve correctness
  • 7. WHAT MAKES A GOOD ISA? Programmability  Easy to express programs efficiently? Performance/Implementability Easy to design high-performance implementations? More recently Easy to design low-power implementations? Easy to design low-cost implementations? Compatibility Easy to maintain as languages, programs, and technology evolve? x86 (IA32) generations: 8086, 286, 386, 486, Pentium, PentiumII, PentiumIII, Pentium4, Core2, Core i7, …
  • 8. TYPES OF INSTRUCTION SETS 1. Stack Architecture:  The operands are put into the stack. Operations take place at the top two locations on the stack, destroying the operands, and leaving the result on the top of the stack.  Two operations, push and pop, have one operand. Push a value at the top of the stack, or pop the top element of the stack to a destination.  This architecture was used in computers in 1960s.
  • 9. TYPES OF INSTRUCTION SETS 1. Stack Architecture: Suppose we want to ask a stack architecture machine to conduct the operation C = A + B, where A, B, and C are memory addresses. The result of A + B are stored at location C. - Then, to implement the operation in a stack architecture, we need the following steps: PUSH A # push value at location A to the top of the stack PUSH B # push value at location B to the top of the stack ADD # add the top two elements of the stack and save the result back to the top of the stack POP C # store the value at the top of the stack (which is the result) to location C
  • 10. TYPES OF INSTRUCTION SETS 2. Accumulator Architecture It places one operand in the accumulator and one in memory. The one in the accumulator is implicit, and the one in the memory is an explicit memory address. The result of ALU is written back to the accumulator.  The operand in the accumulator is loaded from memory using the command LOAD, and the result is stored in memory from accumulator using the command STORE.  This architecture was used by early computers like IBM 7090. Today, it’s used by some microprocessor chips, such as some digital signal processors.
  • 11. TYPES OF INSTRUCTION SETS 2. Accumulator Architecture Suppose we want to ask an accumulator architecture machine to conduct the same operation C = A + B as above. - Then, to implement the operation in an accumulator architecture, we need the following steps: LOAD A # load value at location A from main memory to ACC ADD B # fetch the value at location B, add it with the value at ACC (which is the value A), and save the result back to ACC STORE C # store the value at ACC (which is the result of A + B) to location C
  • 12. TYPES OF INSTRUCTION SETS 3. Register-Set Architecture: Modern CPUs have a number of general- purpose registers (GPR's) for internal storage: at least 8 and as many as 32. • GPR machines are the most flexible of all, because they allow the user to access any of several registers. • The load/store commands must typically specify a register and memory location, to indicate both source and destination of the data. • Any register can be used as an accumulator, an index register, or for temporary storage, etc., so many variables and addresses can be manipulated without extra memory accesses. • The major bad point of having many registers is the large amount of internal CPU state that must be saved/restore for calls, returns, and interrupts. • There are 8 general-purpose registers in the 8086 microprocessor.
  • 13. EXAMPLE Lets look at the assembly code of C = A + B; in all 3 architectures:
  • 14. CISC & RISC ARCHITECTURE Need Of CISC: In the past, it was believed that hardware design was easier than compiler design  Most programs were written in assembly language  Hardware concerns of the past:  Limited and slower memory  Few registers Register: Registers are a type of computer memory used to quickly accept, store, and transfer data and instructions that are being used immediately by the CPU. The registers used by the CPU are often termed as Processor registers.
  • 15. CISC & RISC ARCHITECTURE CISC, which stands for Complex Instruction Set Computer.  Each instruction executes multiple low level operations.  Ex. A single instruction can load from memory, perform an arithmetic operation, and store the result in memory.  Smaller program size.
  • 16. CISC & RISC ARCHITECTURE CISC Characteristics  A large number of instructions.  Some instructions for special tasks used infrequently.  A large variety of addressing modes (5 to 20).  Variable length instruction formats. Disadvantages : However, it soon became apparent that a complex instruction set has a number of disadvantages:  These include a complex instruction decoding scheme, an increased size of the control unit, and increased logic delays.
  • 17. CISC & RISC ARCHITECTURE RISC: RISC Stands for Reduced Instruction Set Computer.  It is a microprocessor that is designed to perform a smaller number of types of computer instruction so that it can operate at a higher speed. RISC Characteristics :  Relatively few instructions  128 or less  Relatively few addressing modes.  Memory access is limited to LOAD and STORE instructions.  All operations done within the registers of the CPU.  This architectural feature simplifies the instruction set and encourages the optimization of register manipulation.  An essential RISC philosophy is to keep the most frequently accessed operands in registers and minimize register-memory operations.
  • 18. CISC & RISC ARCHITECTURE
  • 19. CISC & RISC ARCHITECTURE
  • 20. CISC & RISC ARCHITECTURE
  • 21. CISC & RISC ARCHITECTURE
  • 22. CISC & RISC ARCHITECTURE
  • 23. CISC & RISC ARCHITECTURE
  • 24. QUESTIONS:  Q1: What is Instruction Set Architecture?  An Instruction Set Architecture (ISA) is part of the abstract model of a computer that defines how the CPU is controlled by the software. The ISA acts as an interface between the hardware and the software, specifying both what the processor is capable of doing as well as how it gets done.  Q2: What is Instruction Execution Model?  The three cycle instruction. execution model. • To execute a program, the microprocessor “reads” each instruction from memory, “interprets” it, then “executes” it.  Q3: What is Stack Architecture?  The stack is a list of data words. It uses the Last In First Out (LIFO) access method which is the most popular access method in most of the CPU. A register is used to store the address of the topmost element of the stack which is known as Stack pointer (SP).
  • 25. QUESTIONS:  Q4: Difference between CISC and RISC.  The primary difference between RISC and CISC architecture is that RISC-based machines execute one instruction per clock cycle. RISC does the opposite, reducing the cycles per instruction at the cost of the number of instructions per program. In a CISC processor, each instruction performs so many actions that it takes several clock cycles to complete. The CISC approach attempts to minimize the number of instructions per program, sacrificing the number of cycles per instruction.  Q5: What is Register?  A processor register (CPU register) is one of a small set of data holding places that are part of the computer processor. A register may hold an instruction, a storage address, or any kind of data (such as a bit sequence or individual characters). Some instructions specify registers as part of the instruction.
  • 26. REFERENCES  https://www.tutorialspoint.com/what-are-the-cpu-general-purpose- registers#:~:text=General%20purpose%20registers%20are%20additional,address%20or%20data%20whe never%20needed.  https://www.learncomputerscienceonline.com/instruction-set-architecture/  http://www.cs.kent.edu/~durand/CS0/Notes/Chapter05/isa.html  https://people.engr.tamu.edu/djimenez/taco/utsa-www/cs5513-fall07/lecture2.html  https://www.microcontrollertips.com/risc-vs-cisc-architectures-one-better/