Technopedia

The technologist’s encyclopedia

Communication

Communication studies how to transmit data reliably over a noisy channel. It is relevant whenever data must cross a physical medium (wire, air, fiber) that introduces errors.

Three questions structure the subject: channel capacity sets the fundamental limit on how fast information can be sent; error detection flags when the received bits differ from what was sent; error correction repairs the errors so the receiver recovers the original message. Each section builds on the previous: capacity tells you whether a target rate is achievable, detection tells you an error occurred, and correction restores the data.

Authoritative sources

Channel models

Three canonical channels capture the essential noise mechanisms:

ChannelParameterCapacityTypical use
Binary Symmetric Channel (BSC)crossover probability pC = 1 − Hb(p)Model for digital links with bit flips
Binary Erasure Channel (BEC)erasure probability εC = 1 − εModel for channels that lose symbols (e.g. packet loss)
Additive White Gaussian Noise (AWGN)bandwidth B, SNRC = B log₂(1 + SNR)Model for analog / RF links

The BSC is the simplest discrete model: each bit is flipped independently with probability pp. The BEC replaces bits with an erasure marker (the receiver knows which positions are lost). The AWGN channel is the continuous analogue; its capacity is the Shannon–Hartley theorem.

Channel capacity

The Shannon capacity of a discrete memoryless channel is:

C=max⁡p(x)I(X;Y)C = \max_{p(x)} I(X; Y)

bits per channel use, where I(X;Y)I(X;Y) is the mutual information and H(X)H(X) is the entropy (see Coding and entropy for definitions). For a binary symmetric channel with crossover probability pp:

C=1−Hb(p)=1+plog⁡2p+(1−p)log⁡2(1−p)C = 1 - H_b(p) = 1 + p\log_2 p + (1-p)\log_2(1-p)

The channel coding theorem states that reliable communication at any rate R<CR < C is possible with sufficiently long codes; no code can reliably communicate at R>CR > C.

The code rate R=k/nR = k/n is the ratio of information bits kk to the total codeword length nn. It measures the overhead: a rate of R=0.5R = 0.5 means one parity bit per data bit. A code can only operate reliably when R≤CR \leq C.

Source–channel separation theorem (Shannon 1948): optimal source coding (compression) and channel coding (error correction) can be designed independently. The source is compressed to its entropy rate, then the compressed stream is protected by a channel code operating below capacity. This is why Compression and this page are separate topics: each solves a different problem, and the optimal solution to one does not depend on the details of the other.

Details

AWGN channel: For a continuous channel with bandwidth BB Hz and signal-to-noise ratio SNR\text{SNR}:

C=Blog⁡2(1+SNR)bits/sC = B \log_2(1 + \text{SNR}) \quad \text{bits/s}

This is the Shannon–Hartley theorem. It sets the ultimate limit for any modulation and coding scheme on that channel.

Practical gap: Polar codes (Arikan 2009) provably achieve capacity for binary-input DMC channels and approach within a small gap (≲ 0.1 dB) for large block lengths. LDPC codes are typically within 0.5–1 dB of capacity. Turbo codes (1993) were the first practical codes to come close.

Error detection

Parity bit: append 1 bit so the total number of 1s is even (or odd). Detects single-bit errors.

Checksum: sum all bytes (mod 282^8 or 2162^{16}); append the complement. Detects most single-bit and some multi-bit errors. Used in TCP, IP.

CRC (Cyclic Redundancy Check): treat the message as a polynomial m(x)m(x) over F2\mathbb{F}_2; compute m(x) mod g(x)m(x) \bmod g(x) where g(x)g(x) is a generator polynomial (e.g., CRC-32: x32+x26+x23+x22+x16+x12+x11+x10+x8+x7+x5+x4+x2+x+1x^{32} + x^{26} + x^{23} + x^{22} + x^{16} + x^{12} + x^{11} + x^{10} + x^8 + x^7 + x^5 + x^4 + x^2 + x + 1). Append the remainder. Detects all burst errors of length ≤deg⁡g\leq \deg g and most longer errors.

Authoritative sources

The minimum Hamming distance dmind_{min} of a code is the smallest number of positions in which any two distinct codewords differ. It is the single most important parameter linking detection to correction:

