Hitachi NJI-350B Video Game Controller User Manual


 
Chapter 5 Instruction Specifications
5-53
Item number
Arithmetic instructions-8
Name
Signed binary multiplication (SIGNED BINARY
MULTIPLICATION)
Ladder format Condition code
Processing time (
µ
s)
Remark
R7F4 R7F3 R7F2 R7F1 R7F0
Average Maximum
d = s1 S× s2 DER ERR SD V C
zzzz
Command format Number of steps
143
Condition Steps
d = s1 S× s2 Double word 6
Bit Word Double word
Usable I/O
XY
R,
L,
M
TD, SS,
CU, CT
WX WY
WR,
WM
TC DX DY
DR,
DM
Constant
Other
d Substitution destination {{
s1 Multiplicand {{{{
s2 Multiplier {{{{
Function
z Multiplies s1 and s2 as signed binary data, and substitutes the result into d+1 (upper digit) and d (lower digit) as signed
binary.
z
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 0
dd+1
×
Example) D R0031 = DR0026 S
×
DR0028
s1
31 0
s2
Sign
63 0
Sign bit
3231
WR0027 WR0026
s1
DR0026
WR0029 WR0028
s2
DR0028
WR0032 WR0031WR0034 WR0033
×
DR0031DR0033
Sign
The sign of the operation result is entered in the most significant bit.
z
s1, s2 – 2147483648 to +2147483647 (decimal)
H80000000 to H7FFFFFFF (hexadecimal)
Cautionary notes
z
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
DR0031 = DR0026 S DR0028
LD X00000
[
DR0031 = DR0026 S DR0028
]
*
*
Program description
z
When input X00000 turns on, the product of the values in DR0026 and DR0028 is substituted into DR0031 as signed
binary data.
d = s1 S x s2