---
title: "Short note: Line codes"
subject: "Communication Systems"
chapter: 6
key: "semester_6/communication_systems:short-note-line-codes"
source: https://www.bctengineer.com/q/semester_6/communication_systems/short-note-line-codes
site: BCT Engineering
---

# Short note: Line codes

Communication Systems · Chapter 6: Baseband Digital Data Transmission

- Asked in: 2072 Kartik (CS II), 4 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_6/communication_systems/short-note-line-codes
- Whole chapter: https://www.bctengineer.com/md/semester_6/communication_systems/chapter-6

## Question

Write a short note on 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).

## Answer

**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:**

| Code | Rule | Notes |
|---|---|---|
| Unipolar NRZ | 1 → $+V$, 0 → 0 | Simple; has DC, poor timing |
| Polar NRZ | 1 → $+V$, 0 → $-V$ | Better noise immunity; DC for unequal 1s and 0s |
| Unipolar/Polar RZ | Pulse for half bit only | Edges each bit; double bandwidth |
| AMI (bipolar) | 0 → 0, 1s alternate ± | No DC; detects single errors; long 0 runs lose timing |
| Manchester | 1 → +/−, 0 → −/+ | Self-clocking, no DC; double bandwidth (Ethernet) |

Example for data 101100:

```text
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.

## Check yourself

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

1. What is line coding?
   A. Converting binary data into a digital electrical waveform for baseband transmission
   B. Adding parity bits to data
   C. Modulating a carrier with bits
   D. Compressing source symbols
   Answer: A. Line coding maps data bits to pulse patterns suitable for a baseband channel. (Key point: Definition of line coding)

2. Which property of a line code helps clock recovery in long runs of 0s or 1s?
   A. Large amplitude
   B. Enough transitions in the waveform
   C. Zero DC component
   D. Single polarity
   Answer: B. Transitions let the receiver extract timing; Manchester has one in every bit. (Key point: Timing recovery)

3. Which statement about Manchester code is correct?
   A. It has DC and poor timing
   B. It is self-clocking with no DC but needs double bandwidth
   C. It uses three levels and half bandwidth
   D. It cannot be used for Ethernet
   Answer: B. Mid-bit transitions give self-clocking and zero DC at the cost of double bandwidth. (Key point: Manchester properties)

4. What is a weakness of AMI?
   A. It has a DC component
   B. Long runs of 0s lose timing
   C. It cannot detect any errors
   D. It needs double bandwidth
   Answer: B. AMI has no DC and detects single errors, but zeros give no transitions; HDB3/B8ZS fix this. (Key point: AMI properties)

## Related in Communication Systems

- [Definitions of unipolar, polar, bipolar, RZ, Manchester codes](https://www.bctengineer.com/question.md?key=semester_6%2Fcommunication_systems%3Adefine-line-codes) — Communication Systems, chapter 6, asked 2×
- [Line coding 1011001010 (polar NRZ, polar RZ, Manchester, AMI)](https://www.bctengineer.com/question.md?key=semester_6%2Fcommunication_systems%3Aline-codes-1011001010) — Communication Systems, chapter 6, asked 8×
- [Line coding 1001001101 (polar NRZ, polar RZ, Manchester, AMI)](https://www.bctengineer.com/question.md?key=semester_6%2Fcommunication_systems%3Aline-codes-1001001101) — Communication Systems, chapter 6, asked 8×
- [Line coding 1001101101 (unipolar NRZ, polar RZ, AMI, Manchester)](https://www.bctengineer.com/question.md?key=semester_6%2Fcommunication_systems%3Aline-codes-1001101101) — Communication Systems, chapter 6, asked 8×
- [Line coding 1101010111 (polar NRZ, polar RZ, Manchester, AMI)](https://www.bctengineer.com/question.md?key=semester_6%2Fcommunication_systems%3Aline-codes-1101010111-polar-ami) — Communication Systems, chapter 6, asked 8×
- [Line coding 10110101 (polar NRZ, unipolar RZ, AMI, Manchester)](https://www.bctengineer.com/question.md?key=semester_6%2Fcommunication_systems%3Aline-codes-10110101) — Communication Systems, chapter 6, asked 8×

## Related in other subjects

- [Encode 1010011001 with five line codes](https://www.bctengineer.com/question.md?key=semester_5%2Fdata_communication%3Aline-coding-1010011001) — Data Communication, chapter 5
- [Encode 10110001110 with five line codes](https://www.bctengineer.com/question.md?key=semester_5%2Fdata_communication%3Aline-coding-10110001110) — Data Communication, chapter 5
- [Line coding and NRZ, RZ, AMI](https://www.bctengineer.com/question.md?key=semester_8%2Ftelecommunications%3Aline-coding-nrz-rz-ami) — Telecommunications, chapter 3
