RAGHU ENGINEERING COLLEGE
(AUTONOMOUS)
Digital Communications
Unit-5
Source Coding
Electronics and Communication Engineering
Outline
• Shannon-Fano Coding
• Huffman Coding
Shannon-Fano Encoding Algorithm:
The messages are first written in the order of decreasing probability.
Then divide the messages set into two most equiprobable subset X and Y.
The message of 1st set X is given bit 0 and message in the 2nd subset is given bit 1.
The procedure is now applied for each set separately till end.
Finally we get the code word for respective symbol.
Calculation
Huffman Coding Algorithm:
The source symbols are arranged in order of decreasing probability. Then the two of
lowest probability are assigned bit 0 and 1.
Then combine last two symbols and move the combined symbol as high as possible.
Repeat the above step until end.
Code for each symbol is found by moving backward.
Calculation