beautypg.com

Texas Instruments TMS320C3x User Manual

Page 139

background image

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