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

PPT
10 instruction sets characteristics
PPT
Frist slider share
PPT
10 instruction sets characteristics
PPT
15 ia64
PPT
10 Instruction Sets Characteristics
PPT
12 processor structure and function
PPTX
Practical Malware Analysis: Ch 4 A Crash Course in x86 Disassembly
PPT
11 instruction sets addressing modes
10 instruction sets characteristics
Frist slider share
10 instruction sets characteristics
15 ia64
10 Instruction Sets Characteristics
12 processor structure and function
Practical Malware Analysis: Ch 4 A Crash Course in x86 Disassembly
11 instruction sets addressing modes

What's hot (20)

PPT
13 risc
PPTX
Practical Malware Analysis: Ch 5: IDA Pro
PPT
12 processor structure and function
PPT
08 operating system support
PPT
PDF
CNIT 126 4: A Crash Course in x86 Disassembly
PPT
01 introduction
PPT
07 input output
PPT
08 operating system support
PDF
CNIT 126 6: Recognizing C Code Constructs in Assembly
PPT
05 internal memory
PPT
01 introduction
PDF
CNIT 126 5: IDA Pro
PPTX
Part II: Assembly Fundamentals
PPT
02 computer evolution and performance
PPTX
Practical Malware Analysis: Ch 6: Recognizing C Code Constructs in Assembly
PDF
CNIT 126: Ch 6: Recognizing C Constructs in Assembly
PPTX
EE5440 – Computer Architecture - Lecture 1
PPTX
Computer organization and architecture
PPTX
Embedded computing platform design
13 risc
Practical Malware Analysis: Ch 5: IDA Pro
12 processor structure and function
08 operating system support
CNIT 126 4: A Crash Course in x86 Disassembly
01 introduction
07 input output
08 operating system support
CNIT 126 6: Recognizing C Code Constructs in Assembly
05 internal memory
01 introduction
CNIT 126 5: IDA Pro
Part II: Assembly Fundamentals
02 computer evolution and performance
Practical Malware Analysis: Ch 6: Recognizing C Code Constructs in Assembly
CNIT 126: Ch 6: Recognizing C Constructs in Assembly
EE5440 – Computer Architecture - Lecture 1
Computer organization and architecture
Embedded computing platform design
Ad

Similar to 10 instruction sets characteristics (20)

PDF
Ch12- instruction sets- char & funct.pdf
PPTX
Intel x86 and ARM Data types
PPTX
Part 1.pptx
PPT
Social services and human rights to know.ppt
PPT
LECTURE2 td 2 sue les theories de graphes
PPTX
Instruction set.pptx
PDF
Ec 252 ec-252-l10-instruction sets and addressing modes
PPTX
EE5440 – Computer Architecture - Lecture 2
PPTX
CSe_Cumilla Bangladesh_Country CSE CSE213_5.ppt
PPTX
INSTRUCTION SET
PPTX
Introduction to Processor Design and ARM Processor
PPT
RISC-V processor- computer organization and design
PPTX
Co&al lecture-05
PPT
Instruction Set Architecture
PDF
Computer organization basics
PPTX
Computer Architecture Lecture slide 2. course se 222
PDF
COMPUTER ORGANIZATION NOTES Unit 2
PPT
COA Chapter 3 final edited*Minimum 40 characters required.ppt
PPTX
Instruction-Sets-2.pptx
PPT
CO_Chapter2.ppt
Ch12- instruction sets- char & funct.pdf
Intel x86 and ARM Data types
Part 1.pptx
Social services and human rights to know.ppt
LECTURE2 td 2 sue les theories de graphes
Instruction set.pptx
Ec 252 ec-252-l10-instruction sets and addressing modes
EE5440 – Computer Architecture - Lecture 2
CSe_Cumilla Bangladesh_Country CSE CSE213_5.ppt
INSTRUCTION SET
Introduction to Processor Design and ARM Processor
RISC-V processor- computer organization and design
Co&al lecture-05
Instruction Set Architecture
Computer organization basics
Computer Architecture Lecture slide 2. course se 222
COMPUTER ORGANIZATION NOTES Unit 2
COA Chapter 3 final edited*Minimum 40 characters required.ppt
Instruction-Sets-2.pptx
CO_Chapter2.ppt
Ad

