15.01.2013 Views

U. Glaeser

U. Glaeser

U. Glaeser

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

FIGURE 9.1 Relationship between an infinitely precise number, A, and its representation by a truncated four-bit<br />

two’s complement fraction T(<br />

A).<br />

As can be seen from the figure, truncation never increases the value of the number. The truncated numbers<br />

have values that are either unchanged or shifted toward negative infinity. If a large number of numbers<br />

are truncated, on the average there is a downward shift of one-half the value of a least significant bit<br />

(LSB). Summing many truncated numbers (which may occur in scientific, matrix, and signal processing<br />

applications) can cause a significant accumulated error.<br />

Fixed-Point Arithmetic Algorithms<br />

This subsection presents a reasonable assortment of typical fixed point algorithms for addition, subtraction,<br />

multiplication, and division.<br />

Fixed-Point Addition<br />

Addition is performed by summing the corresponding bits of the two n-bit<br />

numbers, including the sign<br />

bit. Subtraction is performed by summing the corresponding bits of the minuend and the two’s complement<br />

of the subtrahend. Overflow is detected in a two’s complement adder by comparing the carry<br />

signals into and out of the most significant adder stage (i.e., the stage which computes the sign bit). If<br />

the carries differ, the arithmetic has overflowed and the result is invalid.<br />

Full Adder<br />

The full adder is the fundamental building block of most arithmetic circuits. Its operation is defined by<br />

the truth table shown in Table 9.2. The sum and carry outputs are described by the following equations:<br />

© 2002 by CRC Press LLC<br />

T(A)<br />

1<br />

.75<br />

.5<br />

.25<br />

0<br />

-1 -.75 -.5 -.25 0 .25 .5 .75 1<br />

A<br />

-.25<br />

-.5<br />

-.75<br />

-1<br />

sk = akbkck + akb kck + akbkc k + akb kck ck+1 = akb kck + akbkc k + akb kck + akb kck =<br />

akb k + akc k + bkc k<br />

(9.2)<br />

(9.3)

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

Saved successfully!

Ooh no, something went wrong!