Digital Signal Processing Reference
In-Depth Information
So two other form of representing the numbers are more commonly used: the
one's-complement and two's-complement forms (also termed one-complementary
and two-complementary forms ) for representing the signed magnitude fixed-point
numbers. In the one's-complement form, the bits of the fractional part are replaced
by their complement, that is, the ones are replaced by zeros and vice versa. By
adding a one as the least significant bit to the one's-complement form, we get
the two's-complement form of binary representation; the sign bit is retained in
both forms. But it must be observed that when the binary number is positive, the
signed magnitude form, one's-complement form, and two's-complement form are
the same.
Example 7.1
Given: x 2 = 0 1100 is the 5-bit, signed magnitude fixed-point number equal to
x 10 =+ 2 1
+ 2 2
= 0 . 75 and v 2 = 1 1100 is equal to v 10 =− 0 . 75. The one's
complement of v 2 =
1 1100 is 1 0011, whereas the two's complement of v 2 is
+ 0001
=
1 0011
1 0100.
The values that can be represented by the signed magnitude fixed-point repre-
sentation range from
2 F . In order to increase the range
of numbers that can be represented, two more formats are available: the floating-
point and block floating-point representations. The floating-point representation
of a binary number is of the form
2 w F 1
to 2 w F 1
( 1 ) s M( 2 E )
X 10 =
(7.6)
where M is the mantissa, which is usually represented by a signed magnitude,
fixed-point binary number, and E is a positive- or negative-valued integer with
E bits and is called the exponent . To get both positive and negative exponents,
the bias is provided by an integer, usually the bias is chosen as e 7
1 = 127
when the exponent E is 8 bits or e 10
1 = 1023 when E is 11 bits. Without
the bias, an 8-bit integer number varies from 0 to 255, but with a bias of 127,
the exponent varies from 127 to 127. Also the magnitude of the fractional part
F is limited to 0
M< 1. In order to increase the range of the mantissa, one
more bit is added to the most significant bit of F so that it is represented as
(1 .F ). Now it is assumed to be normalized, but this bit is not counted in the total
wordlength.
The IEEE 754-1985 standard for representing floating-point numbers is the
most common standard used in DSP processors. It uses a single-precision format
with 32 bits and a double-precision format with 64 bits.
The single-precision floating point number is given by
1 ) s ( 1 .F ) 2 E 127
X 10 =
(
(7.7)
According to this standard, the (32-bit) single-precision, floating-point number
uses one sign bit, 8 bits for the exponent, and 23 bits for the fractional part
Search WWH ::




Custom Search