Delta AS Series Programming Manual page 354

Hide thumbs Also See for AS Series:
Table of Contents

Advertisement

4.
32-bit binary multiplication:
The product is a 32-bit value stored in (D, D+1) which is a 32-bit register. If b31 in D is 0, the product stored in (D, D+1) is
a positive value. If b31 in D is 1, the product stored in (D, D+1) is a negative value.
Example
The instruction multiplies the 16-bit value in D0 by the 16-bit value in D10, and stores the product in D20. The sign of the
product (positive or negative) depends on the leftmost bit (bit 15) in D20. If bit 15 in D20 is 0, the product stored in D20 is
a positive value. If bit 15 in D20 is 1, the product stored in D20 is a negative value.
D0×D10=D20
16-bit value×16-bit value=16-bit value
Additional remarks
1.
If the product of a 16-bit multiplication is not a 16-bit signed value available, and is greater than the maximum 16-bit
positive number K32767, or less than the minimum negative number K-32768, the carry flag SM602 is ON, and only
the low 16 bits are written.
2.
If you need the complete result of a 16-bit multiplication (a 32-bit value), use the */*P instruction (API 0102). Refer to
the explanation for the * instruction (API 0102) for more information.
3.
If the product of a 32-bit multiplication is not a 32-bit signed value available, and is greater than the maximum 32-bit
positive number K2147483647, or less than the minimum negative number K-2147483648, the carry flag SM602 is
ON, and only the low 32 bits are written.
4.
If you need the complete result of a 32-bit multiplication (a 64-bit value), use API 0102 D*/D*P. Refer to the
explanation for the * instruction (API 0102) for more information.
S
S
+1
S
+1
2
1
1
b31...b16 b15...b0
b31...b16 b15...b0
*
Bit 31 is a si gn bit.
Bit 31 is a si gn bit.
Ch a pt er 6 A pp l i e d I n s tr uc t io ns
S
D
D +1
2
b31...b16 b15...b0
=
Bit 31 is a si gn bit.
6_
6 - 7 5

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents