/
SUB (BINARY)
SUB (BINARY)
SUB, SUBP, DSUB, DSUBP (Binary)
SUB instruction subtracts S2 from S1 and save the result in the Destination (assigned device address).
| |
S1, S2 | Source |
D | Destination |
Instruction | Device address | No. of Steps | Flag | |||||||||||||||
M | X | Y | K | L | F | T | C | S | Z | D | @D | Int. |
| Error | Zero | Carry | ||
SUB(P) DSUB(P) | S1 | o | o | o | o | o | o | o | o | - | o | o | o | o | 4 | o | - | - |
S2 | o | o | o | o | o | o | o | o | - | o | o | o | o | |||||
D | o | - | o | o | o | - | o | o | - | o | o | o | - |
Example)
If X01 is ON, subtract D2 from D1 and then send the result to M20.
, multiple selections available,
Related content
ADD (BINARY)
ADD (BINARY)
More like this
SUB (FLOAT)
SUB (FLOAT)
More like this
MUL (BINARY)
MUL (BINARY)
More like this
SUB (BCD)
SUB (BCD)
More like this
DIV (BINARY)
DIV (BINARY)
More like this
WDIV (BINARY)
WDIV (BINARY)
More like this