SlideShare a Scribd company logo
1 of 41
William Stallings
Computer Organization
and Architecture
8th Edition
Chapter 10
Instruction Sets:
Characteristics and Functions
What is an Instruction Set?
• The complete collection of instructions
that are understood by a CPU
• Machine Code
• Binary
• Usually represented by assembly codes
Elements of an Instruction
• Operation code (Op code)
—Do this
• Source Operand reference
—To this
• Result Operand reference
—Put the answer here
• Next Instruction Reference
—When you have done that, do this...
Where have all the Operands Gone?
• Long time passing….
• (If you don’t understand, you’re too
young!)
• Main memory (or virtual memory or
cache)
• CPU register
• I/O device
Instruction Cycle State Diagram
Instruction Representation
• In machine code each instruction has a
unique bit pattern
• For human consumption (well,
programmers anyway) a symbolic
representation is used
—e.g. ADD, SUB, LOAD
• Operands can also be represented in this
way
—ADD A,B
Simple Instruction Format
Instruction Types
• Data processing
• Data storage (main memory)
• Data movement (I/O)
• Program flow control
Number of Addresses (a)
• 3 addresses
—Operand 1, Operand 2, Result
—a = b + c;
—May be a forth - next instruction (usually
implicit)
—Not common
—Needs very long words to hold everything
Number of Addresses (b)
• 2 addresses
—One address doubles as operand and result
—a = a + b
—Reduces length of instruction
—Requires some extra work
– Temporary storage to hold some results
Number of Addresses (c)
• 1 address
—Implicit second address
—Usually a register (accumulator)
—Common on early machines
Number of Addresses (d)
• 0 (zero) addresses
—All addresses implicit
—Uses a stack
—e.g. push a
— push b
— add
— pop c
—c = a + b
How Many Addresses
• More addresses
—More complex (powerful?) instructions
—More registers
– Inter-register operations are quicker
—Fewer instructions per program
• Fewer addresses
—Less complex (powerful?) instructions
—More instructions per program
—Faster fetch/execution of instructions
Design Decisions (1)
• Operation repertoire
—How many ops?
—What can they do?
—How complex are they?
• Data types
• Instruction formats
—Length of op code field
—Number of addresses
Design Decisions (2)
• Registers
—Number of CPU registers available
—Which operations can be performed on which
registers?
• Addressing modes (later…)
• RISC v CISC
Types of Operand
• Addresses
• Numbers
—Integer/floating point
• Characters
—ASCII etc.
• Logical Data
—Bits or flags
• (Aside: Is there any difference between numbers and
characters? Ask a C programmer!)
x86 Data Types
• 8 bit Byte
• 16 bit word
• 32 bit double word
• 64 bit quad word
• 128 bit double quadword
• Addressing is by 8 bit unit
• Words do not need to align at even-
numbered address
• Data accessed across 32 bit bus in units
of double word read at addresses divisible
by 4
• Little endian
SMID Data Types
• Integer types
— Interpreted as bit field or integer
• Packed byte and packed byte integer
— Bytes packed into 64-bit quadword or 128-bit double
quadword
• Packed word and packed word integer
— 16-bit words packed into 64-bit quadword or 128-bit double
quadword
• Packed doubleword and packed doubleword integer
— 32-bit doublewords packed into 64-bit quadword or 128-bit
double quadword
• Packed quadword and packed qaudword integer
— Two 64-bit quadwords packed into 128-bit double quadword
• Packed single-precision floating-point and packed double-
precision floating-point
— Four 32-bit floating-point or two 64-bit floating-point values
packed into a 128-bit double quadword
x86 Numeric Data Formats
ARM Data Types
• 8 (byte), 16 (halfword), 32 (word) bits
• Halfword and word accesses should be word aligned
• Nonaligned access alternatives
— Default
– Treated as truncated
– Bits[1:0] treated as zero for word
– Bit[0] treated as zero for halfword
– Load single word instructions rotate right word aligned data transferred by
non word-aligned address one, two or three bytesAlignment checking
— Data abort signal indicates alignment fault for attempting unaligned
access
— Unaligned access
— Processor uses one or more memory accesses to generate transfer of
adjacent bytes transparently to the programmer
• Unsigned integer interpretation supported for all types
• Twos-complement signed integer interpretation supported for all
types
• Majority of implementations do not provide floating-point
hardware
— Saves power and area
— Floating-point arithmetic implemented in software
— Optional floating-point coprocessor
— Single- and double-precision IEEE 754 floating point data types
ARM Endian Support
• E-bit in system control register
• Under program control
Types of Operation
• Data Transfer
• Arithmetic
• Logical
• Conversion
• I/O
• System Control
• Transfer of Control
Data Transfer
• Specify
—Source
—Destination
—Amount of data
• May be different instructions for different
movements
—e.g. IBM 370
• Or one instruction and different addresses
—e.g. VAX
Arithmetic
• Add, Subtract, Multiply, Divide
• Signed Integer
• Floating point ?
• May include
—Increment (a++)
—Decrement (a--)
—Negate (-a)
Shift and Rotate Operations
Logical
• Bitwise operations
• AND, OR, NOT
Conversion
• E.g. Binary to Decimal
Input/Output
• May be specific instructions
• May be done using data movement
instructions (memory mapped)
• May be done by a separate controller
(DMA)
Systems Control
• Privileged instructions
• CPU needs to be in specific state
—Ring 0 on 80386+
—Kernel mode
• For operating systems use
Transfer of Control
• Branch
—e.g. branch to x if result is zero
• Skip
—e.g. increment and skip if zero
—ISZ Register1
—Branch xxxx
—ADD A
• Subroutine call
—c.f. interrupt call
Branch Instruction
Nested Procedure Calls
Use of Stack
Stack Frame Growth Using Sample
Procedures P and Q
Exercise For Reader
• Find out about instruction set for Pentium
and ARM
• Start with Stallings
• Visit web sites
Byte Order
(A portion of chips?)
• What order do we read numbers that
occupy more than one byte
• e.g. (numbers in hex to make it easy to
read)
• 12345678 can be stored in 4x8bit
locations as follows
Byte Order (example)
• Address Value (1) Value(2)
• 184 12 78
• 185 34 56
• 186 56 34
• 186 78 12
• i.e. read top down or bottom up?
Byte Order Names
• The problem is called Endian
• The system on the left has the least
significant byte in the lowest address
• This is called big-endian
• The system on the right has the least
significant byte in the highest address
• This is called little-endian
Example of C Data Structure
Alternative View of Memory Map
Standard…What Standard?
• Pentium (x86), VAX are little-endian
• IBM 370, Moterola 680x0 (Mac), and most
RISC are big-endian
• Internet is big-endian
—Makes writing Internet programs on PC more
awkward!
—WinSock provides htoi and itoh (Host to
Internet & Internet to Host) functions to
convert

