Skip to main content

Line coding in PCM and the right technique

Short answer

Line coding adapts PCM binary streams to meet transmission requirements: no DC, adequate timing, small bandwidth, error monitoring. NRZ and RZ have DC and lose clock on long sequences; AMI loses clock on long zeros. Zero-substitution bipolar codes like HDB3 and B8ZS replace zero runs with intentional bipolar violations, preserving DC balance and timing.

Why line coding is required in PCM (Pulse Code Modulation) system? Is it possible to implement NRZ (Not Return to Zero), RZ (Return to Zero) and AMI (Alternate Mark Inversion) coding techniques? If not, explain why it is not possible and which coding technique solves this problem?

Why line coding is required in PCM

The PCM coder gives a plain binary stream. Before it is sent on a cable through regenerative repeaters, it must be converted into a line code that matches the line. The code must have:

  • No DC component: lines are coupled through transformers and capacitors (and carry DC power for repeaters), so the signal must have no DC and little low-frequency energy.
  • Timing (clock) content: regenerative repeaters extract the clock from the transitions of the received signal; there must be enough transitions whatever the data.
  • Small bandwidth: the spectrum should be narrow to reduce attenuation and crosstalk on the cable.
  • Error monitoring: the code should have redundancy so that errors can be detected in service (e.g. bipolar violations).
  • Transparency: any data pattern, including long runs of 0s or 1s, must pass without loss of timing.
  • Simple, low-cost coding and decoding.

Is it possible to use NRZ, RZ and AMI?

No. None of the three meets all the requirements, so none is used on its own for PCM lines.

Why they are not possible

 data:     1   0   1   1   0   0   0   0
          +---+   +-------+
 NRZ-L    |   |   |       |
 (unipol) +   +---+       +---------------  0

          +-+     +-+ +-+
 RZ       | |     | | | |
 (unipol) + +-----+ +-+ +-----------------  0

          +---+       +---+
 AMI      |   |       |   |
       ---+   +---+   +   +---+------------ 0
                  |   |   (no pulses
                  +---+    for 0s)

Unipolar NRZ ('1' = +V for full bit, '0' = 0):

  • Average (DC) value V/2V/2; DC is blocked by line transformers and coupling capacitors, causing baseline wander and wrong decisions.
  • Long runs of 1s or 0s have no transitions, so repeaters cannot recover the clock.
  • No spectral line at fbf_b to extract timing; no error detection.

Unipolar RZ ('1' = +V for half bit):

  • Still has DC (average V/4V/4).
  • Long runs of 0s give no pulses, so timing is lost.
  • Pulses are half-width, so the bandwidth is double (2fb2f_b first null), causing more attenuation and crosstalk.

Bipolar AMI ('1' = alternate +/− pulses, '0' = 0):

  • Good: zero DC, narrow spectrum, simple error detection via bipolar violations.
  • Problem: a long run of 0s sends no pulses, so the repeater clock drifts and synchronisation is lost. PCM traffic (idle channels, data) often contains such runs, so AMI is not transparent.
CodeDC freeTiming in 0-runsBandwidthError check
NRZNoNofbf_bNo
RZNoNo2fb2f_bNo
AMIYesNofbf_bYes

Coding techniques that solve the problem

The solution is zero-substitution bipolar codes: AMI with long strings of zeros replaced by special patterns that contain deliberate bipolar violations (V). The receiver recognises a violation, knows it is a substitution and replaces the pattern by zeros. This keeps zero DC and error monitoring while guaranteeing pulses for timing.

1. HDB3 (High Density Bipolar of order 3) – used on E1, E2, E3 (ITU-T G.703). Rule: any string of four zeros is replaced by

  • 000V if the number of 1s (pulses) since the last substitution is odd;
  • B00V if it is even.

Here V is a pulse of the same polarity as the previous pulse (a violation), and B is a normal bipolar pulse (opposite to the previous pulse). This makes successive V pulses alternate, so there is no DC build-up. At most 3 zeros appear in a row.

Example (the first pulse is taken as +):

Data101100001000000001
AMI+0−+0000−00000000+
HDB3+0−+000+V−000−V+B00+V−
  • After 1 0 1 1 (three 1s, odd) the first 0000 becomes 000V, V = + (same as previous +).
  • After that, one 1 (odd) → 000V, with V = − (same as previous −).
  • Next 0000 follows with no 1 in between (even, zero) → B00V: B = + (opposite of −), V = + (same as B).
  • The V pulses (+, −, +) alternate, so the line stays DC balanced.

2. B8ZS (Bipolar with 8-Zero Substitution) – used on T1. Any string of eight zeros is replaced by 000VB0VB: if the previous pulse is +, the substitute is 000+−0−+; if it is −, it is 000−+0+−. Two violations in fixed positions identify the substitution.

Data1100000000101
AMI+−00000000+0−
B8ZS+−000−V+B0+V−B+0−

3. Other codes: B6ZS and B3ZS (T2, T3), CMI and Manchester (biphase) for some interfaces, 4B3T and 2B1Q for ISDN lines.

Result

HDB3/B8ZS give: no DC component, a guaranteed pulse at least every 4 (or 8) bits for clock recovery, bandwidth similar to AMI, in-service error detection (an unexpected violation means an error), and full transparency for 64 kbps clear channels.

✓ Answer checked by Claude Opus 5.5 (high effort)

All Telecommunications chapter 3 questions →