Texas-instruments TMS320C3x Instrukcja Użytkownika Strona 139

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 757
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 138
Floating-Point Addition and Subtraction
5-34
The following examples describe the floating-point addition and subtraction
operations. It is assumed that the data is in the extended-precision floating-
point format.
Example 5–13. Floating-Point Addition
In the case of two normalized numbers to be summed, let
α = 1.5 = 01.1000000000000000000000000000000 × 2
0
b
= 0.5 = 01.0000000000000000000000000000000 × 2
–1
It is necessary to shift b to the right by 1 so that α and
b
have the same exponent.
This yields:
b
= 0.5 = 00.1000000000000000000000000000000 × 2
0
Then:
01.10000000000000000000000000000000 × 2
+00.10000000000000000000000000000000 × 2
0
010.00000000000000000000000000000000 × 2
0
As in the case of multiplication, it is necessary to shift the binary point one place
to the left and add 1 to the exponent. This yields:
01.1000000000000000000000000000000 × 2
0
± 00.1000000000000000000000000000000 × 2
0
01.0000000000000000000000000000000 × 2
1
Przeglądanie stron 138
1 2 ... 134 135 136 137 138 139 140 141 142 143 144 ... 756 757

Komentarze do niniejszej Instrukcji

Brak uwag