More Related Content

What's hot

Practical Malware Analysis: Ch 5: IDA Pro
Practical Malware Analysis: Ch 5: IDA ProPractical Malware Analysis: Ch 5: IDA Pro
Practical Malware Analysis: Ch 5: IDA ProSam Bowne
 
12 processor structure and function
12 processor structure and function12 processor structure and function
12 processor structure and functiondilip kumar
 
CNIT 126 4: A Crash Course in x86 Disassembly
CNIT 126 4: A Crash Course in x86 DisassemblyCNIT 126 4: A Crash Course in x86 Disassembly
CNIT 126 4: A Crash Course in x86 DisassemblySam Bowne
 
08 operating system support
08 operating system support08 operating system support
08 operating system supportdilip kumar
 
CNIT 126 6: Recognizing C Code Constructs in Assembly
CNIT 126 6: Recognizing C Code Constructs in Assembly CNIT 126 6: Recognizing C Code Constructs in Assembly
CNIT 126 6: Recognizing C Code Constructs in Assembly Sam Bowne
 
05 internal memory
05 internal memory05 internal memory
05 internal memorydilip kumar
 
CNIT 126 5: IDA Pro
CNIT 126 5: IDA Pro CNIT 126 5: IDA Pro
CNIT 126 5: IDA Pro Sam Bowne
 
Part II: Assembly Fundamentals
Part II: Assembly FundamentalsPart II: Assembly Fundamentals
Part II: Assembly FundamentalsAhmed M. Abed
 
02 computer evolution and performance
02 computer evolution and performance02 computer evolution and performance
02 computer evolution and performancedilip kumar
 
