English

The accumulator in 8085 microprocessor contains data 71H and register E contains data 39H. What will be the contents of an accumulator in Hexadecimal after execution of the following  instructions independently - Computer Science 2

Advertisements
Advertisements

Question

The accumulator in 8085 microprocessor contains data 71H and register E contains data 39H. What will be the contents of an accumulator in  Hexadecimal after execution of the following  instructions independently ?

(i) ADD E
(ii) ORA E
(iii) RRC

Solution

ADD E: ADD E with Accumulator
Before execution : [A] = 71H
instruction : ADD E

         71 H = 0 1 1 1 0 0 0 1
ADD 39 H =  0 0 1 1 1 0 0 1
                    1 0 1 0 1 0 1 0 = AA H
After execution [A] = AA H
                        [Cy] = 00H

(ii) ORA E : Logically OR with Acc
Before execution : [A] = 71H

Instruction : ORA E

        71 H = 0 1 1 1 0 0 0 1

ORA 39 H = 0 0 1 1 1 0 0 1

                   0 1 1 1 1 0 0 1 = 79 H

After execution : [A] = 79H

RRC : Rotate accumulator right by one bit.
Before execution : [A] = 71H 0 1 1 1 0 0 0 1

Instruction : RRC
After execution [A] = 1 0 1 1 1 0 0 0 = B8 H

∴[A] = B8H
  [Cy] = 01H

shaalaa.com
Instruction Set and Programming of 8085
  Is there an error in this question or solution?
2016-2017 (March)

APPEARS IN

Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×