Skip to main content

Digital communication system elements; Shannon-Fano coding

Short answer

A digital communication system consists of source, source encoder, channel encoder, modulator, channel, demodulator, channel decoder, source decoder, and destination. Shannon-Fano coding assigns variable-length prefix codes by recursively splitting symbols into two nearly equiprobable groups, assigning 0 and 1, achieving code length close to entropy.

Explain in brief the functional block diagram and the basic elements of a digital communication system. Explain Shannon-Fano coding.

Digital communication system

A digital communication system transmits information as discrete symbols (bits) over a channel. Its functional blocks:

 Info    -> Formatter -> Source  -> Channel -> Modulator
 source     (A/D)        encoder    encoder       |
                                                  v
                                               Channel
                                       noise -> (+)
                                                  |
 User    <- Formatter <- Source  <- Channel <- Demodulator
            (D/A)        decoder    decoder    /detector

Basic elements:

  1. Information source: produces the message (voice, video, text, data). Analog messages are first converted to digital by the formatter (sampling, quantizing, PCM encoding).
  2. Source encoder: removes redundancy and represents the symbols with the fewest bits on average (Huffman, Shannon–Fano). It lowers the bit rate.
  3. Channel encoder: adds controlled redundancy (parity bits) so the receiver can detect and correct errors (Hamming, cyclic, convolutional codes).
  4. Digital modulator: converts the bits into waveforms suitable for the channel: line coding for baseband, ASK, FSK, PSK or QAM for bandpass.
  5. Channel: the physical medium (wire, coaxial cable, optical fibre, radio). It adds noise, attenuation, distortion and interference.
  6. Demodulator/detector: recovers the bit sequence from the received waveform, using matched filtering, sampling and decisions.
  7. Channel decoder: uses the redundancy to correct errors.
  8. Source decoder and formatter: rebuild the original message (D/A conversion) for the user.

Other blocks often included: encryption/decryption, multiplexing, synchronization. Performance is judged by the probability of bit error PeP_e, bandwidth efficiency (bits/s/Hz) and power efficiency (Eb/N0E_b/N_0 needed).

Shannon–Fano coding

Shannon–Fano coding is a variable-length source coding method that gives short code words to likely symbols and long ones to unlikely symbols.

Algorithm:

  1. List the symbols in decreasing order of probability.
  2. Split the list into two groups whose total probabilities are as nearly equal as possible.
  3. Assign bit 0 to every symbol of the upper group and 1 to the lower group.
  4. Repeat steps 2–3 inside each group until every group has one symbol.
  5. The code word of a symbol is the sequence of bits assigned to it.

Example: P={0.4,0.2,0.2,0.1,0.1}P = \{0.4, 0.2, 0.2, 0.1, 0.1\} for A–E. First split {A} = 0.4 vs {B, C, D, E} = 0.6.

Symbolpip_iStep 1Step 2Step 3Step 4Codelil_i
A0.4001
B0.210102
C0.21101103
D0.1111011104
E0.1111111114
Lˉ=0.4(1)+0.2(2)+0.2(3)+0.1(4)+0.1(4)=2.2 bits/symbolH=2.1219 bits/symbol,η=2.12192.2=96.45%\begin{aligned} \bar L &= 0.4(1)+0.2(2)+0.2(3)+0.1(4)+0.1(4) = 2.2\ \text{bits/symbol} \\ H &= 2.1219\ \text{bits/symbol}, \qquad \eta = \frac{2.1219}{2.2} = 96.45\% \end{aligned}

The code is a prefix code (uniquely decodable), but Shannon–Fano is not always optimal; Huffman coding is.

✓ Answer checked by Claude Opus 5.5 (high effort)

All Communication Systems chapter 6 questions →