Digital Signal Processing Reference
In-Depth Information
format consist of two parts: the integer part and the fractional part, with a binary
point separating them:
10111
101
ð 4 : 1 Þ
|{z}
integer
|{z}
fraction
where represents the binary point. Generally, the decimal equivalent of a binary
number a B 1 a B 2 ...a 0 a 1 a 1 ...a b consisting of B integer bits and b fractional
bits is obtained as follows
X
B 1
a i 2 i ;
ð 4 : 2 Þ
n ¼ b
where a i [ {0,1}. There are two main types of binary representations: fixed-point
and floating-point, with these being discussed below.
4.2.1 Fixed-Point Format
The binary point in this representation is fixed at a specific location as suggested
by its name. This representation is often used in implementing DSP algorithms
because of its simplicity. In implementing DSP algorithms, fixed-point numbers
are frequently scaled to be represented as fractions, as shown in Fig. 4.1 . The
scaling followed by fractional representation helps to ensure that overflow and loss
of crucial information does not occur when arithmetic operations are performed.
The leftmost bit s represents the 'sign' bit, where the number is positive if s = 0
and it is negative if s = 1. The b bits to the right of the binary point represent the
other signal information.
The exact signal value represented by the non-sin bit in fixed point represen-
tation depends on the type of format used. There are several fixed-point conven-
tions commonly used, namely, the 2's complement, the sign-magnitude and the
offset binary conventions [ 1 ]. The offset binary convention, which is mainly used
in bipolar D/A converters, can be converted to the 2's complement convention by
simply complementing the sign bit.
a
a
a
a
s
2
b -1
b
Binary point
Fig. 4.1
Fractional fixed-point format
Search WWH ::




Custom Search