Practical Malware Analysis: Ch 6: Recognizing C Code Constructs in Assembly
Practical Malware Analysis: Ch 6: Recognizing C Code Constructs in AssemblyPractical Malware Analysis: Ch 6: Recognizing C Code Constructs in Assembly
Practical Malware Analysis: Ch 6: Recognizing C Code Constructs in AssemblySam Bowne
 
CNIT 126: Ch 6: Recognizing C Constructs in Assembly
CNIT 126: Ch 6: Recognizing C Constructs in AssemblyCNIT 126: Ch 6: Recognizing C Constructs in Assembly
CNIT 126: Ch 6: Recognizing C Constructs in AssemblySam Bowne
 
EE5440 – Computer Architecture - Lecture 1
EE5440 – Computer Architecture - Lecture 1EE5440 – Computer Architecture - Lecture 1
EE5440 – Computer Architecture - Lecture 1Dilawar Khan
 
Computer organization and architecture
Computer organization and architectureComputer organization and architecture
Computer organization and architectureSubesh Kumar Yadav
 
Embedded computing platform design
Embedded computing platform designEmbedded computing platform design
Embedded computing platform designRAMPRAKASHT1
 

What's hot (20)

13 risc
13 risc13 risc
13 risc
 
Practical Malware Analysis: Ch 5: IDA Pro
Practical Malware Analysis: Ch 5: IDA ProPractical Malware Analysis: Ch 5: IDA Pro
Practical Malware Analysis: Ch 5: IDA Pro
 
12 processor structure and function
12 processor structure and function12 processor structure and function
12 processor structure and function
 
08 operating system support
08 operating system support08 operating system support
08 operating system support
 
13 risc
13 risc13 risc
13 risc
 
CNIT 126 4: A Crash Course in x86 Disassembly
CNIT 126 4: A Crash Course in x86 DisassemblyCNIT 126 4: A Crash Course in x86 Disassembly
CNIT 126 4: A Crash Course in x86 Disassembly
 
01 introduction
01 introduction01 introduction
01 introduction
 
07 input output
07 input output07 input output
07 input output
 
08 operating system support
08 operating system support08 operating system support
08 operating system support
 
CNIT 126 6: Recognizing C Code Constructs in Assembly
CNIT 126 6: Recognizing C Code Constructs in Assembly CNIT 126 6: Recognizing C Code Constructs in Assembly
CNIT 126 6: Recognizing C Code Constructs in Assembly
 
05 internal memory
05 internal memory05 internal memory
05 internal memory
 
01 introduction
01 introduction01 introduction
01 introduction
 
CNIT 126 5: IDA Pro
CNIT 126 5: IDA Pro CNIT 126 5: IDA Pro
CNIT 126 5: IDA Pro
 
Part II: Assembly Fundamentals
Part II: Assembly FundamentalsPart II: Assembly Fundamentals
Part II: Assembly Fundamentals
 
02 computer evolution and performance
02 computer evolution and performance02 computer evolution and performance
02 computer evolution and performance
 
Practical Malware Analysis: Ch 6: Recognizing C Code Constructs in Assembly
Practical Malware Analysis: Ch 6: Recognizing C Code Constructs in AssemblyPractical Malware Analysis: Ch 6: Recognizing C Code Constructs in Assembly
Practical Malware Analysis: Ch 6: Recognizing C Code Constructs in Assembly
 
CNIT 126: Ch 6: Recognizing C Constructs in Assembly
CNIT 126: Ch 6: Recognizing C Constructs in AssemblyCNIT 126: Ch 6: Recognizing C Constructs in Assembly
CNIT 126: Ch 6: Recognizing C Constructs in Assembly
 
EE5440 – Computer Architecture - Lecture 1
EE5440 – Computer Architecture - Lecture 1EE5440 – Computer Architecture - Lecture 1
EE5440 – Computer Architecture - Lecture 1
 
Computer organization and architecture
Computer organization and architectureComputer organization and architecture
Computer organization and architecture
 
Embedded computing platform design
Embedded computing platform designEmbedded computing platform design
Embedded computing platform design
 

Similar to 10 instruction sets characteristics

CNIT 127 Ch 1: Before you Begin
CNIT 127 Ch 1: Before you BeginCNIT 127 Ch 1: Before you Begin
CNIT 127 Ch 1: Before you BeginSam Bowne
 
CNIT 127 Ch Ch 1: Before you Begin
CNIT 127 Ch Ch 1: Before you BeginCNIT 127 Ch Ch 1: Before you Begin
CNIT 127 Ch Ch 1: Before you BeginSam Bowne
 
