Physical Layer - Line Coding
Dr. Kiran Manjappa
Dept. of IT, NITK
Today’s Session
● Line Coding.
○ How data is transmitted in the physical layer ?
Data in South Bound Interfaces
00101010101010101001010101
01010100101010101001010101
Cable
Line Coding
● Converts Digital Data into Signals.
Line Coding
One Pulse / One Cycle
● Basically Variation of Voltage.
● At the sender end, digital data is converted into signals - Encoding.
● At the receiver end, signals are converted into digital data - Decoding.
● Directly transmitted in Communication channels (TP, Coax…).
● Three Types: Uniploar, Polar, and Biploar
Unipolar
NRZ (Non Return to Zero)
● Positive Voltage - Bit 1, No Voltage - Bit 0.
● Voltage will not come to zero in the middle of the cycle/bit,
○ Hence, Non Return to Zero (NRZ)
Time
Unipolar
NRZ (Non Return to Zero)
● Uses only Positive Voltage - Bit 1, No Voltage - Bit 0.
● Voltage will not come to zero in the middle of the bit,
○ Hence, Non Return to Zero. (NRZ)
○ One bit time : 0.1 microseconds
Image Source: https://www.geeksforgeeks.org/difference-between-unipolar-polar-and-bipolar-line-coding-schemes/
Advantages Disadvantages
● It is simple
● Lesser bandwidth is required.
Disadvantages
● No Error Correction
● Synchronization problem for the long series of 1’s or 0’s.
Unipolar
RZ (Return to Zero)
● Positive Voltage - Bit 1, No Voltage - Bit 0.
● For half of the bit duration, voltage will be high, then returns to zero.
● For remaining half of the bit, voltage will be zero.
● Voltage will come to zero in the middle of the bit,
○ Hence, Return to Zero.(RZ)
1 0 1
Image Source: https://www.geeksforgeeks.org/difference-between-unipolar-polar-and-bipolar-line-coding-schemes/
Advantages Disadvantages
● It is simple
● Only half bandwidth is used.
Disadvantages
● No Error Correction
● Synchronization problem for the long series of 0’s.
Polar
● Use both levels of Voltages.
● Use both side of the x axis.
● Two Types - NRZ and RZ
Polar NRZ
Complete Cycle will be used for
Both 1 and 0
+ve Voltage - 1 bit
-ve Voltage - 0 bit
Advantages Disadvantages
● It is simple
Disadvantages
● No Error Correction
● Occupies twice the bandwidth when compared to unipolar
○ For both one and zero voltage, either +ve or -ve.
● Synchronization problem for the long series of 1’s or 0’s.
Polar RZ
Returns to zero in the middle of the bit.
Half of the +ve voltage in a bit = 1
Half of the -ve voltage in a bit = 0
1 0 0 1 100011
0 1
Advantages Disadvantages
● It is simple
Disadvantages
● No Error Correction
● Occupies twice the bandwidth when compared to unipolar
○ For both one and zero voltage should be there, either +ve or -ve.
● Synchronization problem for the long series of 1’s or 0’s.
Bipolar
● As same as Unipolar
● But, Alternative ones will be inverted.
○ Hence also referred to as Alternate Mark Inversion (AMI)
● It has three types of voltages, +Ve, -Ve and 0.
○ Such a signal is called as duo binary signal.
Advantages Disadvantages
● It is simple
● Single Bit error correction is possible.
Disadvantages
● Occupies twice the bandwidth when compared to unipolar
○ For both one and zero voltage should be there, either +ve or -ve.
● Synchronization problem for the long series of 1’s or 0’s.
Manchester Coding
● Uses both +ve and -ve voltage for representing 0’s and 1’s.
● Each bit consists of both a positive and a negative pulse, Hence aka bi-phase encoding.
Manchester Coding - History
● How it got its name ?
○ G. Thomas Invented it.
○ For the Manchester Mark 1 Computer
○ In University of Manchester, UK - 1948
● Early Ethernet standards (10 Mbps, IEEE802.3) used Manchester coding
● Its optimized versions are widely used in today’s internet.
Advantages
● Though bandwidth utilization is high, Multiple Error Detection and correction is possible.
● Synchronous, No Confusion.
Conclusion
Physical Layer
1. Multiplexing
2. Switching
3. Line Coding
Thank You