Hitachi HIDIC MICRO-EH Applications Manual page 103

Table of Contents

Advertisement

Item number
Arithmetic instructions-8
Ladder format
d = s1 S× s2
Command format
d = s1 S× s2
Usable I/O
d
Substitution destination
s1
Multiplicand
s2
Multiplier
Function
Multiplies s1 and s2 as signed binary data, and substitutes the result into d+1 (upper digit) and d (lower digit) as signed
binary.
The DER flag is 1 if d+1 exceeds the usable I/O range (in this case only the lower digit word is substituted), and 0 when it
does not.
31
Sign
31
Sign
×
63
3231
d+1
Sign bit
The sign of the operation result is entered in the most significant bit.
s1, s2
– 2147483648 to +2147483647 (decimal)
H80000000 to H7FFFFFFF (hexadecimal)
Cautionary notes
The operation result is always assigned to d and d+1. Be sure not to use word or double word d+1 as the I/O of other
functions.
Program example
X00000
Program description
When input X00000 turns on, the product of the values in DR0026 and DR0028 is substituted into DR0031 as signed
binary data.
Name
Condition code
R7F4
R7F3
R7F2
DER
ERR
SD
Number of steps
Condition
Double word
Bit
R,
TD, SS,
X
Y
L,
WX WY
CU, CT
M
0
s1
0
s2
0
d
DR0031 = DR0026 S DR0028
*
5-53
Chapter 5 Instruction Specifications
Signed binary multiplication (SIGNED BINARY
MULTIPLICATION)
Processing time (
R7F1
R7F0
Average Maximum
V
C
143
Steps
6
Word
Double word
WR,
DR,
TC DX DY
WM
DM
Example) D R0031 = DR0026 S × DR0028
WR0027
DR0026
WR0029
DR0028
×
WR0034
WR0033
WR0032
DR0033
DR0031
LD
[
DR0031 = DR0026 S DR0028
]
µ
Remark
s)
Other
s1
WR0026
s2
WR0028
WR0031
X00000
*

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents