Line Codes
Line Codes
Shounak Dasgupta
JU, 6/27/2017 1
Elements of Digital Communication
10100111001
Information D/ A Digital
Line Decoder
Sink Converter Demodulator
JU, 6/27/2017 2
A/D Line Digital
Source
Converter Encoder Modulator
JU, 6/27/2017 3
Digital Data Transmission
JU, 6/27/2017 4
What is Line Coding?
• Binary 1’s and 0’s, such as in PCM signaling, may be represented in various
serial–bit signaling formats called line codes.
• The binary data is converted into an electrical signal in order to transmit them
in the channel
• The simplest is to represent ‘1’ by a square pulse and ‘0’ by 0 volt. But the
simplest is not always good enough. Also, a long sequence of ‘0’ may appear
as a loss of transmission.
• Different wave shapes result in different spectrum suiting different needs.
Hence in a way, line codes are also spectrum shaping codes.
JU, 6/27/2017 5
Why Line Coding?
There are many reasons for using line coding. Each of the line codes offers one
or more of the following advantages:
Spectrum Shaping and Relocation without modulation or filtering. This is
important in telephone line applications, for example, where the transfer
characteristic has heavy attenuation below 300 Hz.
Bit clock recovery can be simplified.
DC component can be eliminated; this allows AC (capacitor or transformer)
coupling between stages (as in telephone lines).
Can control baseline wander (baseline wander shifts the position of the
signal waveform relative to the detector threshold and leads to severe erosion
of noise margin).
Error detection capabilities.
Bandwidth usage; the possibility of transmitting at a higher rate than other
schemes over the same bandwidth.
• At the very least the line-code encoder serves as an interface between the
TTL level signals of the transmitter and those of the analog channel.
JU, 6/27/2017 6
Necessary properties of line code:
1. Self synchronization – It should be possible to recover the clock pulse
from the received data. Clock should not be lost even in case of a long
sequence of ‘0’. Self-synchronization, where the timing information is extracted
from the received signal itself
2. Low probability of bit error – It should be convenient to design a receiver,
which receives the specific line code and results a low probability of bit error.
3. PSD – Spectrum of the line code should suit the physical medium.
4. Band width – Band width of the line coded signal should be low.
5. No DC – DC power content should be ideally zero to enable AC coupling.
6. Low frequency power – Power at very low frequency should as low as
possible.
7. To suit channel coding – Line code should be such that subsequent coding
for error detection/correction is easy.
8. Power efficiency – Required transmission power should be small. = $
9. Transparency – Long sequence of ‘1’ & ‘0’ must be avoided.
JU, 6/27/2017 7
Types of Line Coding:
JU, 6/27/2017 8
Unipolar NRZ (Non Return to Zero)
•Bit 0 is mapped to amplitude close to zero
•Bit 1 is mapped to a positive amplitude
Representation of 0
Tb Tb
Tb
JU, 6/27/2017 9
Advantages:
– Simplicity in implementation: can be generated using TTL or CMOS gates. One
power supply is requirdd.
– Doesn’t require a lot of bandwidth for transmission.
Disadvantages:
– Presence of DC level (indicated by spectral line at 0 Hz), high power
requirement
– Contains low frequency components. Causes “Signal Droop” .
– Does not have any error correction capability.
– Does not posses any clocking component for ease of synchronization.
– Is not Transparent. Long string of zeros causes loss of synchronization.
JU, 6/27/2017 10
Signal Droop
The continuous part of the PSD is also non-zero at 0 Hz (i.e. contains low
frequency components).
AC coupled transmission lines typically behave like high-pass RC filters and the
distortion takes the form of an exponential decay of the signal amplitude after
each transition. This effect is referred to as “Signal Droop” and is illustrated in
figure below.
JU, 6/27/2017 11
DC coupling shows all of an input signal.
AC coupling blocks the DC component of a signal so that you see the
waveform centered around zero volts.
AC coupling is useful when the entire signal (AC+DC) is too large for the
volts/div setting.
The ground setting disconnects the input signal from the vertical system,
which lets you see a horizontal line on the screen that represents zero volts.
JU, 6/27/2017 12
JU, 6/27/2017 13
Unipolar Return to Zero (RZ):
Bit 0 is mapped to amplitude close to zero
Bit 1 is mapped to a positive amplitude +A for the first half of the bit
duration followed by a zero amplitude for the second half of the bit
duration.
Tb Tb
JU, 6/27/2017 14
Advantages:
•Simplicity in implementation.
•Presence of a spectral line at symbol rate which can be used as symbol
timing clock signal. The periodicity can be used for clock recovery.
Disadvantages:
•Presence of DC level (indicated by spectral line at 0 Hz).
•Continuous part is non-zero at 0 Hz. Causes “Signal Droop”.
•Does not have any error correction capability.
•Occupies twice as much bandwidth as Unipolar NRZ.
•Is not Transparent
PSD: The function which
gives distribution of power
of a signal at various
frequencies in frequency
domain.
JU, 6/27/2017 15
Polar NRZ (Non Return to Zero)
•Bit 0 is mapped to a negative amplitude
•Bit 1 is mapped to a positive amplitude
Representation of 0 Representation of 1
Tb
Tb
JU, 6/27/2017 16
Tb
Advantages:
• Simplicity in implementation.
• No DC component.
• Probability of error is less.
Disadvantages:
•Continuous part is non-zero at & near 0 Hz. Causes “Signal Droop”.
•Does not have any error correction capability.
•Does not posses any clocking component for ease of synchronization.
•Is not transparent.
JU, 6/27/2017 17
Polar RZ (Return to Zero)
• A bit 0 is mapped to a negative amplitude −A for the first half of the
symbol duration followed by a zero amplitude for the second half of the
symbol duration.
• A bit 1 is mapped to a positive amplitude +A for the first half of the bit
duration followed by a zero amplitude for the second half of the bit
duration.
Tb
JU, 6/27/2017 18
Tb
Advantages:
•Simplicity in implementation.
•No DC component.
Disadvantages:
•Continuous part is non-zero at 0 Hz. Causes “Signal Droop”.
•Does not have any error correction capability.
•Occupies twice as much bandwidth as Polar NRZ.
JU, 6/27/2017 19
Bipolar Signaling:
•Alternate mark inversion (AMI)•Uses three voltage levels (+V, 0, -V)
Bipolar NRZ:
• Binary “1” is represented by a pulse alternating voltage levels of +V and –V
• Binary “0” is represented with the absence of the pulse
Bipolar RZ:
• Binary “1” is represented by a pulse alternating voltage levels of +V and –V
for half the bit duration.
• Binary “0” is represented with the absence of the pulse.
JU, 6/27/2017 20
Advantages:
•No DC component.
•Occupies less bandwidth than unipolar and polar RZ schemes.
•Does not suffer from signal droop (suitable for transmission over AC coupled
lines).
•Possesses single error detection capability.
Disadvantages:
•Does not posses any clocking component for ease of synchronization.
•Is not Transparent.
JU, 6/27/2017 21
Manchester Signaling:
•The duration of the bit is divided into two halves
• A ‘One’ is +ve in 1st half and -ve in 2nd half.
• A ‘Zero’ is -ve in 1st half and +ve in 2nd half.
• Representation
Bit 0 is sent of
by0having a mid-bit transition from high to
Representation of 1low.
• Bit 1 is sent by having a mid-bit transition from low to high.
JU, 6/27/2017 22
Advantages:
•No DC component.
•Does not suffer from signal droop (suitable for transmission over AC coupled
lines).
•Easy to synchronize.
•Is Transparent.
Disadvantages:
•Because of the greater number of transitions it occupies a significantly large
bandwidth.
•Does not have error detection capability.
It is widely used in Local Area Networks such as Ethernet and Token Ring.
JU, 6/27/2017 23
JU, 6/27/2017 24
Comparative study of line codes:
JU, 6/27/2017 26
JU, 6/27/2017 27