0% found this document useful (0 votes)
5 views42 pages

Mci Lecture 18

Uploaded by

chellamoneadhi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views42 pages

Mci Lecture 18

Uploaded by

chellamoneadhi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 42

Binary Encoding in ARM

Binary encoding is a procedure to convert data to a form that


allows the data to be easily used by difference computer
operating systems. Binary encoding uses the binary digit, or bit,
as the fundamental unit of information, and a bit may only be a '0'
or a '1' (only two possibilities since it is a binary-
encoded system).
What is the binary encoding of the below
instruction in ARM ???
mov r0, r0
ARM condition codes fields
Bit 31:28

1110
Bit 27:26 is 00 for data processing instructions

00
ARM data processing instructions
Bit 24:21

1101
Bit 19:16 for register R0

0000
Bit 15:12 for register R0

0000
Bit 11:0 for register Operand 2

00000000000
Bit 20 is for set condition codes ==S==0

0
Bit 25 for immediate operand

0
Final answer mov r0, r0

1110 00 0 1101 0 0000 0000 000000000000


Find the instruction????
Find the instruction????
MOV R1,#100==0X64=01100100

1110,0011,1010,0000,0001,0000,0110,0100===

0XE3A01064
What is the binary encoding of MOV
R2,#69?????

0XE3A02045
MOV R1,#100
What is the binary encoding of MOV
R1,#100?????
1110 0011 1010 0000 0001 0000 0110 0100
What is the binary encoding of MOV
R2,#69?????
What is the binary encoding of MOV
R2,#69?????
1110 0011 1010 0000 0001 0000 0110 0100
What is the binary encoding of CMP R1,R2
???
1110 0001 0101 0001 0000 0000 0000 0010
What is the binary encoding of CMP R1,R2
???
Decode 0xE0475001
1110 0000 0100 0111 0101 0000 0000 0001
ADD R5,R6,R7
has Rn = 6, Rd = 5, and Rm = 7.
Binary encoding of ADD R5,R6,R7
1110 000 0100 0 0110 0101 0000 0000 0111
Binary encoding of SUB R8,R9,R10
1110 000 0010 0 1001 1000 0000 0000 1010

1110 0000 0100 1001 1000 0000 0000 1010

You might also like