Write a single instruction that will dear the bits 2 and 3 i

Write a single instruction that will dear the bits 2 and 3 in AL to 0 while preserving the other bits Write a single instruction that mil complement the sign bit in al while preserving the other bits Write a single instruction that will convert the upper-case letter stored in al into the corresponding lower case letter. (Note that \'A\' is 41h and \'a\' is 61h) Suppose AX has a value of 81A4H. what will be the value of ax in hex after the execution of the instruction not ax? suppose AX = 81A4H and BX = AE69H. what will be the value of AX in hex after the execution of the instruction and AX.BX?

Solution

2a. Write a single instruction that will clear the bits 2 and 3 in AL to 0 while
   preserving the other bits.
   To clear the 2nd and 3rd bit, AND the AL with a binary value 1111 1001. So, the
   instruction is: AND AL F9h
b. Write a single instruction that will complement the sign bit in AL while
    preserving the other bits.
    To complement the MSB(i.e., the sign bit) of AL XOR the AL with binary value 1000 0000.
    So, the instruction is: XOR AL, 80h.
c. Write a single instruction that will convert the upper case letter stored in AL into
    the corresponding lower case letter. (Note that \'A\' is 41h and \'a\' is 61h)
    To convert an upper case letter to lower case, just add a decimal value 32 to the value
    in the register AL. So, the instruction is: ADDI AL, 20h.
d. Suppose AX has a value of 81A4H. What will be the value of AX in hex after the execution
    of the instruction NOT AX?
    NOT AX will complement the bits in AX. So, complementing 81A4H i.e., complementing the
    binary value 1000 0001 1010 0100 will result in 0111 1110 0101 1011 i.e., 7E5B.
    So, after execution of the instruction NOT AX, the value in AX is 7E5BH.

 Write a single instruction that will dear the bits 2 and 3 in AL to 0 while preserving the other bits Write a single instruction that mil complement the sign b

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site