EasyManua.ls Logo

Inovance H3U Series - Page 106

Inovance H3U Series
737 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
105
4
4 Instructions 4.4.1 Four Arithmetic Operations
MUL: Binary number multiplication
Overview
The MUL instruction multiplies two binary numbers together.
MUL S1 S2 D
Binary number
multiplication
Applicable model:
H3U
S1 Multiplicand Data, or address of the word element that stores the data 16-bit instruction
(7 steps)
MUL:
Continuous
execution
MULP: Pulse
execution
32-bit instruction
(13 steps)
DMUL:
Continuous
execution
DMULP: Pulse
execution
S2 Multiplier Data, or address of the word element that stores the data
D Product
Address of the word element that stores the data. If a 16-
bit instruction is executed, the product contains 32 bits; if
a 32-bit instruction is executed, the product contains 64
bits.
Operands
Operand
Bit Element Word Element
System·User System·User Bit Designation Indexed Address Constant
Real
Number
S1 X Y M T C S SM D R T C SD KnX KnY KnM KnS KnSM
V,Z
Modication K H E
S2 X Y M T C S SM D R T C SD KnX KnY KnM KnS KnSM
V,Z
Modication K H E
D X Y M T C S SM D R T C SD KnX KnY KnM KnS KnSM
V,Z
Modication K H E
Note: The elements in gray background are supported.
Function
The MUL instruction requires contact driving and has three operands. Use this instruction to algebraically
multiply the values in S1 and S2 together in BIN mode. The result is stored in D. The variables in the
algebraic operation are processed as signed numbers. The highest bit is the sign bit. The value 0 indicates
a positive number, whereas the value 1 indicates a negative number. The product of a 32-bit multiplication
occupies four registers.
In 32-bit operation, the variable addresses in the MUL instruction contain the lower 16 bits, and the adjacent
high-numbered address unit contains the higher 16 bits. Avoid repeated or overlapping addresses during
programming. The result of the calculation contains only 32 bits. If this limit is exceeded, use the oating
point operation instruction EMUL.
S1 S2
DD
ˇ1
*
=
Sign bit Sign bit Sign bit
b15b15
b31
b0
b0 b0
16-bit
multiplication
S1
*
=
Sign bitSign bit Sign bit
b31
b31b63
b0
b0
S1
+1
S2
S2
+1
D
D D D
+3
+2 +1
b0
32-bit
multiplication

Table of Contents

Other manuals for Inovance H3U Series

Related product manuals