198
B+, B+P, B-, B-P
When two data are set ( + , - )
: Data for adding/subtracting or head number of the devices where the data for adding/subtracting is stored (BCD 4 digits)
:
Head number of the devices where the data to be added to/subtracted from is stored (BCD 4 digits)
Function
B+
(1) Adds the BCD 4-digit data designated by and the BCD 4-digit data designated by , and stores the result of the
addition at the device designated by .
(2) 0 to 9999 (BCD 4 digits) can be assigned to and .
(3) If the result of the addition operation exceeds 9999, the higher bits are ignored.
The carry flag in this case does not go ON.
B-
(1) Subtracts the BCD 4-digit data designated by and the BCD 4-digit data designated by , and stores the result of the
subtraction at the device designated by .
(2) 0 to 9999 (BCD 4 digits) can be assigned to and .
(3) The following will result if an underflow is generated by the subtraction operation:
The carry flag in this case does not go ON.
Operation Error
(1) In the following case, an operation error occurs, the error flag (SM0) turns ON, and an error code is stored into SD0.
6.2.5 B+, B+P, B-, B-P BCD 4-digit a ddition and subtraction operations
6.2.5
B+, B+P, B-, B-P
Setting
Data
Internal Devices
R, ZR
J\
U\G
Zn
Constants
K, H
Other
Bit Word Bit Word
––
–– ––
Error
code
Error details
Q00J/
Q00/
Q01
QnH QnPH QnPRH QnU LCPU
4100
The or BCD data is outside the 0 to 9999 range.
Basic
Process
High
performance
Redundant
Universal
LCPU
D
S
D D
S
D
Command
Command
P
B+/B
B+, B
B+P, B
P
S D
S D
indicates an instruction symbol of .
S
D
S
D
D
S
D
961221346578
D S D
S
D
4632
00155383
S
D
D
Digits exceeding the designated
number of digits are assumed to be 0.
404420346078
D D
S
S
D
999800030001
S
D