SlideShare une entreprise Scribd logo
1  sur  23
By Tien Phung
CS 147
Dr. Sin-Min Lee
• High-level Languages
• Assembly Languages
• Machine Languages
• Highest level of abstraction
• Platform-independent: same program
code can be converted and run on
computer with different
microprocessors and operating
system without modification.
• C ++, Java, Fortran
• Lower level of abstraction.
• Not platform-independent.
• Backward compatible.
• Can directly manipulate the data
stored in a microprocessor’s
interval components.
•Contain binary values
•Instruction is read and executed
directly by microprocessor.
•Platform-specific: each microprocessor
has its own machine language.
•High-level Languages
•Assembly Languages
Compiled
Assembled
Compilation
process for HLL
High-level language
program (C++, Fortran, etc.)
Compiler for Pentium
Windows PC
Compiler for G4
Power Mac Computer
Compiler for SPARC
UNIX workstation
Other
Pentium
object files
Pentium
object code
Other
G4
object files
G4
object code
Other
SPARC
object files
SPARC
object code
Pentium linker G4 linker SPARC linker
Pentium
executable file
Windows
Pentium PC
G4
executable file
G4
Power Mac
SPARC
Executable file
SPARC
UNIX workstation
Process for assembly
language programs.
Assembly Language
Program for processor X
Assembler for
processor X
Processor X
object code
Process X
linker
Processor X
executable file
Computer with
processor X
Other processor X
object file
• Data Transfer Instructions
• Data Operation Instructions
• Program Control Instructions
• Do not modify data, only copy value
to its destination.
• Main operation: move data from one place to another
* Load data from memory into microprocessor.
* Store data from microprocessor into memory.
* Move data within the microprocessor.
* Input data to the microprocessor.
* Output data from the microprocessor.
• Modify their data value
• Arithmetic instructions: add, subtract,
multiply and divide.
• Logic instruction: AND, OR, XOR, or
complement a single value.
• Shift instruction: shift the bits of data
value to either left or right.
• Use jump or branch to go to another
part of the program. (jr $ra)
• Conditional calls and returns
bne $t0, $t1, endloop
• Software and hardware interrupts
• Exception or traps
• Half-instruction: stop executing instruction
• Integer <
Unsigned 0 to 2n - 1
Signed -2 n-1 to 2 n-1 - 1
• Floating Point
• Boolean <
True = non-zero
False = zero
• Characters:
* Stored as binary values
* Encoded using ASCII, EBCDIC, UNICODE.
• Direct Mode
• Indirect Mode
• Immediate Mode
• Implicit Mode
a) Direct Mode
0: LDAC 5
instruction gets data from location 5
5: 10 stores value in CPU
b) Indirect Mode
0: LADC @ 5
instruction gets address from location 5
5: 10
then gets data from location 10
10: 20 stores value in CPU
c) Immediate Mode
0: LDAC #5 stores value from instruction in CPU
d) Implicit Mode
0: LDAC
instruction gets value from stack
stack store value in CPU
• Instruction code: assembly language
instruction converted to machine
code as binary value (0 and 1)
• Opcode needs 4 bits
• Operand needs 2 bits
• A microprocessor may be designed
to work with instructions that specify
3, 2, 1 or 0 operands.
2 bits 2 bits 2 bits
4 bits
2 bits 2 bits
4 bits
2 bits
4 bits
4 bits
opcode operand
#1
opcode
opcode
opcode
operand
#2
operand
#3
operand
#1
operand
#2
operand
ADD A,B,C (A=B+C)
1010 00 01 10
MOVE A,B (A=B) 1000 00 01
ADD A,C (A=A+C) 1010 00 10
LOAD B (Acc=B) 0000 01
ADD C (Acc=Acc+C) 1010 10
STORE A (A=Acc) 0001 00
PUSH B (Stack=B) 0101
PUSH C (Stack=C,B) 0110
ADD (Stack=B+C) 1010
POP A (A=Stack) 1100
• Need more instructions to accomplish
the same task.
• Hardware implement the microprocessor
become less complex as the number
of operand decreases.
• Instructions code use fewer bits.
• Microprocessor execute instruction more
quickly.
• Completeness: Does the instructions set have
all of the instruction a program needs to
perform its required task?
• Orthogonality: No overlap or perform the
same function.
• Good Instruction
<
Minimize overlap
between instructions
Provide programmers
necessary functions with less instructions.
• Large effect on performance of CPU
• CPU retrieve data from its registers
more quickly than from memory.
• Speed up program execution.
Concerning Question About ISA Design
• Does this processor have to be backward
compatible with other microprocessor?
• What types and size of data will the
microprocessor deal with?
• Are interrupts needed?
• Are conditional instruction needed?
Flag: zero, carry, sign
5059734.ppt

