2
-
48
CHAPTER2 SEQUENCE PROGRAMS
2
3
2.4 D
ata Used in Sequence Progr
ams
2.4.4 R
eal
number (
F
loating-point data)
2.4.4 Real number (Floating-point data)
There are two types of real number data: single-precision floating-point data and double-precision
floating-point data.
(1) Single-precision floating-point data
(a) Internal representation
Internal representation of real numbers used in the CPU module is given below.
Real number data can be represented as follows, using two word devices.
[Sign] 1. [Mantissa]
2
[Exponent]
The bit configuration and the meaning of each bit are described below
1) Sign
The most significant bit, b31, is the sign bit.
he most significant bit, b31, is the sign bit.
0: Positive
1: Negative
2) Exponent
The 8 bits, b23 to b30, represent the excess n of 2
n
.
The following shows the excess n according to the binary values in b23 to b30.
3) Mantissa
Each of the 23 bits, b0 to b22, represents the "XXXXXX..." portion when the data is represented in binary,
"1.XXXXXX...".
Figure 2.47 Bit configuration of real number data
Figure 2.48 Relation between the exponent and excess n
b31
b30
to
b23
b22
to
b16
b15
to
b0
b31
b22 to b0
Mantissa (23 bits)
b30 to b23
Exponent (8 bits)
Sign
b23 to b30
n
FF
H
Not used
FE
H
127
FD
H
126
00
H
Not used
02
H
-125
01
H
-126
81
H
2
80
H
1
7F
H
0
7E
H
-1
Содержание 00JCPU
Страница 1: ......
Страница 2: ......
Страница 96: ...2 51 2 4 5 Character string data 1 Definition The CPU module uses shift JIS code character strings...
Страница 541: ......
Страница 542: ......