Unit 2: Line coding
By: Vandana Mehndiratta
Line Coding
• Line coding refers to the process of converting digital data into
digital signals. Whenever we transmit data it is in the form of
digital signals, so with the help of line coding, we can convert a
sequence to bits (or encoding) into a digital signal which then
again converted into bits by the receiver (or can be said as
decoded by the receiver). For all this to happen we need line
coding schemes which could also be able to avoid overlapping
and distortion of signals.
Characteristics of Line Coding
• Less complexity.
• Should have noise and interference tolerance.
• No DC component (or say low-frequency component) should be
there because it can't be transferred to larger distances.
• Least baseline wandering should be there (baseline wander:
low-frequency noise having nonlinear and non-stationary
nature).
• Should have error detection capability.
• Should be self-synchronized.
Types of Line Coding
1. Unipolar
2. Polar
3. Bipolar
1. Unipolar:
• In Unipolar we are simply representing a signal in a graphical form
where positive voltage represents logical or binary 1 and zero
voltage represents logical zero. We can say that it's the simplest
line code. The drawback of this scheme is that it is not
self-clocking which means that it can't be decoded without a
separate clock signal or any other synchronization source. And as
we discussed in the characteristics section that there should be no
DC component present which it significantly contains, which can
be halved by returning to zero in the middle of the bit period.
NRZ (Non-Return to Zero):
• The term Non-Return to Zero (NRZ) means that the signal (the
red line in the above diagram) will not return to zero in middle of
the bit (i.e. either 0 or 1). Unipolar schemes were generally
designed as NRZ schemes. But if we compare it to the polar
NRZ scheme, this scheme leads to wastage of power i.e. the
normalized power (i.e. the power required to send 1-bit per
resistance) is almost double as compared to polar NRZ.
• Because of all these reasons unipolar encoding is not normally
used in data communications today.
Polar Line Coding
• As its name suggests polar which means it will have both
positive and negative values for voltages or amplitude, it is quite
like NRZ scheme but, here we have NRZ-L (i.e. NRZ-Level) and
NRZ-I (i.e. NRZInvert).
In this diagram, we can simply notice
that high volt is for logical 0 and low
volt is for logical 1. This is the
representation of NRZ-Level.
Now in this one, the idea is that whenever we encounter
logical 1 then the signal will be inverted, but when it
encounters logical 0 then it remains on the same side. This is
the NRZ-Invert.
The Baseline wandering is a problem for both of them, but for
NRZ-L it is twice as bad as compared to NRZ-I, because of
the transition at the boundary for NRZ-I. similarly, the
self-synchronization problem is similar in both for a long
sequence of 0’s, but for a long sequence of 1’s, it is more
Return to Zero (RZ): severe in NRZ-L.
Return to zero proved out to be a nice alternative or
say a solution to NRZ drawbacks. Unlike NRZ, RZ uses
three values of voltage i.e. positive, negative, zero. And
as the name suggests it returns to zero in the middle of
each bit.
The idea behind the above representation is that logical
1 is represented as half-positive and half-zero volts and
the logical 0 is represented as half negative and
half-zero volts.
• Drawbacks:
• Requires a large bandwidth for transmission.
• Complex encoding as it uses three levels of voltages
• This scheme is not used nowadays and is replaced by Manchester
encoding & Differential-Manchester encoding.
3. Bipolar Line Coding: Bipolar consists of three voltage levels which
are positive negative and zero. While representing, the voltage level
for one bit of data is at zero, and the other bit inverts of transits or
alternates between positive and negative voltage.
ALTERNATE MARK INVERSION(AMI): the representation here
follows a simple logic that is, for representing logical 0 we use zero
voltage, and while representing logical 1 we use alternating positive
and negative voltages, which can be seen in the image below.
Pesudoternary: this is the opposite of AMI, as we kept logical 0 at 0 volts or neutral in the above section,
here we will be keeping logical 1 as neutral (i.e. at 0 volts) and we will keep alternating logical zero, we
can see that in the image below.
The bipolar scheme or encoding proved
to be an alternative for NRZ encoding
because bipolar has the same signal rate
as NRZ, and also it was not having any
low frequency or DC component in it, as
one bit is represented by zero volts and
the other is represented by alternating
voltages.