DATA REPRESENTATION AND ROUNDING

Table 3-1 Limited Data Values

 

 

 

 

 

 

 

 

 

Destination

Source

Accumulator

Limited Value (Hexadecimal)

Type of

 

 

Memory Reference

Operand

Sign

XDB

YDB

Access

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

X

X:A

+

7FFFFF

One 24 bit

 

 

X:B

-

800000

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Y

Y:A

+

7FFFFF

One 24 bit

 

 

Y:B

-

800000

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

X:A Y:A

+

7FFFFF

7FFFFF

 

 

 

 

X:A Y:B

-

800000

800000

 

 

 

X and Y

X:B Y:A

+

7FFFFF

7FFFFF

Two 24 bit

 

 

X:B Y:B

-

800000

800000

 

 

 

 

 

 

 

L:AB

+

7FFFFF

7FFFFF

 

 

 

 

L:BA

-

800000

800000

 

 

 

 

 

 

 

 

 

 

 

L (X:Y)

L:A

+

7FFFFF

FFFFFF

One 48 bit

 

 

L:B

-

800000

000000

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

7 shows the bit weighting of words, long words, and accumulator operands for this repre- sentation. The decimal points are all aligned and are left justified.

Data must be converted to a fractional number by scaling before being used by the DSP or the user will have to be very careful in how the DSP manipulates the data. Moving $3F to a 24-bit Data ALU register does not result in the contents being $00003F as might be expected. Assuming numbers are fractional, the DSP left justifies rather than right justi- fies. As a result, storing $3F in a 24-bit register results in the contents being $3F0000. The simplest example of scaling is to convert all integer numbers to fractional numbers by shifting the decimal 24 places to the left (see Figure 3-6). Thus, the data has not changed; only the position of the decimal has moved.

S3F.

S. 3F

S = SIGN BIT

3F = HEXADECIMAL DATA TO BE CONVERTED

Figure 3-6 Integer-to-Fractional Data Conversion

For words and long words, the most negative number that can be represented is -1 whose internal representation is $800000 and $800000000000, respectively. The most positive word is $7FFFFF or 1 - 2-23and the most positive long word is $7FFFFFFFFFFF

MOTOROLA

DATA ARITHMETIC LOGIC UNIT

3 - 11

Page 44
Image 44
Motorola DSP56000, 24-Bit Digital Signal Processor manual Limited Data Values, Integer-to-Fractional Data Conversion