You are on page 1of 35

Number formats and Representations in DSP processors

A Lecture Presentation by B.V.KALYAN RAM

Fixed point versus Floating Point DSPs

Fixed Point and Floating point DSP processors

Fixed point DSP processors


In fixed point DSP processors , Numbers are represented either as integers(Integer Arithmetic) or as fractional Arithmetic -1.0 and +1.0. For a fixed point format , we define the maximum available Precision to be equal to the number of bits in the format.
Maximum precision (in bits)=log2 (l max. value l/lmaximum quantization errorl)

Integer format in DSP processors

Examples of Integer Formats

Fractional formats

Examples

Floating Point Representation


In floating point DSP processors numbers are represented as mantissa and an exponent. The mantissa is usually a signed fractional value with a single implied integer bit. The exponent is an integer that represents the number of places must be shifted right or left to obtain the original number represented. value=mantissa x 2 power of exponent

Floating point vs fixed point DSP processors


Floating point arithmetic is more flexible than fixed point. System designers have access to wider dynamic range and in many cases better precision.

Fixed vs Floating Point DSP processors

Comparision

TMS320 Family

Floating point format

Conversion Equations and special case

Floating point representation

Example

Special case

Floating point numbers

Floating point Numbers

More on Floating point

Dynamic range
The dynamic range of a signal is the ratio of the maximum value to the minimum value that the signal can take in the given number representation scheme. The dynamic range of a signal is proportional to the number of bits used to represent it and increases by 6dB for every additional bit used for the representation.

Precision
The number of bits used to represent a signal also determines the resolution or the precision with which the signal can be represented. Resolution is the minimum value that can be represented using a number representation format.For instance, if N bits are used to represent a number from 0 to 1 , the smallest value it can take is the resolution and is given as Resolution =1/2^N for large N

Dynamic Range

Block floating point format


An approach to increase the range and precision of the fixed point format is to use the block floating point format. In this approach a group or block of fixedpoint numbers are represented as though they were floating-point numbers with the same exponent value and different mantissa values. Mantissas are stored and handled similar to fixed point numbers.

Example

Example

Example
Example: The following 12-bit binary fractions are to be stored in an 8-bit memory. Show how they can be represented in block floating point format as to improve accuracy. 000001110011 000011110000 000000111111 000010101010

Solution
If these fractions are represented using an 8bit fixed-point format, they will be represented as 00000111 00001111 00000011 00001010

Solution
The last 4 bits of the numbers would have been discarded, thereby losing the precision corresponding to those 4 bits. 01110011 x 2^-4 11110000 x 2^-4 00111111 x 2^-4 10101010 x 2^-4

Double precision Fixed point Format


To increase the range of numbers that can be represented in fixed-point format, one obvious approach is to increase its size. If the size is doubled , the range of numbers increases substantially. Simply doubling the size and still using the fixed point format creates what is known as double-precision fixed point format.

Problems
Example: Calculate the dynamic range and precision of each of the following number representation formats. a. 24-bit, single precision, fixed-point format b.48-bit, double precision, fixed point format c. A floating point format with a 16-bit mantissa and an 8-bit exponent.

Solution
a. Since each bit gives a dynamic range of 6dB, the total dynamic range is 24 x 6 =144dB. Percentage resolution is (1/2^24) x100 = 6 x 10^-6 b. Since each bit gives a dynamic range of 6dB , the total dynamic range is 48 x6 =288dB. Percentage resolution is (1/2^48) x 100 =4 x 10 ^-13.

Solution
C. For floating point representation , the dynamic range is determined by the number of bits in the exponent . Since there are 8 exponent bits, the dynamic range is (2^8-1) x 6=255 x 6 =1530 dB. The percentage resolution depends upon the number of bits in the mantissa. Since there are 16 bits in the mantissa, the resolution is (1/2^16) x 100 =1.5 x 10 ^ -3 %

Dynamic range and precision for various Number Representations


Format of representation Fixed-point Double-Precision Floating-point Number of bits used 24 bits 48 bits 24 bits (16-bit mantissa, 8-bit exponent) Dynamic range Percentage Resolution (Precision) 6 x 10 ^-6 4 x 10 ^-13 1.5 x 10 ^-3 144 dB 288 dB 1530 dB

You might also like