Mitsubishi Electronics QnUCPU Home Theater Server User Manual


 
CHAPTER2 SEQUENCE PROGRAMS
1
2
3
4
5
6
7
8
2.4 Data Used in Sequence Programs
2.4.4 Real number (Floating-point data)
2 - 39
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.
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.38 Bit configuration of real number data
Figure 2.39 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
FEH
127
FD
H
126
00
H
Not used
02H
-125
01
H
-126
81
H
2
80
H
1
7F
H
0
7E
H
-1