![Omron CJ1G-CPUxx Instructions Manual Download Page 494](http://html1.mh-extra.com/html/omron/cj1g-cpuxx/cj1g-cpuxx_instructions-manual_742491494.webp)
473
Conversion Instructions
Section 3-12
C = 0003 (Output Data Range: –1999 9999 to 9999 9999 BCD)
The following table shows the possible double signed binary values for each
signed BCD format. An error will occur if the source data is not within the
allowed range for the specified signed BCD format.
Flags
Example
When CIO 000000 is ON in the following example, the double signed binary
data in D00101 and D00100 are checked against the format specified in the
control word (0003). The source data is correct, so the double signed binary
data in D00101 and D00100 is converted to double signed BCD and output to
D00201 and D00200.
Setting
Signed binary values
Signed BCD values
C=0000 FF67 6981 to FFFF FFFF
–999 9999 to –1
0000 0000 to 0098 967F
0 to 999 9999
C=0001 FB3B 4C01 to FFFF FFFF
–7999 9999 to –1
0000 0000 to 04C4 B3FF
0 to 7999 9999
C=0002 FF67 6981 to FFFF FFFF
–999 9999 to –1
0000 0000 to 05F5 E0FF
0 to 9999 9999
C=0003 FECE D301 to FFFF FFFF
–1999 9999 to –1
0000 0000 to 05F5 E0FF
0 to 9999 9999
7 digits BCD, 28 bits
S+1
S
0 to 9: Eighth digit BCD
A: Negative (–1)
F: Negative (–)
Name
Label
Operation
Error Flag
ER
ON if C is not within the specified range of 0000 to 0003.
ON if C=0000 and the source data is not within the range:
FF67 6981 to FFFF FFFF or 0000 0000 to 0098 967F.
ON if C=0001 and the source data is not within the range:
FB3B 4C01 to FFFF FFFF or 0000 0000 to 04C4 B3FF.
ON if C=0002 and the source data is not within the range:
FF67 6981 to FFFF FFFF or 0000 0000 to 05F5 E0FF.
ON if C=0003 and the source data is not within the range:
FECE D301 to FFFF FFFF or 0000 0000 to 05F5 E0FF.
OFF in all other cases.
Equals Flag
=
ON if D is 0000 after execution.
OFF in all other cases.
Negative Flag
N
ON if C=0000 or 0001 and the result’s sign bit is ON after
execution.
ON if C=0002 and the leftmost digit of the result is F.
ON if C=0003 and the leftmost digit of the result is A or F.
OFF in all other cases.
Double signed binary data
S+1: D00101
F F 8 B
Double signed BCD data
(–7,654,321)
D+1: D00201
F 7 6 5
S: D00100
3 4 4 F
D: D00200
4 3 2 1
Summary of Contents for CJ1G-CPUxx
Page 3: ...iv N o t i c e ...
Page 5: ...vi ...
Page 21: ...xxii Conformance to EC Directives 6 ...
Page 35: ......
Page 1131: ...1110 CJ series Instruction Execution Times and Number of Steps Section 4 2 ...