Dulranga's Notes
Semester 3Data Communication and Networking

Transmission Errors

Bits travel as signals, and noise is always present. If the noise is strong, a bit is flipped. A communication system must therefore (1) prevent errors where it can, (2) detect them, and (3) control them (correct, or discard and re-request). Some systems do no error control at all and simply discard the bad data.

Where are errors handled?

  • Mainly the Data Link layer. It builds frames (header, control, address info) and does error detection/correction. It is independent of the medium.
  • Some error detection also exists in the OSI Transport layer, and in the Network layer of the Internet model.

Sources of noise and error

ImpairmentWhat it isKey facts / remedy
White noise (thermal / Gaussian)Constant background noiseRelatively constant, can be reduced. If too strong it destroys the signal.
Impulse noiseRandom spikes of powerMost disruptive. Can destroy one or more bits. Hard to remove from analog signals. Faster rate → more bits damaged per spike (bits are closer together).
CrosstalkUnwanted coupling between two signal paths (hearing another call)Relatively constant, reducible with proper measures.
EchoSignal reflected back, e.g. from the end of a cableMostly on coaxial cable. Relatively constant, significantly reducible.
JitterSmall timing irregularities in a repeated digital signalCan force the system to slow down. Reduce with shielding.
Delay distortionPropagation velocity varies with frequencyReduce with equalizers.
AttenuationContinuous loss of signal strength with distanceToo weak → cannot tell 1s from 0s. Use a less lossy medium or amplifiers.
DistortionSignal changes shape with distanceSuccessive bits may merge.
InterferenceUnwanted signal from outside sourcesOften intermittent, hard to diagnose.

Error prevention: shield cables, line conditioning/equalization, replace old media with digital components, use digital repeaters / analog amplifiers, and observe the stated media capacities.

Information redundancy (coding)

  • A d-bit data word is encoded into a c-bit codeword with c > d.
  • If the received c bits are not a valid codeword → error detected. Some codes can also correct.
  • Separable code: separate data and code fields. Decoding just drops the code bits (parity, checksum).
  • Non-separable code: data and code bits are integrated, so extracting the data needs processing (CRC).

Parity codes

Simplest separable code: d data bits + 1 parity bit.

  • Even parity: parity bit makes the total number of 1s (incl. parity bit) even.
  • Odd parity: total number of 1s odd.

Example (even parity): data 10011100 has four 1s → parity bit 0. Data 10110000 has three 1s → parity bit 1.

2-D parity (LRC / VRC)

Arrange data in rows. Add a parity bit per row (VRC) and a parity row per column (LRC). A single wrong bit breaks one row check and one column check, and their intersection identifies the unique erroneous bit.

Hamming distance and Hamming code

Hamming distance = number of bit positions in which two codewords differ. Words at distance 1 are neighbours on a cube (e.g. 000 and 001). (Outside the L05 slides: a code with minimum distance d{min} detects up to d_{min}-1 errors and corrects up to \lfloor (d_{min}-1)/2 \rfloor.)_

(7,4) SEC Hamming code

See more - Hamming Codes

CRC (Cyclic Redundancy Check)

A non-separable code. The message is treated as a polynomial. Sender:

  1. Take the message polynomial and divide it by an agreed generator polynomial (modulo-2 / XOR division).
  2. Discard the quotient. The remainder is the CRC.
  3. Attach the remainder to the end of the message and send both.

Receiver: divide the received message + CRC by the same generator.

  • Remainder == 0 → no error detected.
  • Remainder ≠\ne 0 → error.

Number of CRC bits = (number of generator bits) - 1 = degree of the generator. Before dividing, append that many zeros to the message. Pasted image 20261111131637.png

On this page