Skip to main content

Line coding: properties; encode 01001100011

Short answer

Unipolar NRZ-L: 1=+V, 0=0V; NRZ-I: toggle at 1, start low; RZ: 1=+V half-bit, 0=0V. Polar NRZ-L: 1=+V, 0=-V; NRZ-I: toggle at 1; RZ: 1=+V half-bit, 0=-V half-bit. Manchester: 1=low-to-high, 0=high-to-low mid-transition. AMI: 0=0V, 1s alternate ±V: 0+00-+000-+.

What is line coding? What are the desired properties of a line code? Encode the bit stream 01001100011 using the following encoding schemes: Unipolar NRZ-L, Unipolar NRZ-I, Unipolar RZ, Polar NRZ-L, polar NRZ-I, polar RZ, Manchester, and Alternate Mark Inversion (AMI).

Line coding

Line coding is the conversion of digital data (bits) into a digital signal (voltage levels) for transmission.

Desired properties of a line code

  1. No DC component (or small), so it passes through transformers and AC-coupled links.
  2. Self-synchronisation: enough transitions so the receiver can recover the clock, even for long runs of 0s or 1s.
  3. Narrow bandwidth (low baud rate for the data rate).
  4. Error detection capability (for example AMI violations).
  5. Noise immunity and low error rate.
  6. Low cost and simplicity, with no ambiguity in decoding.
  7. Polarity insensitivity (as in NRZ-I and differential Manchester).

Encoding of 0 1 0 0 1 1 0 0 0 1 1

Conventions used (state these in the exam, as books differ): level before the first bit is low (-V); NRZ-L/RZ: 1 = +V, 0 = -V (unipolar: 0 = 0 V); NRZ-I: a 1 toggles the level at the start of the bit, a 0 keeps it; RZ: the pulse returns to zero in the middle of the bit; Manchester: 1 = low-to-high and 0 = high-to-low transition at mid-bit; differential Manchester: always a mid-bit transition, an extra transition at the start of the bit for a 0 and none for a 1; AMI: 0 = 0 V, 1s alternate +V and -V starting with +V.

Unipolar NRZ

      0   1   0   0   1   1   0   0   0   1   1  
+V       |---|       |-------|           |-------
 0   ----|   |-------|       |-----------|

Unipolar NRZ-I

      0   1   0   0   1   1   0   0   0   1   1  
+V       |-----------|   |---------------|   |---
 0   ----|           |---|               |---|

Unipolar RZ

      0   1   0   0   1   1   0   0   0   1   1  
+V       |-|         |-| |-|             |-| |-| 
 0   ----| |---------| |-| |-------------| |-| |-

Polar NRZ-L

      0   1   0   0   1   1   0   0   0   1   1  
+V       |---|       |-------|           |-------
 0       |   |       |       |           |       
-V   ----|   |-------|       |-----------|

Polar NRZ-I

      0   1   0   0   1   1   0   0   0   1   1  
+V       |-----------|   |---------------|   |---
 0       |           |   |               |   |   
-V   ----|           |---|               |---|

Polar RZ

      0   1   0   0   1   1   0   0   0   1   1  
+V       |-|         |-| |-|             |-| |-| 
 0     |-| |-| |-| |-| |-| |-| |-| |-| |-| |-| |-
-V   --|     |-| |-|         |-| |-| |-|

Manchester

      0   1   0   0   1   1   0   0   0   1   1  
+V   --|   |---| |-|   |-| |---| |-| |-|   |-| |-
 0     |   |   | | |   | | |   | | | | |   | | | 
-V     |---|   |-| |---| |-|   |-| |-| |---| |-|

Bipolar AMI

      0   1   0   0   1   1   0   0   0   1   1  
+V       |---|           |---|               |---
 0   ----|   |-------|   |   |-----------|   |   
-V                   |---|               |---|

AMI pulses: 0 + 0 0 - + 0 0 0 - +.

✓ Answer checked by Claude Sonnet 5.5

All Data Communication chapter 5 questions →