BIN Conversion
BIN, BINP, DBIN, DBINP
BIN instruction converts a BCD value to a Binary data and save the result in Destination (assigned device address).
| |
S | Source (BCD value) |
D | Destination (Binary data) |
Instruction | Device address | No. of Steps | Flag | |||||||||||||||
M | X | Y | K | L | F | T | C | S | Z | D | @D | Int. |
| Error | Zero | Carry | ||
BIN(P) | S | o | o | o | o | o | o | o | o | - | o | o | o | o | 3 | o | - | - |
D | o | - | o | o | o | - | o | o | - | o | o | o | - | |||||
DBIN(P) | S | o | o | o | o | o | o | o | o | - | o | o | o | o | 3 | |||
D | o | - | o | o | o | - | o | o | - | o | o | o | - |
Error(F110) : If BCD Data is out of range, Error Flag(F110) will be set.
Instruction | Binary Data range | |
BIN BINP | 16bit | 0 ~ H270F 0 ~ 9999 |
DBIN DBINP | 32bit | 0 ~ H05F5E0FF 0 ~ 99999999 |
Example)
If X01 is ON, convert BCD value D1(H2709) to Binary value(H0A95) and save it to D10