3. Instructions
Example Programming
0.00
0.00
If the result of the subtraction is a negative number (Mi<Su or Mi+1, Mi <Su+1, Su), the result is output
as a 2's complement. The Carry Flag (CY) will turn ON. To convert the 2's complement to the true
number, a program which subtracts the result from 0 is necessary, as an input condition of the Carry
Flag (CY). The Carry Flag turning ON thus indicates that the result of the subtraction is negative.
364
When CIO 0.00 is ON in the following example, D110 and CY will be
–C
subtracted from D100 as 4-digit signed binary values and the result will
D100
be output to D120.
D110
D120
When CIO 0.00 is ON in the following example, D111, D110 and CY will be
–CL
subtracted from D101 and D100 as 8-digit signed binary values, and the
D100
result will be output to D121 and D120.
D110
D120
CS/CJ/NSJ Series Instructions Reference Manual (W474)
Need help?
Do you have a question about the CJ - INSTRUCTIONS and is the answer not in the manual?
Questions and answers