More from Anwal Mirza (20)

DOCX
Training & development
PPT
Training and dev
PPT
Testing and selection
PPT
Strategic planning
PPT
Recruitment
PPT
Job analysis
PPT
Interviewing
PPT
Hrm ppt ch. 01
PPT
Hrm challenges
PDF
Firstpage
DOCX
Hci scanrio-exercise
PPT
Hci user interface-design principals
PPT
Hci user interface-design principals lec 7
PPTX
Hci user centered design 11
PPTX
Hci lec 5,6
PPT
Hci lec 4
PPTX
Hci lec 1 & 2
PPTX
Hci interace affects the user lec 8
PPTX
Hci evaluationa frame work lec 14
PPTX
Hci design collaboration lec 9 10
Training & development
Training and dev
Testing and selection
Strategic planning
Recruitment
Job analysis
Interviewing
Hrm ppt ch. 01
Hrm challenges
Firstpage
Hci scanrio-exercise
Hci user interface-design principals
Hci user interface-design principals lec 7
Hci user centered design 11
Hci lec 5,6
Hci lec 4
Hci lec 1 & 2
Hci interace affects the user lec 8
Hci evaluationa frame work lec 14
Hci design collaboration lec 9 10

Recently uploaded (20)

PPTX
Patient Appointment Booking in Odoo with online payment
PPTX
Introduction to Windows Operating System
PPTX
GSA Content Generator Crack (2025 Latest)
PDF
AI-Powered Threat Modeling: The Future of Cybersecurity by Arun Kumar Elengov...
PDF
Wondershare Recoverit Full Crack New Version (Latest 2025)
PPTX
Log360_SIEM_Solutions Overview PPT_Feb 2020.pptx
PPTX
Computer Software and OS of computer science of grade 11.pptx
PDF
How to Make Money in the Metaverse_ Top Strategies for Beginners.pdf
PDF
Top 10 Software Development Trends to Watch in 2025 🚀.pdf
PPTX
assetexplorer- product-overview - presentation
PDF
EN-Survey-Report-SAP-LeanIX-EA-Insights-2025.pdf
PDF
EaseUS PDF Editor Pro 6.2.0.2 Crack with License Key 2025
PDF
Autodesk AutoCAD Crack Free Download 2025
PDF
Topaz Photo AI Crack New Download (Latest 2025)
PPTX
Advanced SystemCare Ultimate Crack + Portable (2025)
PDF
Salesforce Agentforce AI Implementation.pdf
PDF
Complete Guide to Website Development in Malaysia for SMEs
PDF
AI/ML Infra Meetup | Beyond S3's Basics: Architecting for AI-Native Data Access
PDF
Product Update: Alluxio AI 3.7 Now with Sub-Millisecond Latency
PDF
Cost to Outsource Software Development in 2025
Patient Appointment Booking in Odoo with online payment
Introduction to Windows Operating System
GSA Content Generator Crack (2025 Latest)
AI-Powered Threat Modeling: The Future of Cybersecurity by Arun Kumar Elengov...
Wondershare Recoverit Full Crack New Version (Latest 2025)
Log360_SIEM_Solutions Overview PPT_Feb 2020.pptx
Computer Software and OS of computer science of grade 11.pptx
How to Make Money in the Metaverse_ Top Strategies for Beginners.pdf
Top 10 Software Development Trends to Watch in 2025 🚀.pdf
assetexplorer- product-overview - presentation
EN-Survey-Report-SAP-LeanIX-EA-Insights-2025.pdf
EaseUS PDF Editor Pro 6.2.0.2 Crack with License Key 2025
Autodesk AutoCAD Crack Free Download 2025
Topaz Photo AI Crack New Download (Latest 2025)
Advanced SystemCare Ultimate Crack + Portable (2025)
Salesforce Agentforce AI Implementation.pdf
Complete Guide to Website Development in Malaysia for SMEs
AI/ML Infra Meetup | Beyond S3's Basics: Architecting for AI-Native Data Access
Product Update: Alluxio AI 3.7 Now with Sub-Millisecond Latency
Cost to Outsource Software Development in 2025

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