Texas-instruments TMS320C3x Manuel d'utilisateur Page 115

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 757
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 114
Floating-Point Formats
5-10
Rewrite the mantissa as:
Mantissa
1
0
.
1 0 1 0 0 0 0 0 0 0 0
Step 3: Shift the decimal point of the mantissa according to the value of the
exponent.
If the exponent is positive, shift the binary point to the right by the value
of the exponent. If the exponent is negative, shift the binary point to
the left.
For example, if
e
= 2
10
and the
man
= 01.11000000000
2
, then the
shifted mantissa becomes 0111.000000000
2
, which is equivalent to
7 in decimal.
If, on the other hand,
e
= –2
10
and
man
= 01.10000000000
2
, then the
shifted mantissa becomes 0.0110000000000
2
, which is equivalent
to 3/8 in decimal.
The following examples illustrate how you can obtain the equivalent
floating-point value of a number in ‘C3x floating-point format. Each
of the examples uses the single-precision floating-point format.
Example 5–1. Positive Number
0 2 4 0 0 0 0 0 Hex value
0000 0010 0100 0000 0000 0000 0000 0000 Binary value
Exponent = 0000 0010
2
= 2
Sign = 0
Fraction = .10000
2
Value = 01.1
2
× 2
2
= 0110
2
. = 6
Fraction
Implied
Sign
Vue de la page 114
1 2 ... 110 111 112 113 114 115 116 117 118 119 120 ... 756 757

Commentaires sur ces manuels

Pas de commentaire