![Omron CJ1G-CPUxx Instructions Manual Download Page 420](http://html1.mh-extra.com/html/omron/cj1g-cpuxx/cj1g-cpuxx_instructions-manual_742491420.webp)
399
Symbol Math Instructions
Section 3-11
Description
–B(414) subtracts the BCD values in Su from Mi and outputs the result to R. If
the result of the subtraction is negative, the result is output as a 10’s comple-
ment.
Flags
Precautions
If Mi and/or Su are not BCD, an error is generated and the Error Flag will turn
ON.
If as a result of the subtraction, the content of R is 0000 hex, the Equals Flag
will turn ON.
If an addition results in a borrow, the Carry Flag will turn ON.
Examples
When CIO 000000 is ON in the following example, D00110 is subtracted from
D00100 as 4-digit BCD values, and the result will be output to D00120.
3-11-14 DOUBLE BCD SUBTRACT WITHOUT CARRY: –BL(415)
Purpose
Subtracts 8-digit (double-word) BCD data and/or constants.
Ladder Symbol
Variations
Mi
Su
R
CY
–
(BCD)
(BCD)
(BCD)
CY will turn
ON when there
is a borrow.
Name
Label
Operation
Error Flag
ER
ON when Mi is not BCD.
ON when Su is not BCD.
OFF in all other cases.
Equals Flag
=
ON when the result is 0.
OFF in all other cases.
Carry Flag
CY
ON when the subtraction results in a borrow.
OFF in all other cases.
Mi: 1st minuend word
Su: 1st subtrahend word
R: 1st result word
–BL(415)
Mi
Su
R
Variations
Executed Each Cycle for ON Condition
–BL(415)
Executed Once for Upward Differentiation
@–BL(415)
Executed Once for Downward Differentiation Not supported.
Immediate Refreshing Specification
Not supported.
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 ...