---
title: "Short note: Line coding principles in PCM"
subject: "Telecommunications"
chapter: 3
key: "semester_8/telecommunications:short-note-line-coding-pcm"
source: https://www.bctengineer.com/q/semester_8/telecommunications/short-note-line-coding-pcm
site: BCT Engineering
---

# Short note: Line coding principles in PCM

Telecommunications · Chapter 3: Signal Multiplexing

- Asked in: 2064 Poush (old course), 10 marks
- Video: [Line Coding Techniques | RZ, NRZ, Unipolar, Polar, Bipolar & Manchester | Digital Communication](https://www.youtube.com/watch?v=daf9F9NC7zQ) — Engineering Funda
- Answer checked by Claude Opus 5.5 (high effort) on 2026-10-14
- Page: https://www.bctengineer.com/q/semester_8/telecommunications/short-note-line-coding-pcm
- Whole chapter: https://www.bctengineer.com/md/semester_8/telecommunications/chapter-3

## Question

Write a short note on line coding principles in PCM system.

## Short answer

Line coding transforms PCM bits into a waveform suitable for transmission. Requirements include zero DC, sufficient transitions for clock recovery, narrow bandwidth, and error detection via violations. Unipolar NRZ and RZ have DC, AMI fails on long zeros. HDB3 and B8ZS substitute zero runs with violation patterns to guarantee pulse density while retaining AMI's advantages.

## Answer

**Line coding** is the conversion of the binary PCM bit stream into an electrical waveform (pulse pattern) suitable for transmission over the cable and through regenerative repeaters. A plain on–off signal has DC, loses timing on long runs and gives no error check, so a line code is always used.

#### Requirements of a good line code
- **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.**

#### Common line codes
```text
 data:     1   0   1   1   0   0   0   0
          +---+   +-------+
 NRZ-L    |   |   |       |
 (unipol) +   +---+       +---------------  0

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

          +---+       +---+
 AMI      |   |       |   |
       ---+   +---+   +   +---+------------ 0
                  |   |   (no pulses
                  +---+    for 0s)
```
1. **Unipolar NRZ:** 1 = +V, 0 = 0 for the full bit. Simple, but has large DC and no timing in long runs. Not used on lines.
2. **Polar NRZ:** 1 = +V, 0 = −V. DC is zero only for balanced data; poor timing.
3. **Unipolar RZ:** pulse for half a bit for 1s. Has DC, double bandwidth, timing lost on 0-runs.
4. **Manchester (biphase):** a transition in the middle of every bit. Excellent timing and no DC, but needs twice the bandwidth; used in Ethernet, not on PCM trunks.
5. **Bipolar AMI:** 0 = no pulse, 1s alternately + and −. No DC, energy concentrated around $f_b/2$, and bipolar violations reveal errors. Its weakness: long runs of zeros give no pulses, so repeaters lose timing.
6. **HDB3:** AMI in which each string of four zeros is replaced by 000V or B00V (chosen so violations alternate). At most three zeros in a row. Standard for E1/E2/E3.
7. **B8ZS:** AMI in which eight zeros are replaced by 000VB0VB. Standard for T1; B3ZS/B6ZS for higher T levels.
8. **CMI, 4B3T, 2B1Q:** used on some interfaces and ISDN lines.

Example HDB3 coding (first pulse +):
| Data | 1 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| AMI | + | 0 | − | + | 0 | 0 | 0 | 0 | − | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | + |
| HDB3 | + | 0 | − | + | 0 | 0 | 0 | +V | − | 0 | 0 | 0 | −V | +B | 0 | 0 | +V | − |

#### Choice
| Code | DC free | Timing | Bandwidth | Error check | Use |
|---|---|---|---|---|---|
| NRZ | No | Poor | Low | No | Inside equipment |
| Manchester | Yes | Excellent | High | Partly | LAN |
| AMI | Yes | Fails on 0-runs | Low | Yes | Early T1 |
| HDB3 | Yes | Good | Low | Yes | E1–E3 |
| B8ZS | Yes | Good | Low | Yes | T1 |

Thus PCM lines use bipolar codes with zero substitution (HDB3, B8ZS), which keep AMI's low bandwidth and zero DC while guaranteeing clock content.

## Check yourself

The answer's key points as multiple-choice questions, with the correct option and why.

1. How do regenerative repeaters get their clock?
   A. From a separate clock cable
   B. From the transitions of the received signal
   C. From the DC level of the signal
   D. From the sampling frequency of the voice
   Answer: B. Repeaters extract timing from transitions, so the code must have enough transitions for any data. (Key point: Timing content)

2. What is the trade-off of Manchester (biphase) coding?
   A. It has DC and poor timing
   B. It cannot be used on any line
   C. It has no transitions
   D. Excellent timing and no DC, but needs twice the bandwidth
   Answer: D. A mid-bit transition in every bit gives timing and no DC but doubles the bandwidth, so it is used in LANs not PCM trunks. (Key point: Manchester trade-off)

3. Which pairing of zero-substitution code and system is correct?
   A. HDB3 for E1-E3, B8ZS for T1
   B. HDB3 for T1, B8ZS for E1
   C. Both only for ISDN
   D. HDB3 replaces eight zeros, B8ZS replaces four
   Answer: A. HDB3 replaces four zeros and is used on E1/E2/E3; B8ZS replaces eight zeros and is used on T1. (Key point: HDB3 versus B8ZS)

4. Which is a drawback of unipolar RZ?
   A. Zero DC but no timing
   B. Has DC, double bandwidth and loses timing on 0-runs
   C. Too narrow a spectrum
   D. It detects errors but has no DC
   Answer: B. Half-width pulses double the bandwidth, the average is not zero, and 0-runs give no pulses. (Key point: Unipolar RZ drawbacks)

## Related in Telecommunications

- [Line coding in PCM and the right technique](https://www.bctengineer.com/question.md?key=semester_8%2Ftelecommunications%3Aline-coding-pcm-solution) — Telecommunications, chapter 3
- [Line coding and NRZ, RZ, AMI](https://www.bctengineer.com/question.md?key=semester_8%2Ftelecommunications%3Aline-coding-nrz-rz-ami) — Telecommunications, chapter 3
- [Pulse stuffing and complete TDM PCM system](https://www.bctengineer.com/question.md?key=semester_8%2Ftelecommunications%3Amultiplexing-pulse-stuffing-tdm-pcm) — Telecommunications, chapter 3
- [PCM switching and three-stage crosspoints](https://www.bctengineer.com/question.md?key=semester_8%2Ftelecommunications%3Apcm-switching-crosspoints-4x5) — Telecommunications, chapter 4

## Related in other subjects

- [B8ZS line coding](https://www.bctengineer.com/question.md?key=semester_5%2Fdata_communication%3Ab8zs-coding) — Data Communication, chapter 5, asked 2×
- [HDB3 (HD3S) line coding](https://www.bctengineer.com/question.md?key=semester_5%2Fdata_communication%3Ahdb3-coding) — Data Communication, chapter 5, asked 2×
- [Line coding waveforms for 1101110111](https://www.bctengineer.com/question.md?key=semester_5%2Fdata_communication%3Aline-coding-1101110111) — Data Communication, chapter 5
- [Line coding: polar RZ and bipolar AMI](https://www.bctengineer.com/question.md?key=semester_5%2Fdata_communication%3Aline-coding-polar-rz-ami) — Data Communication, chapter 5