For example, dmin=3d_{min} = 3 detects 2 errors and corrects 1; dmin=5d_{min} = 5 detects 4 errors and corrects 2.

Details

CRC properties:

CRC is a linear code: the set of valid codewords forms a vector space over F2\mathbb{F}_2. This makes hardware implementation trivial (a shift register with XOR feedback).

Hamming distance dH(c1,c2)d_H(c_1, c_2): the number of positions in which two codewords differ. The minimum distance dmin=min⁡c1≠c2dH(c1,c2)d_{min} = \min_{c_1 \neq c_2} d_H(c_1, c_2) determines the error-detection and correction capability as stated above.

Error correction

Hamming code (2m−1,2m−1−m)(2^m - 1, 2^m - 1 - m): adds mm parity bits to protect 2m−1−m2^m - 1 - m data bits. Has dmin=3d_{min} = 3: corrects single-bit errors. Example: Hamming(7,4) protects 4 data bits with 3 parity bits.

Reed-Solomon code (n,k)(n, k) over F2m\mathbb{F}_{2^m}: encodes kk symbols into nn symbols; corrects up to t=(n−k)/2t = (n-k)/2 symbol errors. Used in CDs, QR codes, SSDs, Deep Space Network.

Convolutional codes: pass the input through a shift register with XOR feedback; the output is a sequence of parity bits. Decoded with the Viterbi algorithm (dynamic programming over the trellis).

LDPC codes: sparse parity-check matrix; decoded with belief propagation (iterative message passing on the factor graph). Used in Wi-Fi (802.11ax), DVB-S2, 5G.

Details

Reed-Solomon example: RS(255, 223) over F256\mathbb{F}_{256} encodes 223 bytes into 255 bytes, correcting up to 16 byte errors. Used in CD (C2 error correction) and QR codes.

Viterbi algorithm: for a convolutional code with constraint length KK, the trellis has 2K−12^{K-1} states. At each time step, for each state, keep only the path with the minimum Hamming distance to the received sequence. Complexity: O(n⋅2K−1)O(n \cdot 2^{K-1}).

Belief propagation (for LDPC): alternate between variable nodes (“what is my value?”) and check nodes (“is my constraint satisfied?”). Converges in ≈10\approx 10–2020 iterations for good codes.

Simulation

Example problem

Problem: A message of 1000 bits is sent over a BSC with p=0.01p = 0.01. What is the channel capacity? If a (1023, 1013) Hamming code is used, what is the code rate and the probability of undetected error per codeword (approximate)?

Solution

Capacity: C=1−Hb(0.01)=1+0.01log⁡2(0.01)+0.99log⁡2(0.99)≈1−0.0808=0.919C = 1 - H_b(0.01) = 1 + 0.01\log_2(0.01) + 0.99\log_2(0.99) \approx 1 - 0.0808 = 0.919 bits/use.

Code rate: R=k/n=1013/1023≈0.990R = k/n = 1013/1023 \approx 0.990. Since R>CR > C, this code rate exceeds capacity: reliable communication is not guaranteed at this rate with this code. A practical code would need R≤0.919R \leq 0.919, e.g., a (1023, 940) code.

Undetected error probability: The Hamming(1023, 1013) code has dmin=3d_{min} = 3: it corrects 1 error and detects 2. With np=10.23np = 10.23 expected errors per codeword, the code will almost always see more than 1 error and declare a failure (or, in a real system, request retransmission). The probability of an undetected error (3 or more errors that map to another valid codeword) is:

Pundetected=∑i=dminnAi pi(1−p)n−iP_{\text{undetected}} = \sum_{i=d_{min}}^{n} A_i\, p^i (1-p)^{n-i}

where AiA_i is the number of codewords of weight ii. For a Hamming code with n=1023n = 1023 and p=0.01p = 0.01, the dominant term is A3⋅p3(1−p)n−3A_3 \cdot p^3 (1-p)^{n-3} with A3=n(n−1)/6=174,251A_3 = n(n-1)/6 = 174{,}251, giving Pundetected≈6×10−6P_{\text{undetected}} \approx 6 \times 10^{-6}, which is very small.