19 Find the contents of register R20 after each of the follo

19. Find the contents of register R20 after each of the following instructions: (a) LDI R20,0x65 (b) LDI R20, 0x70 LDI R21,0x76 AND R20, R21 LDI R21, 0x6B OR R20, R21 (c) LDI R20,0x95 (d) LDI R20, 0x5D LDI R21,0xAA EOR R20,R21 LDI R21, 0x75 AND R20, R21 (c) LDI R20,0x0cs (LDI R20, 0x6A LDI R21,0x12 OR R20, R21 LDI R21, 0x6E EOR R20, R21 (g) LDI R20, 0x37 LDI R21,0x26 OR R20, R21

Solution

19 Ans)

(a) AND operation 0x65-binary 0x0110 0101

0x76-binary 0x0111 0110

-------------------------------------------------------------------

0x0110 0100---0x64

so answer 0x64 in R20 register

---------------------------------------------------------------

(b)

OR operation 0x70-binary 0x0111 0000

0x6B-binary 0x0110 1011

-------------------------------------------------------------------

0x0111 1011---0x7B

so answer 0x7B in R20 register

---------------------------------------------------------------

(c)

Ex-OR operation 0x95-binary 0x1001 0101

0xAA-binary0x1010 1010

-------------------------------------------------------------------

0x0011 1111---0x3F

so answer 0x3F in R20 register

---------------------------------------------------------------

(d)

AND operation 0x5D-binary 0x0101 1101

0x75-binary 0x0111 0101

-------------------------------------------------------------------

0x0101 0101---0x55

so answer 0x55 in R20 register

---------------------------------------------------------------

(e)

OR operation 0xC5-binary 0x1100 0101

0x12-binary 0x0001 0010

-------------------------------------------------------------------

0x1101 0111---0xD7

so answer 0xD7 in R20 register

---------------------------------------------------------------

(f)

Ex-OR operation 0x6A-binary 0x0110 1010

0x6E-binary 0x1110 1110

-------------------------------------------------------------------

0x1000 0100---0x84

so answer 0x84 in R20 register

---------------------------------------------------------------

(g)

OR operation 0x37-binary 0x0011 0111

0x26-binary 0x0010 0110

-------------------------------------------------------------------

0x0011 0111---0x37

so answer 0x37 in R20 register

---------------------------------------------------------------

Only 1 question per post will be answered please

 19. Find the contents of register R20 after each of the following instructions: (a) LDI R20,0x65 (b) LDI R20, 0x70 LDI R21,0x76 AND R20, R21 LDI R21, 0x6B OR R
 19. Find the contents of register R20 after each of the following instructions: (a) LDI R20,0x65 (b) LDI R20, 0x70 LDI R21,0x76 AND R20, R21 LDI R21, 0x6B OR R

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site