Architectural support for High Level Language
Architectural support for High Level LanguageArchitectural support for High Level Language
Architectural support for High Level LanguageSudhanshu Janwadkar
 
MCA-I-COA- overview of register transfer, micro operations and basic computer...
MCA-I-COA- overview of register transfer, micro operations and basic computer...MCA-I-COA- overview of register transfer, micro operations and basic computer...
MCA-I-COA- overview of register transfer, micro operations and basic computer...Rai University
 
(246431835) instruction set principles (2) (1)
(246431835) instruction set principles (2) (1)(246431835) instruction set principles (2) (1)
(246431835) instruction set principles (2) (1)Alveena Saleem
 
pipeline and pipeline hazards
pipeline and pipeline hazards pipeline and pipeline hazards
pipeline and pipeline hazards Bharti Khemani
 
Introduction to Processor Design and ARM Processor
Introduction to Processor Design and ARM ProcessorIntroduction to Processor Design and ARM Processor
Introduction to Processor Design and ARM ProcessorDarling Jemima
 
11_ InstructionSetsAddressingModes .pdf
11_ InstructionSetsAddressingModes .pdf11_ InstructionSetsAddressingModes .pdf
11_ InstructionSetsAddressingModes .pdfWilliamTom9
 
Part I:Introduction to assembly language
Part I:Introduction to assembly languagePart I:Introduction to assembly language
Part I:Introduction to assembly languageAhmed M. Abed
 
introduction to embedded systems part 1
introduction to embedded systems part 1introduction to embedded systems part 1
introduction to embedded systems part 1Hatem Abd El-Salam
 
B.sc cs-ii-u-2.2-overview of register transfer, micro operations and basic co...
B.sc cs-ii-u-2.2-overview of register transfer, micro operations and basic co...B.sc cs-ii-u-2.2-overview of register transfer, micro operations and basic co...
B.sc cs-ii-u-2.2-overview of register transfer, micro operations and basic co...Rai University
 
Bca 2nd sem-u-2.2-overview of register transfer, micro operations and basic c...
Bca 2nd sem-u-2.2-overview of register transfer, micro operations and basic c...Bca 2nd sem-u-2.2-overview of register transfer, micro operations and basic c...
Bca 2nd sem-u-2.2-overview of register transfer, micro operations and basic c...Rai University
 
x86 architecture
x86 architecturex86 architecture
x86 architecturei i
 

Similar to 10 instruction sets characteristics (20)

CNIT 127 Ch 1: Before you Begin
CNIT 127 Ch 1: Before you BeginCNIT 127 Ch 1: Before you Begin
CNIT 127 Ch 1: Before you Begin
 
CNIT 127 Ch Ch 1: Before you Begin
CNIT 127 Ch Ch 1: Before you BeginCNIT 127 Ch Ch 1: Before you Begin
CNIT 127 Ch Ch 1: Before you Begin
 
Architectural support for High Level Language
Architectural support for High Level LanguageArchitectural support for High Level Language
Architectural support for High Level Language
 
Cis cvs risc
Cis cvs riscCis cvs risc
Cis cvs risc
 
CO_Chapter2.ppt
CO_Chapter2.pptCO_Chapter2.ppt
CO_Chapter2.ppt
 
MCA-I-COA- overview of register transfer, micro operations and basic computer...
MCA-I-COA- overview of register transfer, micro operations and basic computer...MCA-I-COA- overview of register transfer, micro operations and basic computer...
MCA-I-COA- overview of register transfer, micro operations and basic computer...
 
(246431835) instruction set principles (2) (1)
(246431835) instruction set principles (2) (1)(246431835) instruction set principles (2) (1)
(246431835) instruction set principles (2) (1)
 
cs-procstruc.ppt
cs-procstruc.pptcs-procstruc.ppt
cs-procstruc.ppt
 
pipeline and pipeline hazards
pipeline and pipeline hazards pipeline and pipeline hazards
pipeline and pipeline hazards
 
Processors selection
Processors selectionProcessors selection
Processors selection
 
Lec05
Lec05Lec05
Lec05
 
Introduction to Processor Design and ARM Processor
Introduction to Processor Design and ARM ProcessorIntroduction to Processor Design and ARM Processor
Introduction to Processor Design and ARM Processor
 
