SlideShare a Scribd company logo
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

More Related Content

What's hot

Microprogram Control
Microprogram Control Microprogram Control
Microprogram Control Anuj Modi
 
Instruction Set Architecture (ISA)
Instruction Set Architecture (ISA)Instruction Set Architecture (ISA)
Instruction Set Architecture (ISA)
Gaditek
 
Stack organization
Stack organizationStack organization
Stack organization
chauhankapil
 
Instruction pipeline: Computer Architecture
Instruction pipeline: Computer ArchitectureInstruction pipeline: Computer Architecture
Instruction pipeline: Computer Architecture
InteX Research Lab
 
Computer Organisation & Architecture (chapter 1)
Computer Organisation & Architecture (chapter 1) Computer Organisation & Architecture (chapter 1)
Computer Organisation & Architecture (chapter 1)
Subhasis Dash
 
Register organization, stack
Register organization, stackRegister organization, stack
Register organization, stack
Asif Iqbal
 
General register organization (computer organization)
General register organization  (computer organization)General register organization  (computer organization)
General register organization (computer organization)
rishi ram khanal
 
Computer registers
Computer registersComputer registers
Computer registers
DeepikaT13
 
04 cache memory.ppt 1
04 cache memory.ppt 104 cache memory.ppt 1
04 cache memory.ppt 1
Anwal Mirza
 
Control unit design
Control unit designControl unit design
Control unit design
Dhaval Bagal
 
CISC & RISC Architecture
CISC & RISC Architecture CISC & RISC Architecture
CISC & RISC Architecture
Suvendu Kumar Dash
 
Pipeline hazard
Pipeline hazardPipeline hazard
Pipeline hazard
AJAL A J
 
Assembly language programming_fundamentals 8086
Assembly language programming_fundamentals 8086Assembly language programming_fundamentals 8086
Assembly language programming_fundamentals 8086
Shehrevar Davierwala
 
Computer Architecture – An Introduction
Computer Architecture – An IntroductionComputer Architecture – An Introduction
Computer Architecture – An Introduction
Dilum Bandara
 
Coa module1
Coa module1Coa module1
Coa module1
cs19club
 
Cache memory
Cache memoryCache memory
Cache memory
Ansari Maviya
 
Pipelining
PipeliningPipelining
Pipelining
Shubham Bammi
 
Computer organiztion5
Computer organiztion5Computer organiztion5
Computer organiztion5Umang Gupta
 

What's hot (20)

Microprogram Control
Microprogram Control Microprogram Control
Microprogram Control
 
Instruction Set Architecture (ISA)
Instruction Set Architecture (ISA)Instruction Set Architecture (ISA)
Instruction Set Architecture (ISA)
 
Stack organization
Stack organizationStack organization
Stack organization
 
Instruction pipeline: Computer Architecture
Instruction pipeline: Computer ArchitectureInstruction pipeline: Computer Architecture
Instruction pipeline: Computer Architecture
 
Computer Organisation & Architecture (chapter 1)
Computer Organisation & Architecture (chapter 1) Computer Organisation & Architecture (chapter 1)
Computer Organisation & Architecture (chapter 1)
 
Array Processor
Array ProcessorArray Processor
Array Processor
 
Register organization, stack
Register organization, stackRegister organization, stack
Register organization, stack
 
General register organization (computer organization)
General register organization  (computer organization)General register organization  (computer organization)
General register organization (computer organization)
 
Computer registers
Computer registersComputer registers
Computer registers
 
04 cache memory.ppt 1
04 cache memory.ppt 104 cache memory.ppt 1
04 cache memory.ppt 1
 
CPU Architecture
CPU ArchitectureCPU Architecture
CPU Architecture
 
Control unit design
Control unit designControl unit design
Control unit design
 
CISC & RISC Architecture
CISC & RISC Architecture CISC & RISC Architecture
CISC & RISC Architecture
 
Pipeline hazard
Pipeline hazardPipeline hazard
Pipeline hazard
 
Assembly language programming_fundamentals 8086
Assembly language programming_fundamentals 8086Assembly language programming_fundamentals 8086
Assembly language programming_fundamentals 8086
 
Computer Architecture – An Introduction
Computer Architecture – An IntroductionComputer Architecture – An Introduction
Computer Architecture – An Introduction
 
Coa module1
Coa module1Coa module1
Coa module1
 
Cache memory
Cache memoryCache memory
Cache memory
 
Pipelining
PipeliningPipelining
Pipelining
 
Computer organiztion5
Computer organiztion5Computer organiztion5
Computer organiztion5
 

Similar to Instruction Set Architecture

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
Asst.prof M.Gokilavani
 
Processors used in System on chip
Processors used in System on chip Processors used in System on chip
Processors used in System on chip
A B Shinde
 
Computer Organization.pptx
Computer Organization.pptxComputer Organization.pptx
Computer Organization.pptx
saimagul310
 
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...
Marina Kolpakova
 
