Omron C200HE ユーザーズマニュアル

ページ / 564
251
In the case below, 1,799,100,099 + (–282,751,929) = 1,516,348,100
(6B3C167D + EF258C47 = 5A61A2C4). Neither OF nor UF are turned ON.
Au + 1 : LR 21
Au : LR 20
Ad + 1 : DM 0011
Ad : DM 0010
6
B
3
C
1
6
7
D
E
F
2
5
8
C
4
7
0
+
R + 1 : DM 0021
R : DM 0020
A
2
C
4
5
A
6
1
0
CY (Cleared with CLC(41))
UF (SR 25405)
0
OF (SR 25404)
Note The status of the CY flag can be ignored when adding signed binary data since it
is relevant only in the addition of normal hexadecimal values.
5-20-6 DOUBLE BINARY SUBTRACT – SBBL(––)
Mi: First minuend word (binary)
IR, SR, AR, DM, HR, TC, LR
Su: First subtrahend word (binary)
IR, SR, AR, DM, HR, TC, LR
Ladder Symbols
Operand Data Areas
R: First result word
IR, SR, AR, DM, HR, LR
SBBL(––)
Mi
Su
R
@SBBL(––)
Mi
Su
R
Limitations
Mi and Mi+1 must be in the same data area, as must Su and Su+1, and R and
R+1.
Description
When the execution condition is OFF, SBBL(––) is not executed. When the
execution condition is ON, SBBL(––) subtracts CY and the eight-digit value in Su
and Su+1 from the eight-digit value in Mi and Mi+1, and places the result in R and
R+1. If the result is negative, CY is set and the 2’s complement of the actual re-
sult is placed in R+1 and R. Use the DOUBLE 2’s COMPLEMENT instructions to
convert the 2’s complement to the true result.
Mi + 1
Mi
Su + 1
Su
R + 1
R
CY
CY
SBBL(––) can also be used to subtract signed binary data. The overflow and un-
derflow flags (SR 25404 and SR 25405) indicate whether the result has exceed-
ed the lower or upper limits of the 32-bit signed binary data range. Refer to page
27 for details on signed binary data.
Binary Calculations
Section 5-20