Contenu connexe

Similaire à 5059734.ppt

l1-introduction_to_computers_and_c_programming.pptx
l1-introduction_to_computers_and_c_programming.pptxl1-introduction_to_computers_and_c_programming.pptx
l1-introduction_to_computers_and_c_programming.pptxssuser6f38e5
 
B.sc cs-ii-u-3.1-basic computer programming and micro programmed control
B.sc cs-ii-u-3.1-basic computer programming and micro programmed controlB.sc cs-ii-u-3.1-basic computer programming and micro programmed control
B.sc cs-ii-u-3.1-basic computer programming and micro programmed controlRai University
 
Bca 2nd sem-u-3.1-basic computer programming and micro programmed control
Bca 2nd sem-u-3.1-basic computer programming and micro programmed controlBca 2nd sem-u-3.1-basic computer programming and micro programmed control
Bca 2nd sem-u-3.1-basic computer programming and micro programmed controlRai University
 
Begin with c++ Fekra Course #1
Begin with c++ Fekra Course #1Begin with c++ Fekra Course #1
Begin with c++ Fekra Course #1Amr Alaa El Deen
 
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
 
basic computer programming and micro programmed control
basic computer programming and micro programmed controlbasic computer programming and micro programmed control
basic computer programming and micro programmed controlRai University
 
Mca i-u-3-basic computer programming and micro programmed control
Mca i-u-3-basic computer programming and micro programmed controlMca i-u-3-basic computer programming and micro programmed control
Mca i-u-3-basic computer programming and micro programmed controlRai University
 
6_2018_11_23!09_24_56_PM (1).pptx
6_2018_11_23!09_24_56_PM (1).pptx6_2018_11_23!09_24_56_PM (1).pptx
6_2018_11_23!09_24_56_PM (1).pptxHebaEng
 
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 Systems Fundamentals
Computer Systems FundamentalsComputer Systems Fundamentals
Computer Systems FundamentalsShaun Wilson
 
heuring_jordan_----------ch02(1) (1).pptx
heuring_jordan_----------ch02(1) (1).pptxheuring_jordan_----------ch02(1) (1).pptx
heuring_jordan_----------ch02(1) (1).pptxchristinamary2620
 
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 Assembly Language & various basic things
Introduction to Assembly Language & various basic thingsIntroduction to Assembly Language & various basic things
Introduction to Assembly Language & various basic thingsishitasabrincse
 
arduinocourse-180308074529 (1).pdf
arduinocourse-180308074529 (1).pdfarduinocourse-180308074529 (1).pdf
arduinocourse-180308074529 (1).pdfssusere5db05
 
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
 

Similaire à 5059734.ppt (20)

l1-introduction_to_computers_and_c_programming.pptx
l1-introduction_to_computers_and_c_programming.pptxl1-introduction_to_computers_and_c_programming.pptx
l1-introduction_to_computers_and_c_programming.pptx
 
B.sc cs-ii-u-3.1-basic computer programming and micro programmed control
B.sc cs-ii-u-3.1-basic computer programming and micro programmed controlB.sc cs-ii-u-3.1-basic computer programming and micro programmed control
B.sc cs-ii-u-3.1-basic computer programming and micro programmed control
 
Bca 2nd sem-u-3.1-basic computer programming and micro programmed control
Bca 2nd sem-u-3.1-basic computer programming and micro programmed controlBca 2nd sem-u-3.1-basic computer programming and micro programmed control
Bca 2nd sem-u-3.1-basic computer programming and micro programmed control
 
