Delta AS Series Programming Manual page 332

Hide thumbs Also See for AS Series:
Table of Contents

Advertisement

4.
Multiplying 32-bit binary values:
S
+1
1
b31...b16 b15...b0
b31 is the si gn bit. b31 is the si gn bit.
The product is a 64-bit value, and is stored in the register (D+3, D+2, D+1, D0), which is composed of 64 bits.
When the sign bit b63 is 0, the product is a positive value. When the sign bit b63 is 1, the product is a negative
value.
Example
The instruction multiplies the 16-bit value in D0 by the 16-bit value in D10, and stores the 32-bit product in (D21, D20).
The data in D21 is the higher 16-bit data, whereas the data in D20 is the lower 16-bit data. Whether the result is a
positive value or a negative value depends on the state of the highest bit b31. When b31 is OFF, the result is a positive
value. When b31 is ON, the result is a negative value.
D0×D10=(D21, D20)
16-bit value×16-bit value=32-bit value
S
S
S
+1
2
2
1
b31...b16 b15...b0
=
*
Ch a pt er 6 A pp l i e d I n s tr uc t io ns
D +1
D
D
+3
+2
b63...b48 b47...b32 b31...b16 b15...b0
b63, i.e. b15 in D+3, is the sign bit.
D
6 - 5 3
6_

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents