SlideShare une entreprise Scribd logo
1  sur  29
Computer Architecture



     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!)
Specific Data Types
•   General - arbitrary binary contents
•   Integer - single binary value
•   Ordinal - unsigned integer
•   Unpacked BCD - One digit per byte
•   Packed BCD - 2 BCD digits per byte
•   Near Pointer - 32 bit offset within segment
•   Bit field
•   Byte String
•   Floating Point
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

Contenu connexe

Tendances

12 processor structure and function
12 processor structure and function12 processor structure and function
12 processor structure and functiondilip kumar
 
05 instruction set design and architecture
05 instruction set design and architecture05 instruction set design and architecture
05 instruction set design and architectureWaqar Jamil
 
Computer Architecture and organization ppt.
Computer Architecture and organization ppt.Computer Architecture and organization ppt.
Computer Architecture and organization ppt.mali yogesh kumar
 
12 processor structure and function
12 processor structure and function12 processor structure and function
12 processor structure and functionSher Shah Merkhel
 
Computer organization basics
Computer organization  basicsComputer organization  basics
Computer organization basicsDeepak John
 
isa architecture
isa architectureisa architecture
isa architectureAJAL A J
 
02 computer evolution and performance
02 computer evolution and performance02 computer evolution and performance
02 computer evolution and performancedilip kumar
 
Instruction Set (Part 2)
Instruction Set (Part 2)Instruction Set (Part 2)
Instruction Set (Part 2)Ajeng Savitri
 
For students wk4_computer_function_and_interconnection
For students wk4_computer_function_and_interconnectionFor students wk4_computer_function_and_interconnection
For students wk4_computer_function_and_interconnectionlimyamahgoub
 
Embedded computing platform design
Embedded computing platform designEmbedded computing platform design
Embedded computing platform designRAMPRAKASHT1
 
05 internal memory
05 internal memory05 internal memory
05 internal memorydilip kumar
 

Tendances (19)

12 processor structure and function
12 processor structure and function12 processor structure and function
12 processor structure and function
 
15 ia64
15 ia6415 ia64
15 ia64
 
05 instruction set design and architecture
05 instruction set design and architecture05 instruction set design and architecture
05 instruction set design and architecture
 
Computer Architecture and organization ppt.
Computer Architecture and organization ppt.Computer Architecture and organization ppt.
Computer Architecture and organization ppt.
 
12 processor structure and function
12 processor structure and function12 processor structure and function
12 processor structure and function
 
13 risc
13 risc13 risc
13 risc
 
Computer organization basics
Computer organization  basicsComputer organization  basics
Computer organization basics
 
16 control unit
16 control unit16 control unit
16 control unit
 
07 input output
07 input output07 input output
07 input output
 
isa architecture
isa architectureisa architecture
isa architecture
 
01 introduction
01 introduction01 introduction
01 introduction
 
08 operating system support
08 operating system support08 operating system support
08 operating system support
 
01 introduction
01 introduction01 introduction
01 introduction
 
02 computer evolution and performance
02 computer evolution and performance02 computer evolution and performance
02 computer evolution and performance
 
Instruction Set (Part 2)
Instruction Set (Part 2)Instruction Set (Part 2)
Instruction Set (Part 2)
 
07 input output
07 input output07 input output
07 input output
 
For students wk4_computer_function_and_interconnection
For students wk4_computer_function_and_interconnectionFor students wk4_computer_function_and_interconnection
For students wk4_computer_function_and_interconnection
 
Embedded computing platform design
Embedded computing platform designEmbedded computing platform design
Embedded computing platform design
 
05 internal memory
05 internal memory05 internal memory
05 internal memory
 

En vedette

Evolve13 Adobe CQ Conference - Life Technologies and Cloudwords Customer Story
Evolve13 Adobe CQ Conference - Life Technologies and Cloudwords Customer StoryEvolve13 Adobe CQ Conference - Life Technologies and Cloudwords Customer Story
Evolve13 Adobe CQ Conference - Life Technologies and Cloudwords Customer StoryMichael Meinhardt
 
Genre survey results
Genre survey resultsGenre survey results
Genre survey resultsHollieRackley
 
The Future of Advertising - Marrying Data and the Imagination
The Future of Advertising - Marrying Data and the ImaginationThe Future of Advertising - Marrying Data and the Imagination
The Future of Advertising - Marrying Data and the ImaginationInsight Summit Series
 
Everest app presentation copy
Everest app presentation copyEverest app presentation copy
Everest app presentation copyjfbenson
 
Initiation algorithmique
Initiation algorithmiqueInitiation algorithmique
Initiation algorithmiqueazizsabo
 
2013 03 business-profile_tfc
2013 03 business-profile_tfc2013 03 business-profile_tfc
2013 03 business-profile_tfcTF Consulting
 
Konkurs chetsov-pptx
Konkurs chetsov-pptxKonkurs chetsov-pptx
Konkurs chetsov-pptxMrMcDeer
 
Presentación1
Presentación1Presentación1
Presentación1ktmag
 
Digital Strategy, Simplicity through Complexity
Digital Strategy, Simplicity through ComplexityDigital Strategy, Simplicity through Complexity
Digital Strategy, Simplicity through ComplexityInsight Summit Series
 
العربيزي بين الواقع والمستقبل arabizi
العربيزي بين الواقع والمستقبل arabiziالعربيزي بين الواقع والمستقبل arabizi
العربيزي بين الواقع والمستقبل arabiziZoe Wong
 
Hwst 107 unit 3 nuclear
Hwst 107 unit 3 nuclearHwst 107 unit 3 nuclear
Hwst 107 unit 3 nuclearpualii
 

En vedette (19)

The Future of Search Marketing
The Future of Search MarketingThe Future of Search Marketing
The Future of Search Marketing
 
Jaipur rural
Jaipur ruralJaipur rural
Jaipur rural
 
Evolve13 Adobe CQ Conference - Life Technologies and Cloudwords Customer Story
Evolve13 Adobe CQ Conference - Life Technologies and Cloudwords Customer StoryEvolve13 Adobe CQ Conference - Life Technologies and Cloudwords Customer Story
Evolve13 Adobe CQ Conference - Life Technologies and Cloudwords Customer Story
 
Genre survey results
Genre survey resultsGenre survey results
Genre survey results
 
The Future of Advertising - Marrying Data and the Imagination
The Future of Advertising - Marrying Data and the ImaginationThe Future of Advertising - Marrying Data and the Imagination
The Future of Advertising - Marrying Data and the Imagination
 
Everest app presentation copy
Everest app presentation copyEverest app presentation copy
Everest app presentation copy
 
Initiation algorithmique
Initiation algorithmiqueInitiation algorithmique
Initiation algorithmique
 
Normas apa
Normas apaNormas apa
Normas apa
 
2013 03 business-profile_tfc
2013 03 business-profile_tfc2013 03 business-profile_tfc
2013 03 business-profile_tfc
 
1 11-006-06
1 11-006-061 11-006-06
1 11-006-06
 
Blog türleri̇
Blog türleri̇Blog türleri̇
Blog türleri̇
 
Konkurs chetsov-pptx
Konkurs chetsov-pptxKonkurs chetsov-pptx
Konkurs chetsov-pptx
 
Presentación1
Presentación1Presentación1
Presentación1
 
Digital Strategy, Simplicity through Complexity
Digital Strategy, Simplicity through ComplexityDigital Strategy, Simplicity through Complexity
Digital Strategy, Simplicity through Complexity
 
العربيزي بين الواقع والمستقبل arabizi
العربيزي بين الواقع والمستقبل arabiziالعربيزي بين الواقع والمستقبل arabizi
العربيزي بين الواقع والمستقبل arabizi
 
E library
E libraryE library
E library
 
Qingpeng zhang week5
Qingpeng zhang week5Qingpeng zhang week5
Qingpeng zhang week5
 
Hwst 107 unit 3 nuclear
Hwst 107 unit 3 nuclearHwst 107 unit 3 nuclear
Hwst 107 unit 3 nuclear
 
Story board
Story boardStory board
Story board
 

Similaire à Frist slider share

pipeline and pipeline hazards
pipeline and pipeline hazards pipeline and pipeline hazards
pipeline and pipeline hazards Bharti Khemani
 
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
 
IT209 Cpu Structure Report
IT209 Cpu Structure ReportIT209 Cpu Structure Report
IT209 Cpu Structure ReportBis Aquino
 
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
 
Computer System Architecture Lecture Note 7 addressing
Computer System Architecture Lecture Note 7 addressingComputer System Architecture Lecture Note 7 addressing
Computer System Architecture Lecture Note 7 addressingBudditha Hettige
 
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
 
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
 
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
 
Computer_Organization and architecture _unit 1.pptx
Computer_Organization and architecture _unit 1.pptxComputer_Organization and architecture _unit 1.pptx
Computer_Organization and architecture _unit 1.pptxManimegalaM3
 
instruction sets (1).pptx
instruction sets (1).pptxinstruction sets (1).pptx
instruction sets (1).pptxAmanMomin9
 
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
 

Similaire à Frist slider share (20)

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
 
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...
 
IT209 Cpu Structure Report
IT209 Cpu Structure ReportIT209 Cpu Structure Report
IT209 Cpu Structure Report
 
INSTRUCTION SET
INSTRUCTION SETINSTRUCTION SET
INSTRUCTION SET
 
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...
 
Computer System Architecture Lecture Note 7 addressing
Computer System Architecture Lecture Note 7 addressingComputer System Architecture Lecture Note 7 addressing
Computer System Architecture Lecture Note 7 addressing
 
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...
 