11_ InstructionSetsAddressingModes .pdf
11_ InstructionSetsAddressingModes .pdf11_ InstructionSetsAddressingModes .pdf
11_ InstructionSetsAddressingModes .pdf
 
Part I:Introduction to assembly language
Part I:Introduction to assembly languagePart I:Introduction to assembly language
Part I:Introduction to assembly language
 
Dsp ajal
Dsp  ajalDsp  ajal
Dsp ajal
 
SS-CISC -1.pptx
SS-CISC -1.pptxSS-CISC -1.pptx
SS-CISC -1.pptx
 
introduction to embedded systems part 1
introduction to embedded systems part 1introduction to embedded systems part 1
introduction to embedded systems part 1
 
B.sc cs-ii-u-2.2-overview of register transfer, micro operations and basic co...
B.sc cs-ii-u-2.2-overview of register transfer, micro operations and basic co...B.sc cs-ii-u-2.2-overview of register transfer, micro operations and basic co...
B.sc cs-ii-u-2.2-overview of register transfer, micro operations and basic co...
 
Bca 2nd sem-u-2.2-overview of register transfer, micro operations and basic c...
Bca 2nd sem-u-2.2-overview of register transfer, micro operations and basic c...Bca 2nd sem-u-2.2-overview of register transfer, micro operations and basic c...
Bca 2nd sem-u-2.2-overview of register transfer, micro operations and basic c...
 
x86 architecture
x86 architecturex86 architecture
x86 architecture
 

More from Anwal Mirza

Training & development
Training & developmentTraining & development
Training & developmentAnwal Mirza
 
Training and dev
Training and devTraining and dev
Training and devAnwal Mirza
 
Testing and selection
Testing and selectionTesting and selection
Testing and selectionAnwal Mirza
 
Strategic planning
Strategic planningStrategic planning
Strategic planningAnwal Mirza
 
Hci scanrio-exercise
Hci scanrio-exerciseHci scanrio-exercise
Hci scanrio-exerciseAnwal Mirza
 
Hci user interface-design principals
Hci user interface-design principalsHci user interface-design principals
Hci user interface-design principalsAnwal Mirza
 
Hci user interface-design principals lec 7
Hci user interface-design principals lec 7Hci user interface-design principals lec 7
Hci user interface-design principals lec 7Anwal Mirza
 
Hci user centered design 11
Hci user centered design 11Hci user centered design 11
Hci user centered design 11Anwal Mirza
 
Hci lec 1 & 2
Hci lec 1 & 2Hci lec 1 & 2
Hci lec 1 & 2Anwal Mirza
 
Hci interace affects the user lec 8
Hci interace affects the user lec 8Hci interace affects the user lec 8
Hci interace affects the user lec 8Anwal Mirza
 
Hci evaluationa frame work lec 14
Hci evaluationa frame work lec 14Hci evaluationa frame work lec 14
Hci evaluationa frame work lec 14Anwal Mirza
 
Hci design collaboration lec 9 10
Hci  design collaboration lec 9 10Hci  design collaboration lec 9 10
Hci design collaboration lec 9 10Anwal Mirza
 

More from Anwal Mirza (20)

Training & development
Training & developmentTraining & development
Training & development
 
Training and dev
Training and devTraining and dev
Training and dev
 
Testing and selection
Testing and selectionTesting and selection
Testing and selection
 
Strategic planning
Strategic planningStrategic planning
Strategic planning
 
Recruitment
RecruitmentRecruitment
Recruitment
 
Job analysis
Job analysisJob analysis
Job analysis
 
Interviewing
Interviewing Interviewing
Interviewing
 
Hrm ppt ch. 01
Hrm ppt ch. 01Hrm ppt ch. 01
Hrm ppt ch. 01
 
Hrm challenges
Hrm challengesHrm challenges
Hrm challenges
 
Firstpage
FirstpageFirstpage
Firstpage
 
Hci scanrio-exercise
Hci scanrio-exerciseHci scanrio-exercise
Hci scanrio-exercise
 
Hci user interface-design principals
Hci user interface-design principalsHci user interface-design principals
Hci user interface-design principals
 
Hci user interface-design principals lec 7
Hci user interface-design principals lec 7Hci user interface-design principals lec 7
Hci user interface-design principals lec 7
 
