I am learning assembly language programming. The system I use tends to follow a Eclipse platform. There is a mul (multiplication operation) command meant to multiply two 24 bit hexadecimal numbers and produce a result. I'll copy the portion from the help section of the tool and paste it here if that helps in arriving at the solution.
The Math problem:
Two 24-bit input data: 008400 and
The product of this results in a full 48-bit (integer) product. Then this is converted to 56-bits.
The result of the operation results in: 0x00 [8 bits]
0x0083FF [24 bits]
0xFEF800 [24 bits]
Now i cant seem to understand how this actually happened. Based on my calculation, the integer product should result in 0x8400. but that is not what the system arrives at. There is a help section on the platform which says the following for a 'mul' operation.
"To generate the product of the inputs, the multipliers first perform an integer multiplication, with signed or unsigned operands according to the attributes of the inputs. This produces a full 48-bit (integer) product that is correct for all input values; there are no special cases such as the square of 0x80 00001, due to the use of integer arithmetic.
The integer product is then converted to a 56-bit fractional form for use in the following ALU operation. For unsigned/unsigned multiplications, the 48-bit product is zero extended upward above bit 47, while all other products are sign extended upward from their high bit (bit 47) through to bit 55. The 56-bit product is then shifted left by one bit (inserting zero in the least-significant bit and discarding the value shifted out of the most-significant bit) to remove the duplicate sign bit that was generated in the product for signed/signed inputs, and thereby convert products of signed/signed inputs into the usual fractional output format."
Following this section i did the left shift, but I still don't end up with the answer the system shows. Could someone help me understand this please ? Thank you.