352
Symbol Math Instructions Section 3-10
Description –(400) subtracts the binary values in Su from Mi and outputs the result to R.
When the result is negative, it is output to R as a 2’s complement. (Refer to 3-
10-10 DOUBLE SIGNED BINARY SUBTRACT WITHOUT CARRY: –L(411)
for an example of handling 2’s complements.)
Flags
Precautions When –(410) is executed, the Error Flag will turn OFF.
If as a result of the subtraction, the content of R is 0000 hex, the Equals Flag
will turn ON.
If the subtraction results in a borrow, the Carry Flag will turn ON.
If the result of subtracting a negative number from a positive number is nega-
tive (in the range 8000 to FFFF hex), the Overflow Flag will turn ON.
If the result of subtracting a positive number from a negative number is posi-
tive (in the range 0000 to 7FFF hex), the Underflow Flag will turn ON.
If as a result of the subtraction, the content of the leftmost bit of R is 1, the
Negative Flag will turn ON.
Examples When CIO 0.00 is ON in the following example, D200 will be subtracted from
D100 as 4-digit signed binary values and the result will be output to D300.
RCY
−
Mi
Su
(Signed binary)
(Signed binary)
(Signed binary)
CY will turn ON
when there is a
borrow.
Name Label Operation
Error Flag ER OFF
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.
Overflow Flag OF ON when the result of subtracting a negative number from
a positive number is in the range 8000 to FFFF hex.
OFF in all other cases.
Underflow Flag UF ON when the result of subtracting a negative number from
a positive number is in the range 0000 to 7FFF hex.
OFF in all other cases.
Negative Flag N ON when the leftmost bit of the result is 1.
OFF in all other cases.
−
0.00
D100
D200
D300