Derive Block Exponent - Analog Devices adsp-2100 Manual

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

Advertisement

2.4.2.2 Derive Block Exponent

This function detects the exponent of the number largest in magnitude in
an array of numbers. The EXPADJ instruction performs this function. The
sequence of steps for a typical example is shown below.
A. Load SB with –16
The SB register is used to contain the exponent for the entire block. The
possible values at the conclusion of a series of EXPADJ operations range
from –15 to 0. The exponent compare logic updates the SB register if the
new value is greater than the current value. Loading the register with –16
initializes it to a value certain to be less than any actual exponents
detected.
B. Process the first array element:
Array(1) =
11110101 10110001
Exponent = –3
– 3 > SB (–16)
SB gets
–3
C. Process next array element:
Array(2)=
00000001 01110110
Exponent = –6
–6 < –3
SB remains
–3
D. Continue processing array elements.
When and if an array element is found whose exponent is greater than SB,
that value is loaded into SB. When all array elements have been processed,
the SB register contains the exponent of the largest number in the entire
block. No normalization is performed. EXPADJ is purely an inspection
operation. The value in SB could be transferred to SE and used to
normalize the block on the next pass through the shifter. Or it could be
simply associated with that data for subsequent interpretation.
Computational Units
2
2 – 29

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents