EXAMPLE 11 Decoding a Huffman Code

Looking at our example 11101000011010011111010010, we see that neither 11 nor 111 is a code word but 1110 is the code word for . So, replacing 1110 with , we have . The next possibility is 10, which is the code word for , so we have . Next, we have 00, which is the code word for , giving us . Continuing in this way, we obtain . Of course, in practice, coding and decoding are done by computers.