The Intel instruction set lets you multiply and divide 8-, 16-, and 32- bit integers, using the instructions on the right.
Command
Description
MUL
Unsigned multiply
IMUL
Signed multiply
DIV
Unsigned divide
IDIV
Signed divide
MUL Instruction
The (unsigned multiply) instruction comes in three versions:
Multiplicand
Multiplier
Product
AL
r/m8
AX
AX
r/m16
DX:AX
EAX
r/m32
EDX:EAX
multiplies an 8-bit operand by ,
multiplies a 16-bit operand by , and
multiplies a 32-bit operand by .
The multiplier and multiplicand are the same size, and the product is twice their size.
Because the destination operand is twice the size of the multiplicand and multiplier, overflow can not occur.
Unsigned multiply of the accumulator by the source. If “src” is a byte value, then is used as the other multiplicand and the result is placed in . If “src” is a word value, then AX is multiplied by “src” and receives the result. If “src” is a double word value, then is multiplied by “src” and receives the result.
Clocks
Operands
286
386
486
Size Bytes
reg8
13
9-14
13-18
2
reg16
21
9-22
13-26
2
reg32
9-38
13-42
2-4
mem8
16
12-17
13-18
2-4
mem16
24
13-26
12-25
2-4
mem32
12-21
13-42
2-4
“I’m not arguing, I’m just explaining why I’m right.”
― Unknown