Floating Point As Per Ieee Standard - Algodue ELETTRONICA UPM309 Manual Del Usuario

Tabla de contenido

Publicidad

Idiomas disponibles

Idiomas disponibles

2.3 FLOATING POINT AS PER IEEE STANDARD

The basic format allows a IEEE standard floating-point number to be represented in a single 32 bit format, as
shown below:
where S is the sign bit, e' is the first part of the exponent and f is the decimal fraction placed next to 1. Internally
the exponent is 8 bits in length and the stored fraction is 23 bits long.
A round to nearest method is applied to the calculated value of floating point.
The floating-point format is shown as follows:
where:
Sign
Exponent
Fraction
Total
Exponent
Min e'
Max e'
Bias
NOTE. Fractions (decimals) are always shown while the leading 1 (hidden bit) is not stored.
EXAMPLE OF CONVERSION OF VALUE SHOWN WITH FLOATING POINT
Value read with floating point:
45AACC00(
)
16
Value converted in binary format:
010001011 01010101100110000000000 (
exponent
sign
sign = 0
exponent = 10001011(
2
fraction = 01010101100110000000000(
= 2804736 (
N.n = (-1)
2
(1+f ) =
S
e'-127
= (-1)
2
(1.334350585) =
0
139-127
= (+1) (4096) (1.334350585) =
= 5465.5
58
N.n = (-1)
======================
| S | e + 127 |
======================
31
30
bit length
1
8
23 + (1)
m = 32 + (1)
0
255
127
)
2
fraction
) = 139(
)
10
) / 8388608 (
2
) / 8388608 (
) = 0.334350585 (
10
10
2
(1.f )
S
e'-127
f
|
23 22
0 <—
bit number
) =
10
)
10
MODBUS RTU/ASCII, TCP

Publicidad

Capítulos

Tabla de contenido
loading

Tabla de contenido