SlideShare a Scribd company logo
1 of 13
REPRESENTING INSTRUCTIONS IN
THE COMPUTER
REPRESENTING INSTRUCTIONS IN THE COMPUTER
 Instructions are kept in the computer as a series of high and low
electronic signals, represented as numbers
 Each piece of an instruction can be considered as an individual
number
 Placing these numbers side by side forms the instruction
 Translating ARM Assembly Instructions into a Machine Instructions
 Real ARM language version of the instruction represented
symbolically as ADD r5, r1, r2
 First as a combination of decimal numbers and then of binary
numbers
ARM FIELDS
 Opcode - Basic operation of the instruction
 Rd -The register destination operand. It gets the result of the
operation
 Rn - The first register source operand
 Operand2 - The second source operand
 I - Immediate
If I = 0 second source operand is register
If I = 1 second source operand is 12 bit immediate
(constant)
 S - Set condition code. Related to conditional branch
instruction
 Cond - Condition. Related to conditional branch instruction
 F - Instruction format. Allows ARM to different
instruction format when needed
Cond F I Opcode S Rn Rd Operand2
4 bits 2 bits 1 bit 4 bits 1 bit 4 bits 4 bits 12 bits
ARM INSTRUCTION ENCODING
 Reg - Register number between 0 and 15
 Constant => 12 bit constant
 Address => 12 bit address
 Op => Opcode
Instruction Forma
t
Cond F I Opcode S Rn Rd Operan
d
ADD DP 14 0 0 4 0 Reg Re
g
Reg
SUB DP 14 0 0 2 0 Reg Re
g
Reg
ADD
(immediat
e)
DP 14 0 1 4 0 Reg Re
g
consta
nt
LDR (load
word)
DT 14 1 n.a. 24 n.a. Reg Re
g
Addres
s
STR
(store
word)
DT 14 1 n.a. 25 n.a. Reg Re
g
Addres
s
DECIMAL REPRESENTATION OF INSTRUCTION
 ADD r5, r1, r2
 Each of these segments of an instruction is called a field
 Fourth field containing 4 - Tells the ARM computer that this
instruction performs addition
 The sixth field - Gives the number of the register that is the first
source operand
 The last field - Gives the other source operand for the addition
(2 = r2)
 The seventh field contains - The number of the register that is to
receive the sum
 This instruction adds register r1 to register r2 and places the
sum in the register r5
Cond F I Opcode S Rn Rd Operand2
14 0 0 4 0 1 5 2
INSTRUCTION FORMAT
 Layout of instruction
 Instruction represented as fields of binary numbers
 32 bit long
 Numeric version of instructions machine language and a
sequence of such instructions machine code
 Instruction format - A form of representation of an instruction
composed of fields of binary numbers
 Machine language - Binary representation used for
communication within a computer system
14 0 0 4 0 1 5 2
1110 00 0 0100 0 0001 0101 000000000010
4 bits 2 bits 1 bit 4 bits 1 bit 4 bits 4 bits 12 bits
ARM INSTRUCTION FORMAT
 Data processing (DP) instruction format
 Data transfer (DT) instruction format
 Although multiple formats complicate the hardware
Complexity is reduced by keeping the formats similar
 For example, the first two fields and last three fields of the two
formats are the same size and four of them have the same
names
 The length of the opcode field in DT format is equal to the sum