esunit1.pptx
esunit1.pptxesunit1.pptx
esunit1.pptx
AmitKumar7572
 
Advanced Processor Power Point Presentation
Advanced Processor  Power Point  PresentationAdvanced Processor  Power Point  Presentation
Advanced Processor Power Point Presentation
PrashantYadav931011
 
Presentation1.pptx
Presentation1.pptxPresentation1.pptx
Presentation1.pptx
TheresaSKMansaray
 
risc_and_cisc.ppt
risc_and_cisc.pptrisc_and_cisc.ppt
risc_and_cisc.ppt
Ruhul Amin
 
isa architecture
isa architectureisa architecture
isa architecture
AJAL A J
 
Risc and cisc eugene clewlow
Risc and cisc   eugene clewlowRisc and cisc   eugene clewlow
Risc and cisc eugene clewlow
karan saini
 
Risc and cisc eugene clewlow
Risc and cisc   eugene clewlowRisc and cisc   eugene clewlow
Risc and cisc eugene clewlow
Chaudhary Manzoor
 
Cao 2012
Cao 2012Cao 2012
Cao 2012
Raja Basharat
 
Microcontroller architecture
Microcontroller architectureMicrocontroller architecture
Microcontroller architecture
Vikas Dongre
 
M&i(lec#01)
M&i(lec#01)M&i(lec#01)
M&i(lec#01)
Majid Mehmood
 
Microprocessor and Microcontroller Based Systems.ppt
Microprocessor and Microcontroller Based Systems.pptMicroprocessor and Microcontroller Based Systems.ppt
Microprocessor and Microcontroller Based Systems.ppt
TALHARIAZ46
 
Unit I_MT2301.pdf
Unit I_MT2301.pdfUnit I_MT2301.pdf
Unit I_MT2301.pdf
Kannan Kanagaraj
 
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
24x7house
 
CISC.pptx
CISC.pptxCISC.pptx
CISC.pptx
UmaimaAsif3
 

Similar to 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
 
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
 
CISC.pptx
CISC.pptxCISC.pptx
CISC.pptx
 

Recently uploaded

Language Across the Curriculm LAC B.Ed.
Language Across the  Curriculm LAC B.Ed.Language Across the  Curriculm LAC B.Ed.
Language Across the Curriculm LAC B.Ed.
Atul Kumar Singh
 
Supporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptxSupporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptx
Jisc
 
Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
TechSoup
 
The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptx
Jisc
 
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCECLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
BhavyaRajput3
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
Special education needs
 
How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17
Celine George
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
MysoreMuleSoftMeetup
 
Acetabularia Information For Class 9 .docx
Acetabularia Information For Class 9  .docxAcetabularia Information For Class 9  .docx
Acetabularia Information For Class 9 .docx
vaibhavrinwa19
 
Francesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptxFrancesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptx
EduSkills OECD
 
The Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdfThe Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdf
kaushalkr1407
 
Polish students' mobility in the Czech Republic
Polish students' mobility in the Czech RepublicPolish students' mobility in the Czech Republic
Polish students' mobility in the Czech Republic
Anna Sz.
 
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
Nguyen Thanh Tu Collection
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
Pavel ( NSTU)
 
Honest Reviews of Tim Han LMA Course Program.pptx
Honest Reviews of Tim Han LMA Course Program.pptxHonest Reviews of Tim Han LMA Course Program.pptx
Honest Reviews of Tim Han LMA Course Program.pptx
timhan337
 
Overview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with MechanismOverview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with Mechanism
DeeptiGupta154
 
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdfAdversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
Po-Chuan Chen
 
Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345
beazzy04
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
Delapenabediema
 
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup   New Member Orientation and Q&A (May 2024).pdfWelcome to TechSoup   New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
TechSoup
 

Recently uploaded (20)

Language Across the Curriculm LAC B.Ed.
Language Across the  Curriculm LAC B.Ed.Language Across the  Curriculm LAC B.Ed.
Language Across the Curriculm LAC B.Ed.
 
Supporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptxSupporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptx
 
Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
 
The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptx
 
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCECLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
 
How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
 
Acetabularia Information For Class 9 .docx
Acetabularia Information For Class 9  .docxAcetabularia Information For Class 9  .docx
Acetabularia Information For Class 9 .docx
 
Francesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptxFrancesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptx
 
The Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdfThe Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdf
 
Polish students' mobility in the Czech Republic
Polish students' mobility in the Czech RepublicPolish students' mobility in the Czech Republic
Polish students' mobility in the Czech Republic
 
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
 
Honest Reviews of Tim Han LMA Course Program.pptx
Honest Reviews of Tim Han LMA Course Program.pptxHonest Reviews of Tim Han LMA Course Program.pptx
Honest Reviews of Tim Han LMA Course Program.pptx
 
Overview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with MechanismOverview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with Mechanism
 
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdfAdversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
 
Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
 
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup   New Member Orientation and Q&A (May 2024).pdfWelcome to TechSoup   New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
 

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/