What will be the value of the Overflow flag after the follow

What will be the value of the Overflow flag after the following instructions have executed?

mov dx,-16 mov ax,2 imul dx

Solution

Answer:

Overflow flag is 0.

Reason:

Mov dx, -16:
-16 is represented in hexa decimal as 0fff0
dx contains 0fff0
Mov ax, 2 :
2 is represented as 2
2 is in ax
imul dx: multiplication taken place between ax and dx.
now DX:AX contains 0ffff ffe0. This result is still fit in a word.
So CF(carry flag) and OF(overflow flag) will be 0.

What will be the value of the Overflow flag after the following instructions have executed? mov dx,-16 mov ax,2 imul dxSolutionAnswer: Overflow flag is 0. Reaso

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site