182
Signed Binary Data BCD(24)
cannot be used to convert signed binary data directly to BCD. T
o con
-
vert
signed binary data, first determine whether the data
is positive or negative. If
it
is positive, BCD(24) can be used to convert the data to BCD. If it is negative,
use the 2’s COMPLEMENT – NEG(––) instruction to convert the data to un-
signed
binary before executing BCD(24). Refer to page
29 for details on signed
binary data.
Flags ER: S is greater than 270F.
Indirectly
addressed DM word
is non-existent. (Content of
∗
DM word is
not BCD, or the DM area boundary has been exceeded.)
EQ: ON when the result is zero.
5-18-4 DOUBLE BINARY-TO-DOUBLE BCD – BCDL(59)
S: First source word (binary)
IR, SR, AR, DM, HR, TC, LR
R: First result word
IR, SR, AR, DM, HR, LR
Ladder Symbols Operand Data Areas
BCDL(59)
S
R
@BCDL(59)
S
R
Limitations If the content of S exceeds 05F5E0FF, the converted result would exceed
99999999
and BCDL(59) will not be executed. When the instruction is not
exe
-
cuted, the content of R and R+1 remain unchanged.
S and S+1 must be in the same data area as must R and R+1.
Description BCDL(59) converts the 32-bit binary content of S and S+1 into eight digits of
BCD data, and outputs the converted data to R and R+1.
S
+ 1
S
R + 1
R
BCD
Binary
Signed Binary Data BCD(24)
cannot be used to convert signed binary data directly to BCD. T
o con
-
vert
signed binary data, first determine whether the data
is positive or negative. If
it
is positive, BCD(24) can be used to convert the data to BCD. If it is negative,
use
the DOUBLE 2’
s COMPLEMENT – NEGL(––) instruction to convert the data
to unsigned binary before executing BCD(24). Refer to page 29 for details on
signed binary data.
Flags ER: Content of R and R+1 exceeds 99999999.
Indirectly
addressed DM word
is non-existent. (Content of
∗
DM word is
not BCD, or the DM area boundary has been exceeded.)
EQ: ON when the result is zero.
Data Conversion Section 5-18