Hci user centered design 11
Hci user centered design 11Hci user centered design 11
Hci user centered design 11
 
Hci lec 5,6
Hci lec 5,6Hci lec 5,6
Hci lec 5,6
 
Hci lec 4
Hci lec 4Hci lec 4
Hci lec 4
 
Hci lec 1 & 2
Hci lec 1 & 2Hci lec 1 & 2
Hci lec 1 & 2
 
Hci interace affects the user lec 8
Hci interace affects the user lec 8Hci interace affects the user lec 8
Hci interace affects the user lec 8
 
Hci evaluationa frame work lec 14
Hci evaluationa frame work lec 14Hci evaluationa frame work lec 14
Hci evaluationa frame work lec 14
 
Hci design collaboration lec 9 10
Hci  design collaboration lec 9 10Hci  design collaboration lec 9 10
Hci design collaboration lec 9 10
 

Recently uploaded

Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfkalichargn70th171
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio, Inc.
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...OnePlan Solutions
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about usDynamic Netsoft
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfjoe51371421
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideChristina Lin
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackVICTOR MAESTRE RAMIREZ
 
Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...aditisharan08
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - InfographicHr365.us smith
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...MyIntelliSource, Inc.
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...gurkirankumar98700
 
XpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software SolutionsXpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software SolutionsMehedi Hasan Shohan
 
The Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfThe Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfPower Karaoke
 
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...stazi3110
 
Engage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyEngage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyFrank van der Linden
 
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfThe Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfkalichargn70th171
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 

Recently uploaded (20)

Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about us
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdf
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStack
 
Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - Infographic
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
 
XpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software SolutionsXpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software Solutions
 
The Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfThe Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdf
 
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
 
Engage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyEngage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The Ugly
 
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfThe Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 