introduction to embedded systems part 1
introduction to embedded systems part 1introduction to embedded systems part 1
introduction to embedded systems part 1
 
CO_Chapter2.ppt
CO_Chapter2.pptCO_Chapter2.ppt
CO_Chapter2.ppt
 
Control unit
Control unitControl unit
Control unit
 
Dsp lab seminar
Dsp lab seminarDsp lab seminar
Dsp lab seminar
 
Processors selection
Processors selectionProcessors selection
Processors selection
 
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
 
9.cs instrset
9.cs instrset9.cs instrset
9.cs instrset
 
Computer_Organization and architecture _unit 1.pptx
Computer_Organization and architecture _unit 1.pptxComputer_Organization and architecture _unit 1.pptx
Computer_Organization and architecture _unit 1.pptx
 
instruction sets (1).pptx
instruction sets (1).pptxinstruction sets (1).pptx
instruction sets (1).pptx
 
RISC.ppt
RISC.pptRISC.ppt
RISC.ppt
 
13 risc
13 risc13 risc
13 risc
 
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
 

Dernier

Barangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptxBarangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptxCarlos105
 
FILIPINO PSYCHology sikolohiyang pilipino
FILIPINO PSYCHology sikolohiyang pilipinoFILIPINO PSYCHology sikolohiyang pilipino
FILIPINO PSYCHology sikolohiyang pilipinojohnmickonozaleda
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxthorishapillay1
 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPCeline George
 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Mark Reed
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxiammrhaywood
 
Concurrency Control in Database Management system
Concurrency Control in Database Management systemConcurrency Control in Database Management system
Concurrency Control in Database Management systemChristalin Nelson
 
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONTHEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONHumphrey A Beña
 
4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptxmary850239
 
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...Postal Advocate Inc.
 
ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4MiaBumagat1
 
Choosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for ParentsChoosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for Parentsnavabharathschool99
 
ACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfSpandanaRallapalli
 
Science 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptxScience 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptxMaryGraceBautista27
 
Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Celine George
 
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfLike-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfMr Bounab Samir
 
Judging the Relevance and worth of ideas part 2.pptx
Judging the Relevance  and worth of ideas part 2.pptxJudging the Relevance  and worth of ideas part 2.pptx
Judging the Relevance and worth of ideas part 2.pptxSherlyMaeNeri
 
Keynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designKeynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designMIPLM
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxAnupkumar Sharma
 
Transaction Management in Database Management System
Transaction Management in Database Management SystemTransaction Management in Database Management System
Transaction Management in Database Management SystemChristalin Nelson
 

Dernier (20)

Barangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptxBarangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptx
 
FILIPINO PSYCHology sikolohiyang pilipino
FILIPINO PSYCHology sikolohiyang pilipinoFILIPINO PSYCHology sikolohiyang pilipino
FILIPINO PSYCHology sikolohiyang pilipino
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptx
 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERP
 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
 
Concurrency Control in Database Management system
Concurrency Control in Database Management systemConcurrency Control in Database Management system
Concurrency Control in Database Management system
 
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONTHEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
 
4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx
 
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
 
ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4
 
Choosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for ParentsChoosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for Parents
 
ACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdf
 
Science 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptxScience 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptx
 
Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17
 
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfLike-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
 
Judging the Relevance and worth of ideas part 2.pptx
Judging the Relevance  and worth of ideas part 2.pptxJudging the Relevance  and worth of ideas part 2.pptx
Judging the Relevance and worth of ideas part 2.pptx
 
Keynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designKeynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-design
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
 
Transaction Management in Database Management System
Transaction Management in Database Management SystemTransaction Management in Database Management System
Transaction Management in Database Management System
 

Frist slider share

  • 1. Computer Architecture 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. Specific Data Types • General - arbitrary binary contents • Integer - single binary value • Ordinal - unsigned integer • Unpacked BCD - One digit per byte • Packed BCD - 2 BCD digits per byte • Near Pointer - 32 bit offset within segment • Bit field • Byte String • Floating Point
  • 18. Types of Operation • Data Transfer • Arithmetic • Logical • Conversion • I/O • System Control • Transfer of Control
  • 19. 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
  • 20. Arithmetic • Add, Subtract, Multiply, Divide • Signed Integer • Floating point ? • May include —Increment (a++) —Decrement (a--) —Negate (-a)
  • 21. Shift and Rotate Operations
  • 24. Input/Output • May be specific instructions • May be done using data movement instructions (memory mapped) • May be done by a separate controller (DMA)
  • 25. Systems Control • Privileged instructions • CPU needs to be in specific state —Ring 0 on 80386+ —Kernel mode • For operating systems use
  • 26. 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

Notes de l'éditeur

  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. 16
  15. 18
  16. 19
  17. 20
  18. 21
  19. 22
  20. 23
  21. 24
  22. 25