Texas Instruments TMS320C2XX Calculator User Manual


 
NORM
Normalize Contents of Accumulator
7-128
Example 3 15-Bit Normalization:
MAR *,AR1 ;Use AR1 to store the exponent.
LAR AR1,#0Fh ;Initialize exponent counter.
RPT #14 ;15-bit normalization specified (yielding
;a 4-bit exponent and 16-bit mantissa).
NORM *– ;NORM automatically stops shifting when first
;significant magnitude bit is found,
;performing NOPs for the remainder of the
;repeat loops.
The method used in Example 2 normalizes a 32-bit number and yields a 5-bit
exponent magnitude. The method used in Example 3 normalizes a 16-bit num-
ber and yields a 4-bit magnitude. If the number requires only a small amount
of normalization, the Example 2 method may be preferable to the Example 3
method because the loop in Example 2 runs only until normalization is com-
plete. Example 3 always executes all 15 cycles of the repeat loop. Specifically,
Example 2 is more efficient if the number requires three or fewer shifts. If the
number requires six or more shifts, Example 3 is more efficient.