8: A
DVANCED
I
NSTRUCTIONS
R
EFERENCE
8-8
FC5A M
ICRO
S
MART
U
SER
’
S
M
ANUAL
FC9Y-B1268
Data Types for Advanced Instructions (Integer Type)
When using move, data comparison, binary arithmetic, Boolean computation, bit shift/rotate, data conversion, and coor-
dinate conversion instructions, data types can be selected from word (W), integer (I), double word (D), long (L), or float
(F). For other advanced instructions, the data is processed in units of 16-bit word.
Data Type
Symbol
Bits
Quantity of Data
Registers Used
Range of Decimal Values
Word (Unsigned 16 bits)
W
16 bits
1
0 to 65,535
Integer (Signed 15 bits)
I
16 bits
1
–32,768 to 32,767
Double Word (Unsigned 32 bits)
D
32 bits
2
0 to 4,294,967,295
Long (Signed 31 bits)
L
32 bits
2
–2,147,483,648 to 2,147,483,647
Float (Floating point)
F
32 bits
2
–3.402823
10
38
to 3.402823
10
38
Decimal Values and Hexadecimal Storage (Word, Integer, Double, and Long Data Types)
The following table shows hexadecimal equivalents which are stored in the CPU, as a result of addition and subtraction of
the decimal values shown:
Data Type
Result of Addition
Hexadecimal Storage
Result of Subtraction
Hexadecimal Storage
Word
0
65535
131071
0000
FFFF
(CY) FFFF
65535
0
–1
–65535
–65536
FFFF
0000
(BW) FFFF
(BW) 0001
(BW) 0000
Integer
65534
32768
32767
0
–1
–32767
–32768
–32769
–65535
(CY) 7FFE
(CY) 0000
7FFF
0000
FFFF
8001
8000
(CY) FFFF
(CY) 8001
65534
32768
32767
0
–1
–32767
–32768
–32769
–65535
(BW) 7FFE
(BW) 0000
7FFF
0000
FFFF
8001
8000
(BW) FFFF
(BW) 8001
Double Word
0
4294967295
8589934591
00000000
FFFFFFFF
(CY) FFFFFFFF
4294967295
0
–1
–4294967295
–4294967296
FFFFFFFF
00000000
(BW) FFFFFFFF
(BW) 00000001
(BW) 00000000
Long
4294967294
2147483648
2147483647
0
–1
–2147483647
–2147483648
–2147483649
–4294967295
(CY) 7FFFFFFE
(CY) 00000000
7FFFFFFF
00000000
FFFFFFFF
80000001
80000000
(CY) FFFFFFFF
(CY) 80000001
4294967294
2147483648
2147483647
0
–1
–2147483647
–2147483648
–2147483649
–4294967295
(BW) 7FFFFFFE
(BW) 00000000
7FFFFFFF
00000000
FFFFFFFF
80000001
80000000
(BW) FFFFFFFF
(BW) 80000001
Phone: 800.894.0412 - Fax: 888.723.4773 - Web: www.clrwtr.com - Email: [email protected]