214
Comparison Instructions Section 3-6
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 0.00 is ON in the following example, the contents of D100 and
D200 are compared in as unsigned binary data. If the content of D100 is less
than that of D200, CIO 100.00 is turned ON and execution proceeds to the
next line. If the content of D100 is not less than that of D200, 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 0.01 is ON in the following example, the contents of D110 and
D210 are compared as signed binary data. If the content of D110 is less than
that of D210, CIO 100.01 is turned ON and execution proceeds to the next
line. If the content of D110 is not less than that of D210, the remainder of the
instruction line is skipped and execution moves to the next instruction line.
Not 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.
Less Than 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.
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.
Name Label Operation
100.00
100.01
0.00
0.01
<
<S
34,580 > 14,876
S
2
: D200S
1
: D100
8714 3A1C
D100
D200
D110
D210
Unsigned
LESS THAN
Comparison
Decimal: 34,580 Decimal: 14,876
(Will not proceed to next line.)
8714
S
1
: D110
−30,956
3A1C
S
2
: D210
14,876
−30,956 < 14,876
0.00
0.01
D100
D200
D110
D210
100.00
100.01
Decimal: Decimal:
Signed
LESS THAN
Comparison
(Will proceed to next line.)