3. INSTRUCTION STRUCTURE
3
−
6
MELSEC-A
3.3 Handling of Numeric Values
In the A series, there are instructions which handle numeric values in 16 bits and 32
bits.
The highest bits of 16 bits and 32 bits are used for the judgement of positive and
negative. Therefore, numeric values handed by 16 bits and 32 bits are as follows:
POINTS
(1) Numeric value setting procedure
(a) Decimal
(b) Hexadecimal
(2) When FFFEH is divided by 2, the following occurs.
16 bits: -32768 to 32767
32 bits: -2147483648 to 2147483647
10 is stored D10 in BIN value.
-10 is stored to D10 in BIN value.
10 is stored to D10 in hexadecimal.
32-bit instruction
Since FFFE is 65534, 65534/2=32767
(7FFF) is stored to D0.
X010
X010
X010
MOV
K
10
D10
MOV
K-
10
D10
MOV
H
0010
D10
16-bit instruction
Since FFFE is -2,-2/2=-1 (FFFFH)
is stored to D0.
X010
D/
P H
0000FFFE
D0
K
2
X010
P
H
K
/ FFFE
2
D0
Summary of Contents for MELSEC-A series
Page 1: ......
Page 2: ......
Page 13: ...A 11 MEMO...
Page 505: ...APPENDICES APP 100 MELSEC A MEMO...
Page 507: ......
Page 508: ......