of the lengths of three fields of DP format
14 1 24 3 5 32
4 bits 2 bits 6 bits 4 bits 4 bits 12 bits
ARM FIELDS (2)
 ADD r3, r3, #4 ; r3=r3+4
 Constant 4 is placed in operand 2 field and the I field is set to 1
 LDR r5, [r3, #32] ; Temporary register r5 gets A[8]
 Load and store use a different instruction format from above
with 6 fields
 Field F = 1 => Tell ARM that format is different
 Data transfer instruction format
 Opcode field 24 => instruction perform load word
 Offset2 field has 32 as the offset to add to the base register
14 0 1 4 0 3 3 4
Cond F Opcode Rn Rd Offset2
4 bits 2 bits 6 bits 4 bits 4 bits 12 bits
TRANSLATING ARM ASSEMBLY LANGUAGE
INTO MACHINE LANGUAGE
 Consider an example all the way from what the
programmer writes to what the computer executes
 If r3 has the base of the array A and r2 corresponds to h,
the assignment statement
 A[30] = h + A[30]; is compiled into
 LDR r5, [r3, #120] # Temporary reg r5 gets A[30]
 ADD r5, r2, r5 # Temporary reg r5 gets h + A[30]
 STR r5, [r3, #120] # Stores h + A[30] back into A[30]
 What is the ARM machine language code for these three
instructions?
MACHINE LANGUAGE INSTRUCTION USING
DECIMAL NUMBERS
Cond F I Opcod
e
S Rn Rd Operand
2/Offset
12
14 1 24 3 5 120
14 0 0 4 0 2 5 5
14 1 25 3 5 120
MACHINE LANGUAGE INSTRUCTION USING
BINARY NUMBERS
Cond F I Opcode S Rn Rd Operand
2/Offset2
1110 1 11000 0011 0101 0000
0111
1 000
1110 0 0 100 0 0010 0101 0000
0000
0101
1110 1 11001 0011 0101 0000
0111
1 000
ARM MACHINE LANGUAGE
Name Format Example Comments
ADD DP 14 0 0 4 0 2 1 3 ADD
r1,r2,r3
SUB DP 14 0 0 2 0 2 1 3 SUB
r1,r2,r3
LDR DT 14 1 24 2 1 100 LDR r1,
100(r2)
STR DT 14 1 25 2 1 100 STR r1,
100(r2)
Field
size
4 bits 2
bits
1 bit 4 bits 1 bit 4
bits
4
bits
12 bits All ARM
instructions
are 32 bits
long
DP
format
DP Cond F I Opcode S Rn Rd Operan
d2
Arithmetic
instruction
format
DT
format
DT Cond F Opcode Rn Rd Offset1
2
Data
transfer
format
What ARM instruction does this represent?
 ADD r0, r1, r2
 ADD r1, r0, r2
 ADD r2, r1, r0
 SUB r2, r0, r1
Cond F I Opcod
e
S Rn Rd Operand
2
14 0 0 4 0 0 1 2

More Related Content

Similar to L3_Representing Instructions in the Computer.pptx

Similar to L3_Representing Instructions in the Computer.pptx (20)

Arm teaching material
Arm teaching materialArm teaching material
Arm teaching material
 
Ch2 arm-1
Ch2 arm-1Ch2 arm-1
Ch2 arm-1
 
ch2-arm-1.ppt
ch2-arm-1.pptch2-arm-1.ppt
ch2-arm-1.ppt
 
ARM.ppt
ARM.pptARM.ppt
ARM.ppt
 
Lecture8
Lecture8Lecture8
Lecture8
 
arm-intro.ppt
arm-intro.pptarm-intro.ppt
arm-intro.ppt
 
ARM AAE - Intrustion Sets
ARM AAE - Intrustion SetsARM AAE - Intrustion Sets
ARM AAE - Intrustion Sets
 
Unit II arm 7 Instruction Set
Unit II arm 7 Instruction SetUnit II arm 7 Instruction Set
Unit II arm 7 Instruction Set
 
Avr instruction set
Avr instruction setAvr instruction set
Avr instruction set
 
Module 2 PPT of ES.pptx
Module 2 PPT of ES.pptxModule 2 PPT of ES.pptx
Module 2 PPT of ES.pptx
 
digitaldesign-2020-lecture10a-lc3andmips-beforelecture.pdf
digitaldesign-2020-lecture10a-lc3andmips-beforelecture.pdfdigitaldesign-2020-lecture10a-lc3andmips-beforelecture.pdf
digitaldesign-2020-lecture10a-lc3andmips-beforelecture.pdf
 
15CS44 MP & MC module 5
15CS44 MP & MC  module 515CS44 MP & MC  module 5
15CS44 MP & MC module 5
 
ARM Introduction
ARM IntroductionARM Introduction
ARM Introduction
 
The ARM Architecture: ARM : ARM Architecture
The ARM Architecture: ARM : ARM ArchitectureThe ARM Architecture: ARM : ARM Architecture
The ARM Architecture: ARM : ARM Architecture
 
Arm
ArmArm
Arm
 
UNIT 2 ERTS.ppt
UNIT 2 ERTS.pptUNIT 2 ERTS.ppt
UNIT 2 ERTS.ppt
 
Instruction set summary
Instruction set summary Instruction set summary
Instruction set summary
 
Chapter 4
Chapter 4Chapter 4
Chapter 4
 
Compreport
CompreportCompreport
Compreport
 
gayathri.p.pptx
gayathri.p.pptxgayathri.p.pptx
gayathri.p.pptx
 

Recently uploaded

(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
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Dr.Costas Sachpazis
 
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
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxpurnimasatapathy1234
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlysanyuktamishra911
 
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
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations120cr0395
 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdfankushspencer015
 
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
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSKurinjimalarL3
 
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...ranjana rawat
 
UNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular ConduitsUNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular Conduitsrknatarajan
 
UNIT-III FMM. DIMENSIONAL ANALYSIS
UNIT-III FMM.        DIMENSIONAL ANALYSISUNIT-III FMM.        DIMENSIONAL ANALYSIS
UNIT-III FMM. DIMENSIONAL ANALYSISrknatarajan
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxupamatechverse
 
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxupamatechverse
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Call 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
 

Recently uploaded (20)

(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...
 
Roadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and RoutesRoadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and Routes
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
 
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...
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptx
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghly
 
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
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
 
Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations
 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdf
 
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
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
 
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
 
UNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular ConduitsUNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular Conduits
 
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
 
UNIT-III FMM. DIMENSIONAL ANALYSIS
UNIT-III FMM.        DIMENSIONAL ANALYSISUNIT-III FMM.        DIMENSIONAL ANALYSIS
UNIT-III FMM. DIMENSIONAL ANALYSIS
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptx
 
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptx
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
 
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...
 

L3_Representing Instructions in the Computer.pptx

  • 2. REPRESENTING INSTRUCTIONS IN THE COMPUTER  Instructions are kept in the computer as a series of high and low electronic signals, represented as numbers  Each piece of an instruction can be considered as an individual number  Placing these numbers side by side forms the instruction  Translating ARM Assembly Instructions into a Machine Instructions  Real ARM language version of the instruction represented symbolically as ADD r5, r1, r2  First as a combination of decimal numbers and then of binary numbers
  • 3. ARM FIELDS  Opcode - Basic operation of the instruction  Rd -The register destination operand. It gets the result of the operation  Rn - The first register source operand  Operand2 - The second source operand  I - Immediate If I = 0 second source operand is register If I = 1 second source operand is 12 bit immediate (constant)  S - Set condition code. Related to conditional branch instruction  Cond - Condition. Related to conditional branch instruction  F - Instruction format. Allows ARM to different instruction format when needed Cond F I Opcode S Rn Rd Operand2 4 bits 2 bits 1 bit 4 bits 1 bit 4 bits 4 bits 12 bits
  • 4. ARM INSTRUCTION ENCODING  Reg - Register number between 0 and 15  Constant => 12 bit constant  Address => 12 bit address  Op => Opcode Instruction Forma t Cond F I Opcode S Rn Rd Operan d ADD DP 14 0 0 4 0 Reg Re g Reg SUB DP 14 0 0 2 0 Reg Re g Reg ADD (immediat e) DP 14 0 1 4 0 Reg Re g consta nt LDR (load word) DT 14 1 n.a. 24 n.a. Reg Re g Addres s STR (store word) DT 14 1 n.a. 25 n.a. Reg Re g Addres s
  • 5. DECIMAL REPRESENTATION OF INSTRUCTION  ADD r5, r1, r2  Each of these segments of an instruction is called a field  Fourth field containing 4 - Tells the ARM computer that this instruction performs addition  The sixth field - Gives the number of the register that is the first source operand  The last field - Gives the other source operand for the addition (2 = r2)  The seventh field contains - The number of the register that is to receive the sum  This instruction adds register r1 to register r2 and places the sum in the register r5 Cond F I Opcode S Rn Rd Operand2 14 0 0 4 0 1 5 2
  • 6. INSTRUCTION FORMAT  Layout of instruction  Instruction represented as fields of binary numbers  32 bit long  Numeric version of instructions machine language and a sequence of such instructions machine code  Instruction format - A form of representation of an instruction composed of fields of binary numbers  Machine language - Binary representation used for communication within a computer system 14 0 0 4 0 1 5 2 1110 00 0 0100 0 0001 0101 000000000010 4 bits 2 bits 1 bit 4 bits 1 bit 4 bits 4 bits 12 bits
  • 7. ARM INSTRUCTION FORMAT  Data processing (DP) instruction format  Data transfer (DT) instruction format  Although multiple formats complicate the hardware Complexity is reduced by keeping the formats similar  For example, the first two fields and last three fields of the two formats are the same size and four of them have the same names  The length of the opcode field in DT format is equal to the sum of the lengths of three fields of DP format 14 1 24 3 5 32 4 bits 2 bits 6 bits 4 bits 4 bits 12 bits
  • 8. ARM FIELDS (2)  ADD r3, r3, #4 ; r3=r3+4  Constant 4 is placed in operand 2 field and the I field is set to 1  LDR r5, [r3, #32] ; Temporary register r5 gets A[8]  Load and store use a different instruction format from above with 6 fields  Field F = 1 => Tell ARM that format is different  Data transfer instruction format  Opcode field 24 => instruction perform load word  Offset2 field has 32 as the offset to add to the base register 14 0 1 4 0 3 3 4 Cond F Opcode Rn Rd Offset2 4 bits 2 bits 6 bits 4 bits 4 bits 12 bits
  • 9. TRANSLATING ARM ASSEMBLY LANGUAGE INTO MACHINE LANGUAGE  Consider an example all the way from what the programmer writes to what the computer executes  If r3 has the base of the array A and r2 corresponds to h, the assignment statement  A[30] = h + A[30]; is compiled into  LDR r5, [r3, #120] # Temporary reg r5 gets A[30]  ADD r5, r2, r5 # Temporary reg r5 gets h + A[30]  STR r5, [r3, #120] # Stores h + A[30] back into A[30]  What is the ARM machine language code for these three instructions?
  • 10. MACHINE LANGUAGE INSTRUCTION USING DECIMAL NUMBERS Cond F I Opcod e S Rn Rd Operand 2/Offset 12 14 1 24 3 5 120 14 0 0 4 0 2 5 5 14 1 25 3 5 120
  • 11. MACHINE LANGUAGE INSTRUCTION USING BINARY NUMBERS Cond F I Opcode S Rn Rd Operand 2/Offset2 1110 1 11000 0011 0101 0000 0111 1 000 1110 0 0 100 0 0010 0101 0000 0000 0101 1110 1 11001 0011 0101 0000 0111 1 000
  • 12. ARM MACHINE LANGUAGE Name Format Example Comments ADD DP 14 0 0 4 0 2 1 3 ADD r1,r2,r3 SUB DP 14 0 0 2 0 2 1 3 SUB r1,r2,r3 LDR DT 14 1 24 2 1 100 LDR r1, 100(r2) STR DT 14 1 25 2 1 100 STR r1, 100(r2) Field size 4 bits 2 bits 1 bit 4 bits 1 bit 4 bits 4 bits 12 bits All ARM instructions are 32 bits long DP format DP Cond F I Opcode S Rn Rd Operan d2 Arithmetic instruction format DT format DT Cond F Opcode Rn Rd Offset1 2 Data transfer format
  • 13. What ARM instruction does this represent?  ADD r0, r1, r2  ADD r1, r0, r2  ADD r2, r1, r0  SUB r2, r0, r1 Cond F I Opcod e S Rn Rd Operand 2 14 0 0 4 0 0 1 2