Digital Signal Processing

BITS Pilani

Date : 02/09/2013

BITS Pilani Pilani|Dubai|Goa|Hyderabad Previous class: Numeric Representation used in DSP Fixed point .

BITS Pilani Pilani|Dubai|Goa|Hyderabad Today class Numeric Representation used in DSP Fixed point Floating point .

Numeric Representation used in DSP Fixed-point –16-bit –20-bit –24-bit Narrow dynamic range but costs low. Slower than FIPDSP . Faster than FLPDSP Floating-point –32-bit –64-bit –80-bit –128-bit Wider dynamic range but complex hardware.

.e..75) Integer: Unsigned integer (from 0 to 216 i.Fixed-Point Notation A 16-bit fixed-point number can be interpreted as either: Integer (i.768 to 32.767) N-bit fixed point. 2’s complement integer representation X = -bN-1 2N-1 + bN-2 2N-2 + … + b020 What will be the value of 1 0 10 1 1 0 0 ? . 0. 20645) Fractional number (i.536) Signed integer (from –32. 65.e.e.

What is the maximum and minimum number you can represent using 3-bit two’s complement representation? So the dynamic range is from -4 to 3.Represent 3 using 3-bit two’s complement representation. .

Let us do multiplication using 3-bit two’s complement representation. Is the result correct ? 2. Multiply 2 with (-1) Take two’s complement and remove two extended sign bits. Multiply 2 with (-3) . 1.

2. Overflow occurs as the result (-6) is out of dynamic range (-4). Multiply 2 with (-3) Now removing the two extended sign bits to have size of 3 we get: Is the result correct? No. .

Let use find the fractional representation of 3 in two’s complement form? ¾=? 011 001 .

So the overflow error is avoided. As multiplication of fractional number can not exceed dynamic range no overflow will be there. .

.Multiply 2 with (-3) If we truncate the two LSB bits: What is the error? So the overflow error is avoided. As multiplication of fractional number can not exceed dynamic range no overflow will be there.

we introduced a quantization error of 0. .33. Dynamic Range Ratio between the largest number and the smallest (positive) number.g.Some parameters to define representation accuracy Precision Smallest step (difference) between two consecutive N-bit numbers. It can be expressed in dB (decibels) as follows: Dynamic Range (dB) = 20 log10 ( Max / Min) Quantization error is the numeric error introduced when a longer numeric format is converted to a shorter one.005. e. when we round 1.325 to 1..

.In integer representation the precision is how much? In DSP much more precision is needed. So fractional number representation is used.

13 format 2 bits for integer portion 13 bits for fractional portion 1 signed bit (MSB) Special cases: 16-bit integer number (N=16) => Q15.Fractional Fixed-Point Representation Called as Q-format (Quantity of fractional bits) General Fractional Fixed-Point Representation Q m.0 format 16-bit fractional number (N = 16) => Q0.n notation m bits for integer portion n bits for fractional portion Total number of bits N = m + n + 1.15 format. for signed numbers Example: 16-bit number (N=16) and Q2.15 or Q15 . also known as Q.

15 or Q15 Used in DSP Binary pt position .S Integer (15 bits) Q15. Q1. .0 S Fraction (15 bits) . Q.14 Upper 2 bits Remaining 14 bits .

Q15 used in 16-bit DSP chip.5]= INT[8602.2625 in memory: Method 1 (Truncation): INT[0.6] = 8601 = 0010000110011001 Method 2 (Rounding): INT[0.2625*215]= INT[8601.518e–6 Q15 means scaling by 1/215 Q15 means shifting to the right by 15 Example: how to represent 0. resolution of the fraction will be 2–15 or 30.1] = 8602 = 0010000110011010 By this method of rounding or truncation we introduce quantization error .2625*215+0.

Ans: 0. 15.95624 in Q4 format.01874 . Use truncation and rounding.Represent 0.2999984 01111 Find the quantization error.