C for Engineers
C for EngineersC for Engineers
C for Engineers
 
Begin with c++ Fekra Course #1
Begin with c++ Fekra Course #1Begin with c++ Fekra Course #1
Begin with c++ Fekra Course #1
 
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
 
basic computer programming and micro programmed control
basic computer programming and micro programmed controlbasic computer programming and micro programmed control
basic computer programming and micro programmed control
 
Mca i-u-3-basic computer programming and micro programmed control
Mca i-u-3-basic computer programming and micro programmed controlMca i-u-3-basic computer programming and micro programmed control
Mca i-u-3-basic computer programming and micro programmed control
 
6_2018_11_23!09_24_56_PM (1).pptx
6_2018_11_23!09_24_56_PM (1).pptx6_2018_11_23!09_24_56_PM (1).pptx
6_2018_11_23!09_24_56_PM (1).pptx
 
CO_Chapter2.ppt
CO_Chapter2.pptCO_Chapter2.ppt
CO_Chapter2.ppt
 
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 Systems Fundamentals
Computer Systems FundamentalsComputer Systems Fundamentals
Computer Systems Fundamentals
 
heuring_jordan_----------ch02(1) (1).pptx
heuring_jordan_----------ch02(1) (1).pptxheuring_jordan_----------ch02(1) (1).pptx
heuring_jordan_----------ch02(1) (1).pptx
 
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 Assembly Language & various basic things
Introduction to Assembly Language & various basic thingsIntroduction to Assembly Language & various basic things
Introduction to Assembly Language & various basic things
 
ISA.pptx
ISA.pptxISA.pptx
ISA.pptx
 
Computer arch
Computer archComputer arch
Computer arch
 
Arduino course
Arduino courseArduino course
Arduino course
 
arduinocourse-180308074529 (1).pdf
arduinocourse-180308074529 (1).pdfarduinocourse-180308074529 (1).pdf
arduinocourse-180308074529 (1).pdf
 
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
 

Dernier

Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...Call Girls in Nagpur High Profile
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 
UNIT-III FMM. DIMENSIONAL ANALYSIS
UNIT-III FMM.        DIMENSIONAL ANALYSISUNIT-III FMM.        DIMENSIONAL ANALYSIS
UNIT-III FMM. DIMENSIONAL ANALYSISrknatarajan
 
Online banking management system project.pdf
Online banking management system project.pdfOnline banking management system project.pdf
Online banking management system project.pdfKamal Acharya
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxAsutosh Ranjan
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)simmis5
 
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptxBSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptxfenichawla
 
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSSIVASHANKAR N
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingrakeshbaidya232001
 
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Christo Ananth
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...ranjana rawat
 
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINESIVASHANKAR N
 
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxpranjaldaimarysona
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
result management system report for college project
result management system report for college projectresult management system report for college project
result management system report for college projectTonystark477637
 
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...ranjana rawat
 

Dernier (20)

Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
 
UNIT-III FMM. DIMENSIONAL ANALYSIS
UNIT-III FMM.        DIMENSIONAL ANALYSISUNIT-III FMM.        DIMENSIONAL ANALYSIS
UNIT-III FMM. DIMENSIONAL ANALYSIS
 
Online banking management system project.pdf
Online banking management system project.pdfOnline banking management system project.pdf
Online banking management system project.pdf
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptx
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
 
Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)
 
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptxBSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
 
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
 
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writing
 
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
 
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINEDJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
 
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
 
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptx
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
result management system report for college project
result management system report for college projectresult management system report for college project
result management system report for college project
 
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
 
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
 

