Comparision Line Coding
Comparision Line Coding
Module -31
Line Coding
Table of Contents
1. Introduction
2. Characteristics of Line Coding
3. Various Line Coding Schemes
3.1 Unipolar line coding
3.1.1 Unipolar Non Return to zero (NRZ)
3.2.3 Biphase
3.3.2 Pseudoterenary
Learning outcome –
Electronic Communication
Electronic Science
31. Line Coding
2
1. Introduction
The long haul communication systems typically involve serial transmission of data either
synchronous or asynchronous. Such serial transmission of data over the coaxial cables, optical fiber
or RF link requires the suitable encoding of binary data so that highs and lows in the signal can be
detected appropriately. Also the signal during transmission through any type of communication
channel wired or wireless suffers from attenuation and distortion, which is more severe in long haul
data transmission channel. Hence for efficient communication, tuning the signal properties to the
characteristics of physical channel is necessary.
Information to be transmitted can be encoded in either digital or analog signal using different
encoding techniques.
Line coding refers to the process of converting a sequence of binary digits i.e., bits or digital data into
a digital signal. Line coding is implemented for digital transmission of binary information. As seen in
fig 1, at the sending end digital data are encoded into a digital signal and at the receiving end original
digital data is recovered by decoding the digital signal.
Data are encoded in a way that the timing information of the bit stream is maintained and the logic
levels 1’s and 0’s can be detected.
The major application of line coding in data communication is to perform base band modulation of
the digital data.
Electronic Communication
Electronic Science
31. Line Coding
3
Data Rate
Bandwidth
DC components
Baseline wandering
Self Synchronization
Error Detection
Noise Immunity
Electronic Communication
Electronic Science
31. Line Coding
4
1. Data Rate: It represents the number of data bits transmitted per second. The unit is bits per
second. The data rate should be increased to increase the data transmission speed.
2. Signal Rate or Baud Rate: Baud rate is the measure of signaling element or symbols sent per
second. A symbol in some case could be a binary logic level 0 or 1. In that case, baud rate is equal
to bit rate. In other cases, the symbol is one of the several discrete signal amplitudes or phase
shifts each representing two or more data bits. The unit is baud. Baud rate can be more or less
than the data rate. The signal rate should be decreased to decrease the bandwidth requirements.
3. Bandwidth: Bandwidth is the frequency range over which an information signal is transmitted. It
dictates the amount of data sent over time and influences the choice of digital modulation scheme.
Digital signal has theoretically infinite bandwidth but practically the effective bandwidth is finite.
The baud rate determines the digital signal bandwidth required.
4. DC components : Very low frequencies around zero which are the consequence of existence of
constant voltage level in a digital signal are known as Direct current or DC components. These
components significantly induce problems in the systems using transformer coupling and since
most channels are band pass, they may not support the low frequency signals. Hence line coding
schemes with no DC components are required for such systems.
5. Baseline wandering: A receiver will evaluate the average power of the received signal (called
the baseline) and use that to determine the value of the incoming data elements. If the incoming
signal does not vary over a long period of time, the baseline will drift and thus cause errors in
detection of incoming data elements. A good line encoding scheme will prevent long runs of fixed
amplitude.
6. Self Synchronization: The clocks at the sender and the receiver must have the same bit interval.
If the receiver clock is faster or slower it will misinterpret the incoming bit stream. A transmitted
self synchronizing digital signal includes timing information in the data. Clock signal is recovered
from the receiving bit sequence by observing the transitions and if sufficient transitions exist, a
good recovery of the clock is guaranteed. Such a signal is said to be self-clocking.
7. Error Detection: Ideally digital communication system should be free from any error that gets
incorporated into the data during transmission. Hence it is desirable to implement some
modifications in the data allowing built in error detection capabilities. This can enhance the
receiver’s capability to detect and correct error. The transmission system used and adopted digital
encoding techniques influence the error detection and correction.
Electronic Communication
Electronic Science
31. Line Coding
5
8. Noise Immunity: The selected encoding scheme should be immune to noise and external
interferences. We are already aware that any signal during transmission through any type of
communication channel suffers from attenuation and distortion. So the requirement is to encode
the signal using an encoding scheme imparting high noise immunity.
9. Complexity and imple mentation cost: An encoding scheme that is complex, is costly to
implement. Interpretation of any scheme that involves more signal levels is difficult. So the
encoding technique should be simple so as to prevent high cost of implementation.
Line codes are classified according to the assigned polarity of voltage levels to represent the binary
data. We can categorize line coding schemes into three major types as shown in fig 3.
LINE
CODING
PSEUDOTERNA
NRZ-L MANCHESTER RY
DIFFERENTIAL
NRZ-I MANCHESTER
3.1 Unipolar line coding: This type of scheme makes use of one polarity of voltage to represent
logic states. More precisely, positive voltage is used to represent a logic high state and an idle line or
zero to represent low logic low state. Here the baud rate is same as the data rate. This encoding
scheme, suffers from the disadvantage of having undesirable DC component present in the signal
encoded and for long sequence of 0’s and 1’s there will be loss of synchronization. Though unipolar
is a simple scheme, but it is not preferred for long haul communication. This type of line coding
Electronic Communication
Electronic Science
31. Line Coding
6
scheme is also called on–off keying (OOK). As shown in fig 4, unipolar line coding can be classified
into two major types, Non Return to zero (NRZ) and Return to zero (RZ).
unipolar
NON RETURN
RETURN TO
TO ZERO
ZERO(rz)
(nrz)
In NRZ line coding, logic 1 is represented by a non-zero voltage level, precisely a positive voltage
and logic 0 is indicated by a zero voltage level as shown in fig 5. The signal level does not return to
zero for the entire bit interval during the transmission of a signal. In unipolar NRZ encoding, the
signal level remains constant throughout the bit- interval. The encoded signal has an undesirable DC
component and lack of self synchronizing capabilities.
• The transmission normalized power for a single bit per unit line resistance is double than their
polar counterparts.
Electronic Communication
Electronic Science
31. Line Coding
7
NRZ coding suffers from lack of synchronization, non-zero dc component and baseline wandering.
To overcome the shortcomings of the NRZ, return to zero (RZ) code was developed.
This scheme like NRZ, also make use of only single voltage polarity with zero to determine the
binary logic state. As shown in fig 6, in RZ line coding, logic 1 is represented by a non-zero voltage
level, precisely a positive voltage during a portion of the bit interval and a transition to zero at the
middle point of the bit interval. Logic 0 is indicated by a zero voltage level during the entire bit
interval. Therefore a RZ signal pulse is only half the length of NRZ pulse. This implies that unipolar
RZ requires twice the bandwidth of the NRZ code. The main advantage of unipolar RZ is, ease of
generation since it implements a single power supply.
Features:
Electronic Communication
Electronic Science
31. Line Coding
8
• Along string of 0’s will lack pulse transitions and could lead to loss of synchronization.
• There is no error detection capability and, hence, performance monitoring is not possible.
This line encoding method uses two voltage levels of opposite polarity and equal magnitude that is,
one positive and the other one negative to represent the two binary states 0 and 1. As shown in fig7, it
can be classified into three major types, Non Return to zero (NRZ), Return to zero (RZ) and Biphase.
polar
It is the most common and easy way to transmit binary data where a positive voltage level represents
one bit and an equal magnitude negative voltage level represents the other. Also, here the signal level
remains constant throughout the bit- interval. The average dc component is zero.
As the polar NRZ signal has more r.m.s value than their unipolar counterparts, they can carry more
energy. This will aid in better signal to noise ratio at the receiving end. The drawback of polar NRZ,
however, is that it lacks error detection capability when the transmitted signal has a long sequence of
0’s or 1’s. This problem is overcome in polar RZ signals, as the signal drops to zero in the middle of
each bit interval.
The Polar NRZ code is used to transmit signals on a computer motherboard. It is also used Fiber-
based Gigabit Ethernet.
Electronic Communication
Electronic Science
31. Line Coding
9
There are two types of NRZ polar encoding schemes as seen in fig 8 namely, Non-Return-to-Zero-
Level (NRZ-L) and Non-Return-to-Zero, Invert (NRZ-I).
polar NRZ
Features:
• Has more r.m.s value than unipolar NRZ, so can carry more energy.
In NRZ-L, the voltage level determines the bit value. Binary 1 is represented by a negative voltage
and Binary 0 is represented by a positive voltage as shown in fig 9. This encoding scheme suffers
from the issue of baseline wandering.
Electronic Communication
Electronic Science
31. Line Coding
10
The major limitation of the NRZ and unipolar RZ is the lack of synchronization between the transmitter
and receiver clocks. This in turn does not allow the receiver to detect the end of one bit and start of the
next bit in the received data stream. Also such encoded signals have non zero dc components. Such
deficiencies are overcome by some modifications imparted to the coding scheme which involves the use
of polar and bipolar signals.
Electronic Communication
Electronic Science
31. Line Coding
11
A polar return to zero (RZ) has three voltage levels – positive, negative and zero to encode the data
stream. This scheme requires two transitions per bit interval for data encoding. Hence the encoded signal
requires higher bandwidth. Fig 11 shows the polar RZ encoding scheme. A transition from negative
voltage to zero voltage level indicates logic 0, where as a transition from positive voltage to zero
voltage level indicates logic 1.
With the increase in the number of transitions, the synchronization between the transmitter and receiver is
good leading to the self synchronizing capability. There is no dc component and baseline wandering
problem in this scheme. One of the major issues with this scheme is the complexity in generating the code
which incur due to the use of three voltage levels. Keeping in mind the deficiencies of this code, it has
now been replaced by other efficient codes like Manchester and Differential Manchester.
In order to overcome the limitations of NRZ encoding, biphase encoding techniques are used. The
most common biphase techniques are Manchester and Differential Manchester Coding. Such
encoding techniques are phase encoded code.
This code uses two voltage levels, positive and negative of equal magnitude to represent logic states.
Each bit of data is represented by at least one transition in the middle of the bit interval. During the
first half of the bit interval, the signal pulse has one voltage level and in the second half, it moves to
the other voltage level.
Electronic Communication
Electronic Science
31. Line Coding
12
The code is also called biphase as it uses two phases, a signal pulse with a 0 phase is used to represent
one binary logic and signal pulse with 180 phase to represent the other. It is a combination of NRZ-L
and RZ schemes as shown in fig 12. Binary 0 is represented by a high to low voltage transition at the
mid bit interval. Binary 1 is indicated by a low to high voltage transition at the mid bit interval.
Since each data bit is represented by at least one mid bit transition, it has the ability of self
synchronization allowing easy clock recovery of clock at the receiving end from the data stream. Also
no DC component is present in the encoded signal.
The major disadvantage of this type of coding is the requirement of a higher bandwidth which is
almost twice of unipolar or polar NRZ.
Like Manchester coding, it uses two voltage levels to represent logic states as shown in fig 13. Each
bit of data is represented by at least one transition in the middle of the bit interval. The bit value at the
beginning of the bit interval determines the logic state. The code also uses two phases to represent
binary logic states as is used in Manchester coding. It is a combination of NRZ-I and RZ schemes. It
has the ability of self synchronization, dc component is absent in the encoded signal. It requires twice
of unipolar or polar NRZ bandwidth.
Electronic Communication
Electronic Science
31. Line Coding
13
Differential Manchester coding is utilized in token ring network, in magnetic and optical storage.
A bipolar encoding uses a three-voltage- level signal positive, negative and zero to represent logic
states. Bipolar signals may be RZ or NRZ. The presence of alternating code in this encoding prevents
the build- up of a DC voltage in transmission lines.
The existence of long sequence of 0’s and 1’s produces no transitions in the data stream, and
therefore the loss of synchronization arises. Here, there is no mid bit transition. Hence lesser
bandwidth is required.
The most common bipolar encoding techniques as shown fig 14 are alternate mark inversion (AMI)
and Pseudoternary coding.
bipolar
BIPOLAR
ALTERNATE MARK PSEUDOTERNARY
INVERSION (AMI)
Electronic Communication
Electronic Science
31. Line Coding
14
Bipolar AMI - Amplitude Mark Inversion coding technique uses three voltage levels- positive,
negative and zero to represent the binary states. One logic state is represented by zero level and the
other alternates between positive and negative voltage level. As seen in the fig 15, unlike Return to
Zero, zero level represent binary 0 while b inary 1 alternates between positive and negative voltage
level. Hence this code is known as Alternate Mark Inversion.
In AMI, long run of 0's produces no transitions in the data stream and a loss of synchronization is
possible. AMI coding was used in first-generation digital telephony PCM networks.
The term Pseudoternary refers to the use of 3 encoded signal levels to represent two–level (binary)
data. The alternating positive and negative pulses represent binary 0. As seen from the fig 16, first
binary zero is indicated by +V and second binary zero by –V. Pseudoternary is the reverse of AMI.
Based on what different types of encoding schemes discussed so far, comparisons of their features are
indicated by table-1. Starting with the bandwidth requirements of each code, unipolar NRZ, polar
NRZ and Differential NRZ have low bandwidth requirement, bandwidth requirement of Manchester
coding is high and that of Differential Manchester coding is moderate.However, we have seen that
Manchester and Differential Manchester encoding gives very good synchronization facility. That
means a signal with long sequence of 0s or 1s it will not lead to synchronization failure a s the
receiver will regenerate the signal without any problem.
Unipolar NRZ has high DC component which makes them unsuitable for long haul communication
where as polar NRZ, polar RZ, Manchester, Differential Manchester, AMI, and Pseudoterenary coded
signals have no dc component present.
Bandwidth
Code Synchronization DC Component
requirement
Loss of
Unipolar NRZ Low High
synchronization
Loss of
Polar NRZ Low Zero
synchronization
Loss of
Unipolar RZ Twice of UNRZ High
synchronization
Polar RZ High Good Zero
Manchester High Good Zero
Differential
Moderate Good Zero
Manchester
Loss of
AMI low Zero
synchronization
Loss of
Pseudoterenary low Zero
synchronization
Electronic Communication
Electronic Science
31. Line Coding
16
Now let us see the representation of a binary data sequence 01110110 in fig 17 using different line
coding techniques studied so far.
5. Summary
Electronic Communication
Electronic Science
31. Line Coding