15.01.2013 Views

U. Glaeser

U. Glaeser

U. Glaeser

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

FIGURE 9.18 Floating-point addition.<br />

Floating-Point Multiplication<br />

The algorithm for floating-point multiplication forms the product of the operand significands and the<br />

sum of the operand exponents. For radix 2 floating point numbers, the significand values are greater<br />

than or equal to 1 and less than 2. The product of two such numbers will be greater than or equal to 1<br />

and less than 4. At most a single right shift is required to normalize the product.<br />

Floating-Point Division<br />

The algorithm for floating-point division forms the quotient of the operand significands and the difference<br />

of the operand exponents. The quotient of two normalized significands will be greater than or equal<br />

to .5 and less than 2. At most a single left shift is required to normalize the quotient.<br />

Floating-Point Rounding<br />

All floating-point algorithms may require rounding to produce a result in the correct format. A variety<br />

of alternative rounding schemes have been developed for specific applications. Round to nearest, round<br />

toward ∞, round toward −∞, and round toward ZERO are required for implementations of the IEEE<br />

floating point standard. Selection should be based on both static and dynamic performance [24], although<br />

round to nearest is appropriate for most applications.<br />

Conclusions<br />

This chapter section has presented an overview of the two’s complement number system, algorithms for the<br />

basic integer arithmetic operations of addition, subtraction, multiplication, and division, and a brief discussion<br />

of floating point operations. When implementing arithmetic units there is often an opportunity<br />

to optimize the performance and the complexity to the requirements of the specific application. In general,<br />

© 2002 by CRC Press LLC<br />

3. S a = S a 2 (E a - E b)<br />

E s = E b<br />

S = ZERO<br />

11. S s = 2S s<br />

E s = E s -1<br />

UNDERFLOW<br />

LT<br />

EQ<br />

LT<br />

LE<br />

1.<br />

E a : E b<br />

EQ<br />

2. E s = E a<br />

5. S s = S a + S b<br />

6.<br />

S s : 2<br />

LT<br />

9.<br />

S s : 0<br />

NE<br />

10.<br />

S s : 1<br />

GE<br />

12.<br />

E s : -127<br />

GT<br />

GE<br />

GT<br />

4. S b = S b 2 (E b - E a)<br />

E s = E a<br />

7. S s = S s /2<br />

E s = E s +1<br />

8.<br />

E s : 128<br />

LT<br />

S = A + B<br />

GE<br />

OVERFLOW

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!