- 2071 Chaitra (CS II) · 2+4+2 marks
Importance of source coding; Shannon-Fano vs BCD (four symbols)
Short answer
Source coding reduces bit rate by giving short codes to probable symbols. With probabilities 0.5,0.25,0.125,0.125, Shannon-Fano achieves average length 1.75 bits/symbol, matching entropy, for 100% efficiency. BCD with 4 bits per symbol yields only 43.75% efficiency.
Explain the importance of source coding in digital communication system. A discrete memory less source emits four symbols with probabilities P = {0.125, 0.125, 0.25, 0.5}. If the output symbols are encoded using Shannon Fano code, find the Coding efficiency and compare the coding efficiency with that of BCD code.
Importance of source coding
Source coding removes redundancy from the source output so that each symbol is represented by as few bits as possible on average:
- It reduces the bit rate, so less bandwidth, power and storage are needed.
- It uses the symbol probabilities: likely symbols get short code words.
- The best possible average length is the entropy ; efficiency shows how close a code comes.
Shannon–Fano code
for . In decreasing order: 0.5, 0.25, 0.125, 0.125. Splits: {0.5} | {0.25, 0.125, 0.125}; {0.25} | {0.125, 0.125}; {0.125} | {0.125}.
| Symbol | Step 1 | Step 2 | Step 3 | Code | ||
|---|---|---|---|---|---|---|
| x4 | 0.5 | 0 | 0 | 1 | ||
| x3 | 0.25 | 1 | 0 | 10 | 2 | |
| x1 | 0.125 | 1 | 1 | 0 | 110 | 3 |
| x2 | 0.125 | 1 | 1 | 1 | 111 | 3 |
Entropy:
| Symbol | |||
|---|---|---|---|
| x1 | 0.125 | 3.0000 | 0.3750 |
| x2 | 0.125 | 3.0000 | 0.3750 |
| x3 | 0.25 | 2.0000 | 0.5000 |
| x4 | 0.5 | 1.0000 | 0.5000 |
| Total | 1 | 1.7500 |
Comparison with BCD
In BCD each symbol is sent as a 4-bit binary-coded-decimal word (0000, 0001, 0010, 0011), so :
| Code | Efficiency | |
|---|---|---|
| Shannon–Fano | 1.75 | 100 % |
| BCD (4 bits) | 4 | 43.75 % |
Shannon–Fano reaches 100 % because all probabilities are powers of . (If "BCD" is read as the plain 2-bit binary code, ; Shannon–Fano is still better.)
✓ Answer checked by Claude Opus 5.5 (high effort)
Related questions
- Importance of source coding; fixed vs Shannon-Fano (five symbols) · Communication Systems, chapter 6
- Importance of source coding; Shannon-Fano vs fixed length (seven symbols) · Communication Systems, chapter 6
- Digital communication system; Shannon-Fano for six symbols · Communication Systems, chapter 6
- Importance of source coding; Huffman for eight symbols at 1000 symbols/s · Communication Systems, chapter 6
- Digital communication system elements; Shannon-Fano coding · Communication Systems, chapter 6
- Coding efficiency: binary, Shannon-Fano and Huffman · Communication Systems, chapter 6
- Shannon-Fano code for eight symbols · Data Communication, chapter 8
- Shannon-Fano code for six symbols · Data Communication, chapter 8
- Huffman code for p = 0.5, 0.25, 0.125, 0.125 · Data Communication, chapter 8