193k views
2 votes
What will be the content of AX and DX after the following operation?

mov bx, 1000 h
mov ax, 368 h
mul bx
Please write the content of AX and DX in the following blank.

User Da Tong
by
8.4k points

1 Answer

1 vote

Final answer:

After multiplying 368h by 1000h, AX will contain 8000h (the lower 16 bits of the product) and DX will contain 36h (the higher 16 bits of the product).

Step-by-step explanation:

The operation in question uses the mul instruction, which is a multiply operation in assembly language. The mul bx instruction multiplies the AX register's content by that of the BX register. In this case, the value in AX (368h) is multiplied by the value in BX (1000h).

The result of a MUL operation where the source operand is a word (like BX) is a doubleword. Therefore, the lower half of the result (least significant word) will be in AX, and the higher half (most significant word) will be in DX. Since the numbers involved in this multiplication are 368h (hexadecimal), which is 872 in decimal, and 1000h (hexadecimal), which is 4096 in decimal, the full multiplication result will be 872 * 4096 = 3571712 (decimal), or 368000h (hexadecimal).

To get the actual content of AX and DX, we take the lower and higher word of the result, respectively: the lower 16 bits of 368000h are 8000h, so this will be the content of AX. The higher 16 bits of 368000h are 36h, which will be the content of DX.

User Samy Massoud
by
8.4k points