Skip to main content

Short note: Line codes

Short answer

Line coding converts binary data into electrical pulses for baseband transmission. Desired properties include no DC, small bandwidth, self-clocking, and noise immunity. Common codes: Unipolar NRZ (simple, has DC), Polar NRZ, RZ, AMI (alternating pulses, no DC), and Manchester (self-clocking, double bandwidth).

Write a short note on line codes.

Line coding is the conversion of a binary data sequence into a digital electrical waveform (pulse pattern) suitable for transmission over a baseband channel such as a wire or cable.

Desired properties of a line code:

  • No DC component and little low-frequency content (for AC-coupled lines and transformers).
  • Small bandwidth.
  • Enough transitions for clock (timing) recovery, even in long runs of 0s or 1s.
  • Some error detection ability.
  • Good noise immunity (low error probability for the given power) and transparency to any data pattern.

Common line codes:

CodeRuleNotes
Unipolar NRZ1 → +V+V, 0 → 0Simple; has DC, poor timing
Polar NRZ1 → +V+V, 0 → −V-VBetter noise immunity; DC for unequal 1s and 0s
Unipolar/Polar RZPulse for half bit onlyEdges each bit; double bandwidth
AMI (bipolar)0 → 0, 1s alternate ±No DC; detects single errors; long 0 runs lose timing
Manchester1 → +/−, 0 → −/+Self-clocking, no DC; double bandwidth (Ethernet)

Example for data 101100:

bits  1   0   1   1   0   0  

Unipolar NRZ:
+V  |‾‾‾‾    ‾‾‾‾‾‾‾‾
 0  |    ----        --------

Polar NRZ:
+V  |‾‾‾‾    ‾‾‾‾‾‾‾‾
 0  |
-V  |    ____        ________

AMI (bipolar NRZ):
+V  |‾‾‾‾        ‾‾‾‾
 0  |    ----        --------
-V  |        ____

Manchester:
+V  |‾‾    ‾‾‾‾  ‾‾    ‾‾  ‾‾
 0  |
-V  |  ____    __  ____  __

Variants such as HDB3 and B8ZS replace long zero runs in AMI to keep timing.

✓ Answer checked by Claude Opus 5.5 (high effort)

All Communication Systems chapter 6 questions →