2 Computational Units
2 – 12
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
BBBBB.BBBBBBBBBBBBBBBBBBBBBBBBBBB
NL bits
NR bits
Divisor
BB.BBBBBBBBBBBBBB
DL bits
DR bits
Quotient
BBBB.BBBBBBBBBBBB
(NL–DL+1) bits
(NR–DR–1) bits
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.