recategorized by
6,124 views

1 Answer

Best answer
2 votes
2 votes

MVI A, 35H   // content of accumulator = 35H = 0011 0101

MOV B, A     // content of register B = 35H

STC              // set carry flag = 1.

CMC             // complement carry flag = not( 1) = 0.

RAR              // Each binary bit of the accumulator is rotated right by one position through the Carry flag. And modify carry = D0.

and D7 = previous carry.

                      //  Now content of accumulator = 0001 1010  , carry = 1.

XRA B             // The content of accumulator are exclusive OR with register B. 

 (0011 0101 ) xor ( 0001 1010 ) 

 = 0010 1111

 = 2F H ( Ans - D)

selected by

Related questions

1 votes
1 votes
1 answer
1
2 votes
2 votes
1 answer
2
1 votes
1 votes
1 answer
4