Codeword Assignment:
1. Uniform Length Codeword Assignment:-
We discussed the problem of quantizing a scalar source. As the result of quantization, we obtained a specific reconstruction level. To transmit to the receiver which of the L possible reconstruction levels has been selected, we need to assign a specific codeword (a string of 0's and 1's) to each of the L reconstructed levels. For the receiver to be able to uniquely identify the reconstruction level, each reconstruction level must be assigned a different codeword. In addition, since more than one reconstruction level may be transmitted in sequence, the codeword have to designed so that they can be identified when received sequentially. A code having these characteristics is called a uniquely decodable code (UDC) . Examples
When , assigning -results in uniquely decode code. A code constructed by assigning and are not UDC.
This is because when 100 is read, it could be taken for .
So, it is convenient to think of the result of quantizing a scalar as a message that has L different possibilities ai, , with each possibility corresponding to a reconstruction level. The simplest method of selecting codewords is to use codewords of uniform length. In this, each possibility of the message is coded by a codeword that has the same length as all the other possibilities in that message.
eg. for , length of each codeword is
message |
codeword |
a 1 |
000 |
a 2 |
001 |
. |
010 |
. |
011 |
. |
101 |
. |
110 |
a 8 |
111 |
The number of bits required to code a message is referred to as bit rate. The bit rate in this example is 3 bits/message. If we code more than one message, the average bit rate is defined as total number of bits required divided by the number of messages. For uniform length codeword assignment, the average bit rate is same as bit rate.
|