Handling Of Numeric Values - Mitsubishi MELSEC-A Series Programming Manual

Type acpu/qcpu-a (a mode)
Hide thumbs Also See for MELSEC-A Series:
Table of Contents

Advertisement

3. INSTRUCTION STRUCTURE

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:
16 bits:
-32768 to 32767
32 bits:
-2147483648 to 2147483647
POINTS
(1) Numeric value setting procedure
(a) Decimal
X010
X010
(b) Hexadecimal
X010
(2) When FFFEH is divided by 2, the following occurs.
16-bit instruction
X010
P H
/
32-bit instruction
X010
P H
D/
0000FFFE
K
10
D10
MOV
K-
D10
10
MOV
H
D10
MOV
0010
K
FFFE
2
D0
K
2
D0
3 − 6
MELSEC-A
10 is stored D10 in BIN value.
-10 is stored to D10 in BIN value.
10 is stored to D10 in hexadecimal.
Since FFFE is -2,-2/2=-1 (FFFFH)
is stored to D0.
Since FFFE is 65534, 65534/2=32767
(7FFF) is stored to D0.

Advertisement

Table of Contents
loading

This manual is also suitable for:

Acpu-common-p-e13j741AcpuQcpu-a

Table of Contents