Digital Signal Processing Reference
In-Depth Information
2 0
2 3
2 1
2 3
which is equivalent to x 10
9 . 625. In this dis-
cussion of binary number representation, we have used the symbol
=
1
×
+
1
×
+
+
=
to separate
the integer part and the fractional part and the subscripts 2 and 10 to denote the
binary number and the decimal number. Another example given by
x 2
=
b 2 b 1 b 0 b 1 b 2 b 3 b 4
(7.1)
has a decimal value computed as
b 2 +
b 1 +
b 0 +
b 1
1
b 2
2
b 3
3
b 4
x 10 =
+
+
+
(7.2)
4
where the bits b 2 ,b 1 ,b 0 ,b 1 ,b 2 ,b 3 ,b 4 are either 1 or 0. In general, when
x 2 is represented as
x 2 =
b I 1 b I 2 ···
b 1 b 0 b 1 b 2 ···
b F
(7.3)
the decimal number has a value given by
I
1
b i 2 i
x 10 =
(7.4)
i
=−
F
In the binary representation (7.3), the integer part contains I bits and the bit b I 1
at the leftmost position is called the most significant bit (MSB); the fractional
part contains F bits, and the bit b F at the rightmost position is called the least
significant bit (LSB). This can only represent the magnitude of positive numbers
and is known as the unsigned fixed-point binary number . In order to represent
positive as well as negative numbers, one more bit called the sign bit is added to
the left of the MSB. The sign bit, represented by the symbol s in (7.5), assigns
a negative sign when this bit is 1 and a positive sign when it is 0. So it becomes
a signed magnitude fixed-point binary number. Therefore a signed magnitude
number x 2 = 11001 1010 is x 10 =− 9 . 625. In general, the signed magnitude
fixed-point number is given by
I
1
1 ) s
b i 2 i
x 10 =
(
(7.5)
i
=−
F
and the total number of bits is called the wordlength w
F .When
two signed magnitude numbers with widely different values for the integer part
and/or the fractional part have to be added, it is not easy to program the adders
in the digital hardware to implement this operation. So it is common practice
to choose I
= 1 +
I
+
= 0, keeping the sign bit and the bits for the fractional part only
so that F
1 in the signed magnitude fixed-point representation. But when
two numbers larger than 0.5 in decimal value are added, their sum is larger
than 1, and this cannot be represented by the format shown above, where I
=
w
= 0.
Search WWH ::




Custom Search