5059734.ppt

  • 1. By Tien Phung CS 147 Dr. Sin-Min Lee
  • 2. • High-level Languages • Assembly Languages • Machine Languages
  • 3. • Highest level of abstraction • Platform-independent: same program code can be converted and run on computer with different microprocessors and operating system without modification. • C ++, Java, Fortran
  • 4. • Lower level of abstraction. • Not platform-independent. • Backward compatible. • Can directly manipulate the data stored in a microprocessor’s interval components.
  • 5. •Contain binary values •Instruction is read and executed directly by microprocessor. •Platform-specific: each microprocessor has its own machine language.
  • 7. Compilation process for HLL High-level language program (C++, Fortran, etc.) Compiler for Pentium Windows PC Compiler for G4 Power Mac Computer Compiler for SPARC UNIX workstation Other Pentium object files Pentium object code Other G4 object files G4 object code Other SPARC object files SPARC object code Pentium linker G4 linker SPARC linker Pentium executable file Windows Pentium PC G4 executable file G4 Power Mac SPARC Executable file SPARC UNIX workstation
  • 8. Process for assembly language programs. Assembly Language Program for processor X Assembler for processor X Processor X object code Process X linker Processor X executable file Computer with processor X Other processor X object file
  • 9. • Data Transfer Instructions • Data Operation Instructions • Program Control Instructions
  • 10. • Do not modify data, only copy value to its destination. • Main operation: move data from one place to another * Load data from memory into microprocessor. * Store data from microprocessor into memory. * Move data within the microprocessor. * Input data to the microprocessor. * Output data from the microprocessor.
  • 11. • Modify their data value • Arithmetic instructions: add, subtract, multiply and divide. • Logic instruction: AND, OR, XOR, or complement a single value. • Shift instruction: shift the bits of data value to either left or right.
  • 12. • Use jump or branch to go to another part of the program. (jr $ra) • Conditional calls and returns bne $t0, $t1, endloop • Software and hardware interrupts • Exception or traps • Half-instruction: stop executing instruction
  • 13. • Integer < Unsigned 0 to 2n - 1 Signed -2 n-1 to 2 n-1 - 1 • Floating Point • Boolean < True = non-zero False = zero • Characters: * Stored as binary values * Encoded using ASCII, EBCDIC, UNICODE.
  • 14. • Direct Mode • Indirect Mode • Immediate Mode • Implicit Mode
  • 15. a) Direct Mode 0: LDAC 5 instruction gets data from location 5 5: 10 stores value in CPU b) Indirect Mode 0: LADC @ 5 instruction gets address from location 5 5: 10 then gets data from location 10 10: 20 stores value in CPU
  • 16. c) Immediate Mode 0: LDAC #5 stores value from instruction in CPU d) Implicit Mode 0: LDAC instruction gets value from stack stack store value in CPU
  • 17. • Instruction code: assembly language instruction converted to machine code as binary value (0 and 1) • Opcode needs 4 bits • Operand needs 2 bits • A microprocessor may be designed to work with instructions that specify 3, 2, 1 or 0 operands.
  • 18. 2 bits 2 bits 2 bits 4 bits 2 bits 2 bits 4 bits 2 bits 4 bits 4 bits opcode operand #1 opcode opcode opcode operand #2 operand #3 operand #1 operand #2 operand ADD A,B,C (A=B+C) 1010 00 01 10 MOVE A,B (A=B) 1000 00 01 ADD A,C (A=A+C) 1010 00 10 LOAD B (Acc=B) 0000 01 ADD C (Acc=Acc+C) 1010 10 STORE A (A=Acc) 0001 00 PUSH B (Stack=B) 0101 PUSH C (Stack=C,B) 0110 ADD (Stack=B+C) 1010 POP A (A=Stack) 1100
  • 19. • Need more instructions to accomplish the same task. • Hardware implement the microprocessor become less complex as the number of operand decreases. • Instructions code use fewer bits. • Microprocessor execute instruction more quickly.
  • 20. • Completeness: Does the instructions set have all of the instruction a program needs to perform its required task? • Orthogonality: No overlap or perform the same function. • Good Instruction < Minimize overlap between instructions Provide programmers necessary functions with less instructions.
  • 21. • Large effect on performance of CPU • CPU retrieve data from its registers more quickly than from memory. • Speed up program execution.
  • 22. Concerning Question About ISA Design • Does this processor have to be backward compatible with other microprocessor? • What types and size of data will the microprocessor deal with? • Are interrupts needed? • Are conditional instruction needed? Flag: zero, carry, sign