10 instruction sets characteristics

  • 1. William Stallings Computer Organization and Architecture 8th Edition Chapter 10 Instruction Sets: Characteristics and Functions
  • 2. What is an Instruction Set? • The complete collection of instructions that are understood by a CPU • Machine Code • Binary • Usually represented by assembly codes
  • 3. Elements of an Instruction • Operation code (Op code) —Do this • Source Operand reference —To this • Result Operand reference —Put the answer here • Next Instruction Reference —When you have done that, do this...
  • 4. Where have all the Operands Gone? • Long time passing…. • (If you don’t understand, you’re too young!) • Main memory (or virtual memory or cache) • CPU register • I/O device
  • 6. Instruction Representation • In machine code each instruction has a unique bit pattern • For human consumption (well, programmers anyway) a symbolic representation is used —e.g. ADD, SUB, LOAD • Operands can also be represented in this way —ADD A,B
  • 8. Instruction Types • Data processing • Data storage (main memory) • Data movement (I/O) • Program flow control
  • 9. Number of Addresses (a) • 3 addresses —Operand 1, Operand 2, Result —a = b + c; —May be a forth - next instruction (usually implicit) —Not common —Needs very long words to hold everything
  • 10. Number of Addresses (b) • 2 addresses —One address doubles as operand and result —a = a + b —Reduces length of instruction —Requires some extra work – Temporary storage to hold some results
  • 11. Number of Addresses (c) • 1 address —Implicit second address —Usually a register (accumulator) —Common on early machines
  • 12. Number of Addresses (d) • 0 (zero) addresses —All addresses implicit —Uses a stack —e.g. push a — push b — add — pop c —c = a + b
  • 13. How Many Addresses • More addresses —More complex (powerful?) instructions —More registers – Inter-register operations are quicker —Fewer instructions per program • Fewer addresses —Less complex (powerful?) instructions —More instructions per program —Faster fetch/execution of instructions
  • 14. Design Decisions (1) • Operation repertoire —How many ops? —What can they do? —How complex are they? • Data types • Instruction formats —Length of op code field —Number of addresses
  • 15. Design Decisions (2) • Registers —Number of CPU registers available —Which operations can be performed on which registers? • Addressing modes (later…) • RISC v CISC
  • 16. Types of Operand • Addresses • Numbers —Integer/floating point • Characters —ASCII etc. • Logical Data —Bits or flags • (Aside: Is there any difference between numbers and characters? Ask a C programmer!)
  • 17. x86 Data Types • 8 bit Byte • 16 bit word • 32 bit double word • 64 bit quad word • 128 bit double quadword • Addressing is by 8 bit unit • Words do not need to align at even- numbered address • Data accessed across 32 bit bus in units of double word read at addresses divisible by 4 • Little endian
  • 18. SMID Data Types • Integer types — Interpreted as bit field or integer • Packed byte and packed byte integer — Bytes packed into 64-bit quadword or 128-bit double quadword • Packed word and packed word integer — 16-bit words packed into 64-bit quadword or 128-bit double quadword • Packed doubleword and packed doubleword integer — 32-bit doublewords packed into 64-bit quadword or 128-bit double quadword • Packed quadword and packed qaudword integer — Two 64-bit quadwords packed into 128-bit double quadword • Packed single-precision floating-point and packed double- precision floating-point — Four 32-bit floating-point or two 64-bit floating-point values packed into a 128-bit double quadword
  • 19. x86 Numeric Data Formats
  • 20. ARM Data Types • 8 (byte), 16 (halfword), 32 (word) bits • Halfword and word accesses should be word aligned • Nonaligned access alternatives — Default – Treated as truncated – Bits[1:0] treated as zero for word – Bit[0] treated as zero for halfword – Load single word instructions rotate right word aligned data transferred by non word-aligned address one, two or three bytesAlignment checking — Data abort signal indicates alignment fault for attempting unaligned access — Unaligned access — Processor uses one or more memory accesses to generate transfer of adjacent bytes transparently to the programmer • Unsigned integer interpretation supported for all types • Twos-complement signed integer interpretation supported for all types • Majority of implementations do not provide floating-point hardware — Saves power and area — Floating-point arithmetic implemented in software — Optional floating-point coprocessor — Single- and double-precision IEEE 754 floating point data types
  • 21. ARM Endian Support • E-bit in system control register • Under program control
  • 22. Types of Operation • Data Transfer • Arithmetic • Logical • Conversion • I/O • System Control • Transfer of Control
  • 23. Data Transfer • Specify —Source —Destination —Amount of data • May be different instructions for different movements —e.g. IBM 370 • Or one instruction and different addresses —e.g. VAX
  • 24. Arithmetic • Add, Subtract, Multiply, Divide • Signed Integer • Floating point ? • May include —Increment (a++) —Decrement (a--) —Negate (-a)
  • 25. Shift and Rotate Operations
  • 28. Input/Output • May be specific instructions • May be done using data movement instructions (memory mapped) • May be done by a separate controller (DMA)
  • 29. Systems Control • Privileged instructions • CPU needs to be in specific state —Ring 0 on 80386+ —Kernel mode • For operating systems use
  • 30. Transfer of Control • Branch —e.g. branch to x if result is zero • Skip —e.g. increment and skip if zero —ISZ Register1 —Branch xxxx —ADD A • Subroutine call —c.f. interrupt call
  • 34. Stack Frame Growth Using Sample Procedures P and Q
  • 35. Exercise For Reader • Find out about instruction set for Pentium and ARM • Start with Stallings • Visit web sites
  • 36. Byte Order (A portion of chips?) • What order do we read numbers that occupy more than one byte • e.g. (numbers in hex to make it easy to read) • 12345678 can be stored in 4x8bit locations as follows
  • 37. Byte Order (example) • Address Value (1) Value(2) • 184 12 78 • 185 34 56 • 186 56 34 • 186 78 12 • i.e. read top down or bottom up?
  • 38. Byte Order Names • The problem is called Endian • The system on the left has the least significant byte in the lowest address • This is called big-endian • The system on the right has the least significant byte in the highest address • This is called little-endian
  • 39. Example of C Data Structure
  • 40. Alternative View of Memory Map
  • 41. Standard…What Standard? • Pentium (x86), VAX are little-endian • IBM 370, Moterola 680x0 (Mac), and most RISC are big-endian • Internet is big-endian —Makes writing Internet programs on PC more awkward! —WinSock provides htoi and itoh (Host to Internet & Internet to Host) functions to convert

Editor's Notes

  1. 2
  2. 3
  3. 4
  4. 5
  5. 6
  6. 7
  7. 8
  8. 9
  9. 10
  10. 11
  11. 12
  12. 13
  13. 14
  14. 15
  15. 16
  16. 17
  17. 18
  18. 19
  19. 20
  20. 21
  21. 22
  22. 23
  23. 24
  24. 25
  25. 27
  26. 28
  27. 29
  28. 30