Panasonic FP7 Series Command Reference Manual page 100

Cpu unit
Hide thumbs Also See for FP7 Series:
Table of Contents

Advertisement

2.9 Range of data that can be handled in the PLC
Representation of decimals in the PLC
● Decimals are processed as either 16-bit or 32-bit binary data.
● Signed data is processed as follows:
1. If the highest-order bit is a sign bit and a positive number, the value is "0", or if it is
negative, the value is "1".
2. For positive numbers, the digits aside from the highest-order digit describe the size of the
data in bits.
<Example> Representation of the decimal "1868"
3. For negative numbers, 2's complement is used. 2's complement is binary data in which 0
and 1 are inverted in the binary data for the positive number, and then 1 is added to the
binary data.
<Example> Representation of the decimal "-4"
2-48
0
0
0
0
0
1
The other bits indicate the data size.
1,024 + 512 + 256 + 64 + 8 + 4 = 1868
The highest digit bit is '0', representing a positive figure.
0
0
0
0
0
0
1
1
1
1
1
1
1
1
1
1
1
1
The highest digit bit becomes '1'.
1
1
0
1
0
0
0
0
0
0
0
0
Invert 0 and 1
1
1
1
1
1
1
Add 1
1
1
1
1
1
1
1
1
0
0
Decimal
0
1
0
0
BIN represetation
of a decimal '4'
1
0
1
1
Decimal
1
1
0
0
BIN represetation
of a decimal '-4'
WUME-FP7CPUPGR-12

Advertisement

Table of Contents
loading

Table of Contents