104
The following table shows the correspondence between the symbol math
instructions and the existing BCD and binary calculation instructions.
Existing instructions Version-2 instructions
BCD ADD ADD(070) +BC (406)
BCD SUBTRACT SUB(071) –BC(416)
BCD MULTIPLY MUL(072)
*B(424)
BCD DIVIDE DIV(073) /B(434)
DOUBLE BCD ADD ADDL(074) +BCL (407)
DOUBLE BCD SUBTRACT SUBL(075) –BCL(417)
DOUBLE BCD MULTIPLY MULL(076)
*BL(425)
DOUBLE BCD DIVIDE DIVL(077) /BL(435)
BINARY ADD ADB(080) +C (402)
BINARY SUBTRACT SBB(081) –C(412)
BINARY MULTIPLY MLB(082)
*U(422)
BINARY DIVIDE DVB(083) /U(432)
DOUBLE BINARY ADD ADBL(084) +CL (403)
DOUBLE BINARY
SUBTRACT
SBBL(085) –CL(413)
DOUBLE BINARY MULTIPLY MLBL(086)
*UL(423)
DOUBLE BINARY DIVIDE DVBL(087) /UL(433)
There are two ways to input symbol math instructions. The first is to input the
symbol directly and the second is to input the function code.
Direct Symbol Input
Direct string inputs are possible using the SYSMAC Support Software. Input the
symbol and the options in order. For example, “+BL(405)” can be entered by
simply inputting “+BL.”
Function Code Input
Function codes can be input using the SYSMAC Support Software or the
CVM1-PRS21-EV1 Programming Console. Simply input the instruction’s func-
tion code.
4-13 Data Formats
The following data formats can be handled by the various calculation and con-
version instructions.
• Unsigned binary
• Signed binary
• Unsigned BCD
• Signed BCD
• Floating-point
4-13-1 Unsigned Binary Data
Data is configured in words, with 16 bits per word. This data is regarded as 16-bit
binary data. Unsigned binary data is often written as four-digit hexadecimal
(0000 to FFFF).
Bit 15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00
2
15
2
14
2
13
2
12
2
11
2
10
2
9
2
8
2
7
2
6
2
5
2
4
2
3
2
2
2
1
2
0
↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓
2
3
2
2
2
1
2
0
2
3
2
2
2
1
2
0
2
3
2
2
2
1
2
0
2
3
2
2
2
1
2
0
Digit 16
3
16
2
16
1
16
0
Correspondence with
Existing Instructions
Instruction Input Methods
Data Formats Section 4-13