Databases Reference
In-Depth Information
Input Codes Output
000
− 3 5
001
− 2 5
010
− 1 5
011
− 0
0
1
2
3
5
100
5
101
5
110
5
111
5
F I GU R E 9 . 2
Mapping for a 3-bit D/A converter.
values between 0 and 1.0 would be assigned the code 100, and so on. On the two boundaries,
all inputs with values greater than 3 would be assigned the code 111, and all inputs with values
less than
3.0 would be assigned the code 000. Thus, any input that we receive will be assigned
a codeword depending on the interval in which it falls. As we are using 3 bits to represent each
value, we refer to this quantizer as a 3-bit quantizer.
For every codeword generated by the encoder, the decoder generates a reconstruction value.
Because a codeword represents an entire interval, and there is no way of knowing which value
in the interval was actually generated by the source, the decoder puts out a value that, in some
sense, best represents all the values in the interval. Later, we will see how to use information
we may have about the distribution of the input in the interval to obtain a representative value.
For now, we simply use the midpoint of the interval as the representative value generated by the
decoder. If the reconstruction is analog, the decoder is often referred to as a digital-to-analog
(D/A) converter. A decoder mapping corresponding to the 3-bit encoder shown in Figure 9.1
is shown in Figure 9.2 .
Example9.3.1:
Suppose a sinusoid 4 cos
was sampled every 0.05 second. The sample was digitized
using the A/D mapping shown in Figure 9.1 and reconstructed using the D/A mapping shown
in Figure 9.2 . The first few inputs, codewords, and reconstruction values are given in Table 9.1 .
Notice the first two samples in Table 9.1 . Although the two input values are distinct, they both
fall into the same interval in the quantizer. The encoder, therefore, represents both inputs with
the same codeword, which in turn leads to identical reconstruction values.
(
2
π
t
)
T A B L E 9 . 1
Digitizing a sine wave.
t
4cos
(
2
π
t
)
A/D Output D/A Output
Error
0.05
3.804
111
3.5
0.304
0.10
3.236
111
3.5
0.264
0.15
2.351
110
2.5
0.149
0.20
1.236
101
1.5
0.264
 
Search WWH ::




Custom Search