Analog Devices adsp-2100 Manual page 36

Adsp-2100 family programmable single-chip microprocessors
Table of Contents

Advertisement

2 Computational Units
Some format manipulation may be necessary to guarantee the validity of
the quotient. For example, if both operands are signed and fully fractional
(dividend in 1.31 format and divisor in 1.15 format) the result is fully
fractional (in 1.15 format) and therefore the dividend must be smaller than
the divisor for a valid result.
To divide two integers (dividend in 32.0 format and divisor in 16.0 format)
and produce an integer quotient (in 16.0 format), you must shift the
dividend one bit to the left (into 31.1 format) before dividing. Additional
discussion and code examples can be found in the handbook Digital Signal
Processing Applications Using the ADSP-2100 Family, Volume 1.
Dividend
Divisor
Quotient
Figure 2.5 Quotient Format
The algorithm overflows if the result cannot be represented in the format
of the quotient as calculated above or when the divisor is zero or less than
the dividend in magnitude.
2 – 12
BBBBB.BBBBBBBBBBBBBBBBBBBBBBBBBBB
NL bits
BB.BBBBBBBBBBBBBB
DL bits
BBBB.BBBBBBBBBBBB
(NL–DL+1) bits
NR bits
DR bits
(NR–DR–1) bits

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents