![Omron CJ1G-CPUxx Instructions Manual Download Page 272](http://html1.mh-extra.com/html/omron/cj1g-cpuxx/cj1g-cpuxx_instructions-manual_742491272.webp)
251
Comparison Instructions
Section 3-7
Note In CS1 and CJ1 CPU Units, these Flags are turned OFF.
In CS1-H, CJ1-H, CJ1M, and CS1D CPU Units, these Flags are left
unchanged.
Precautions
Input comparison instructions cannot be used as right-hand instructions, i.e.,
another instruction must be used between them and the right bus bar.
Examples
AND LESS THAN: AND<(310)
When CIO 000000 is ON in the following example, the contents of D00100
and D00200 are compared in as unsigned binary data. If the content of
D00100 is less than that of D00200, CIO 005000 is turned ON and execution
proceeds to the next line. If the content of D00100 is not less than that of
D00200, the remainder of the instruction line is skipped and execution moves
to the next instruction line.
AND SIGNED LESS THAN: AND<S(312)
When CIO 000001 is ON in the following example, the contents of D00110
and D00210 are compared as signed binary data. If the content of D00110 is
less than that of D00210, CIO 005001 is turned ON and execution proceeds
to the next line. If the content of D00110 is not less than that of D00210, the
remainder of the instruction line is skipped and execution moves to the next
instruction line.
Less Than or
Equal Flag
< =
ON if S
1
≤
S
2
with one-word data.
ON if S
1
+1, S
1
≤
S
2
+1, S
2
with double-length data.
OFF in all other cases.
Negative Flag
N
OFF or unchanged (See note.)
Name
Label
Operation
<
<S
000000
000001
005000
005001
8714
S
1
: D00100
Decimal: 34,580
3A1C
S
2
: D00200
Decimal: 14,876
34,580 > 14,876
(Will not proceed to next line.)
Unsigned
LESS THAN
Comparison
Signed
LESS THAN
Comparison
8714
S
1
: D00110
Decimal:
−
30,956
3A1C
S
2
: D00210
Decimal: 14,876
−
30,956 < 14,876
(Will proceed to next line.)
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 ...