Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 15

DIGITAL SIGNAL PROCESSING

Course Code: DIT 705

Lecturer: ONU, Praise I.

Centre for Information and Telecommunication


Engineering

University of Port Harcourt


DIGITAL SIGNAL PROCESSING
OUTLINE
 INTRODUCTION TO DSP
 PROCESSING ANALOG SIGNALS
 ANALYTICAL TOOLS
 DISCRETE FOURIER TRANSFORM
 DIGITAL FILTERS
 DSP ARCHITECTURE
 FIXED POINT NUMBER FORMAT
 FLOATING POINT NUMBER FORMAT
 PRACTICAL MATLAB APPLICATION
The IEEE 754 standard defines several different precisions.
Single Precision numbers include 1-bit Sign field, 8-bit Exponent field and a 23-bit
Fraction, for a total of 32 bits.
Double precision numbers have 1-bit Sign field, 11-bit Exponent field and a 52-bit
Fraction, for a total of 64 bits.
The sign bit is 0 for positive numbers and 1 for negative numbers.
But unlike integers, floating format values are stored in signed magnitude format
(+/-).

Representation of floating-point number is not unique.

The fractional part can be normalized. In the normalized form, there is only a single
non-zero digit before the radix point.
Example 1:
1.What’s the normalized representation of 00101101.101?
2.What’s the normalized representation of 0.0001101001110?
Solution:
3.00101101.101 = 1.01101101 × 25
4.0.0001101001110 = 1.110100111 × 2-4
This means that the actual Mantissa of the floating-point value is
(1 + f). that is; there is an implicit 1 to the left of the binary point.
Single-precision Exponent range
E Actual Exponent
0000 0000 Reserved
0000 0001 1 – 127 = -126 -12610
0000 0010 2 – 127 = -125 -12510
…. …. ….
0111 1111 127 – 127 = 0 010
…. …. ….
1111 1110 254 – 127 = 127 12710
1111 1111 Reserved

This converts all single-precision exponents from -126 to +127 into unsigned numbers from 1 to
254, and all double-precision exponents from -1022 to +1023 into unsigned numbers from 1 to
2046.
That is:
If the exponent is 4, the E field will be 4 + 127 = 131 (100000112).
If E contains 01011101 (93 ), the actual exponent is 93 - 127 = - 34.
Example 5:
Add the two decimal numbers 99.99 and 0.161 and represent in floating-point
values
Solution
99.99 + 0.161 = 100.151
Step 1: Normalize each number
99.99 = 9.999 x 101
0.1610 = 1.610 x 10-1
Step 2: Equalize the exponents.
The operand with the smaller exponent should be rewritten by increasing its
exponent and shifting the point leftwards.
Therefore: 1.610 x 10-1 = 0.01610 x 101
The four significant digits gives: 0.016 x 10 1 which can result in a loss of least
significant digits.
Step 3: Add the mantissas
9.999 x 101
+ 0.016 x 101
10.015 x 101
Step 4: Normalize the result if necessary
10.015 x 101 = 1.0015 x 102
Step 5: Round the number if needed
1.0015 x 102 gets rounded to 1.002 x 102
Step 6: Repeat Step 3 if the result is no longer normalized
The answer can be written as: 1.002 x 102 or 100.2.
The correct answer is 100.151, so we have the right answer to four significant
digits.
Example 6:
Add the two floating-point numbers 0 1000 0001 110…0 and 0 1000 0010 00110..0 in single-precision
representation
Solution:
0 1000 0001 110…0
S=0
E = 1000 0001
F = 110…0
Actual Fraction with implicit 1 = 1.110…0
E = 1000 0001 = 129; 129 – 127 = 2
Therefore; 1.11 x 22

0 1000 0010 00110..0


S=0
E = 1000 0010
F = 00110…0
Actual fraction with implicit 1 = 1.0011
E = 1000 0010 = 130 = 130 – 127 = 3
3
Compare the two exponents (that is to make the two exponents equal before
addition)
1000 0001 < 1000 0010
Therefore, 1000 0001 = 1.11 x 22 = 0.111 x 23
Add Mantissa
1.0011
+ 0.1110
10.0001
Therefore; 10.0001 x 23 = 1.00001 x 24
E = 4 + 127 = 131 = 1000 0011
Single-precision representation = 0 1000 0011 00001…0
Example 7:
Multiply the two floating-point values 99.99 and 0.161
Solution:
To multiply two floating-point values, first multiply their magnitudes and add their exponents.
Normalize the two values:
99.99 = 9.999 x 101
0.161 = 1.610 x 10-1
Therefore:
9.999 x 101
x 1.610 x 10-1
16.098 x 100
Round and normalize the result yields: 1.6098 x 101

Note:
If two numbers have the same sign, their product is positive: 0 * 0 = 0; 1 * 1 = 0
If two numbers have different signs, the product is negative: 0 * 1 = 1; 1 * 0 = 1
THANK YOU

You might also like