Hitachi HIDIC MICRO-EH Applications Manual page 97

Table of Contents

Advertisement

Item number
Arithmetic instructions-2
Ladder format
d = s1 + s2
Instruction format
d = s1 + s2
Usable I/O
d
Substitution destination
s1
Augend
s2
Addend
Function
Adds s1 and s2 as the binary data, and substitutes the result into d as the binary data.
The C flag is set to "0" if the operation result is within the range of H0000 to HFFFF for word and H00000000 to
HFFFFFFFF for double word. Otherwise, It is set to "1."
C = s1m s2m + s1m dm + s2m dm
The V flag is set to "1" if the operation result is meaningless as signed binary data, and "0" if it is meaningful.
s1
s2
Positive
Positive
Positive
Positive
Positive
Negative
Negative
Positive
Negative
Negative
Negative
Negative
Notes
The combinations of d, s1 and s2 are as follows:
d
Word
Double word
Double word
Program example
X00000
DIF0
Program description
The sum of WR0000 and WR0001values is substituted into WR0002 at the leading edge of input X00000.
Name
Condition code
R7F4
R7F3
R7F2
DER
ERR
SD
Number of steps
Condition
Word
Double word
Bit
R,
TD, SS,
X
Y
M
CU, CT
WX WY
d
V
Positive
0
Negative
1
Positive/Negative
0
Negative/Positive
0
Positive
1
Negative
0
s1
s2
Word
Word
Double word
WR0002 = WR0000 + WR0001
5-47
Chapter 5 Instruction Specifications
Binary addition (BINARY ADDITION)
Processing time (µs)
R7F1
R7F0
Average
Maximum
V
C
45
Steps
4
61
6
Word
Double word
WR,
DR,
WM TC DX DY
DM
Most significant bit
s1m
s2m
+
dm
C
V = s1m s2m dm + s1m s2m dm
LD
AND DIF0
[
WR0002 = WR0000 + WR0001
]
Remark
Upper case: W
Lower case: DW
Other
0
s1
0
s2
0
d
X00000

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents