Code360 powered by Coding Ninjas X Naukri.com. Code360 powered by Coding Ninjas X Naukri.com
Table of contents
1.
Introduction
2.
Characteristics of line coding
3.
Techniques of line coding
3.1.
Unipolar line coding
4.
Advantages of Unipolar Line Coding
5.
Disadvantages of Unipolar Line Coding
6.
Polar line coding
6.1.
NRZ(Non-Return to Zero)
6.2.
RZ(Return to zero)
6.2.1.
Manchester and Differential Manchester Encoding
7.
Advantages of Polar Line Coding
8.
Disadvantages of Polar Line Coding
9.
Bipolar line coding
9.1.
Alternate Mark Inversion(AMI)
9.2.
Pseudoternary
10.
Advantages of Bipolar Line Coding
11.
Disadvantages of Bipolar Line Coding
12.
Frequently Asked Questions
12.1.
What is line coding and its types?
12.2.
What is line coding?
12.3.
Why do we use line coding?
12.4.
What is unipolar encoding?
12.5.
What is polar encoding?
12.6.
What is bipolar encoding?
13.
Conclusion
Last Updated: Jun 7, 2024
Easy

Line Coding

Author Aditya kumar
0 upvote
Master Python: Predicting weather forecasts
Speaker
Ashwin Goyal
Product Manager @
Computer Networks

Introduction

Turning digital data into digital signals is known as line coding. Because data is always transmitted in the form of digital signals, we may use line coding to turn a sequence of bits (or encoding) into a digital signal, which is then translated back into bits by the receiver (or can be said to be decoded by the receiver). We'll need line coding systems to avoid signal overlapping and distortion for all of this to happen.

Line Coding

Recommended Topic, Basic Networking Commands

Characteristics of line coding

The first line coding method turns digital data into digital signals. The following are important parameters that characterize line coding schemes.

Line Coding to convert digital data to digital signal
  • There is a minor complication.
  • Tolerance for noise and interference is required.
  • There should be no DC (or low-frequency) component because it cannot be conveyed over longer distances.
  • At the very least, baseline roaming should be present (baseline wander: low-frequency noise having nonlinear and non-stationary nature).
  • Error detection should be possible.
  • It should be synced by itself.
Get the tech career you deserve, faster!
Connect with our expert counsellors to understand how to hack your way to success
User rating 4.7/5
1:1 doubt support
95% placement record
Akash Pal
Senior Software Engineer
326% Hike After Job Bootcamp
Himanshu Gusain
Programmer Analyst
32 LPA After Job Bootcamp
After Job
Bootcamp

Techniques of line coding

Unipolar, Polar, and Bipolar line coding techniques are the three mainline coding techniques.

Types of Line Coding

Unipolar line coding

We simply describe a signal in Unipolar as a graphical representation, with positive voltage representing logical or binary 1 and 0 voltage indicating logical zero. We can call it the most basic line code. This system has the disadvantage of not being self-clocking, which means it cannot be decoded without the need for a separate clock signal or another synchronization source. As covered in the characteristics section, there should be no significant DC component present, which can be reduced by returning to zero amid the bit period.

Unipolar Line Coding

Advantages of Unipolar Line Coding

  • Simplicity: Unipolar line coding involves encoding digital data using a single voltage level, simplifying the encoding and decoding process.
  • Ease of Implementation: Since only one voltage level is used, the hardware required for transmitting and receiving unipolar signals is relatively simple compared to other line coding schemes.
  • Bandwidth Efficiency: Unipolar line coding typically requires less bandwidth compared to other coding schemes, making it suitable for applications with limited bandwidth constraints.

Disadvantages of Unipolar Line Coding

  • DC Component: Unipolar line coding results in a high DC component, as the signal stays at a constant voltage level during the transmission of zeros. This can lead to issues such as baseline wander and increased power consumption.
  • Lack of Signal Reversal: Since only one voltage level is used, there is no signal reversal between consecutive bits. This lack of signal transitions can make it difficult for the receiver to synchronize with the transmitter's clock, leading to clock recovery problems.
  • Susceptibility to Noise: Unipolar signals are more susceptible to noise and interference, as variations in the signal may not be easily distinguishable from the desired data, especially in environments with high noise levels.

Polar line coding

Two voltage levels are used in the polar encoding approach, one positive and the other negative. This category includes four possible encoding systems, which are explained below:

Encoding Schemes under Polar Cateogory

NRZ(Non-Return to Zero)

Non-Return to Zero (NRZ) denotes that the signal (the red line in the figure above) will not return to zero in the middle of the bit cycle (i.e. either 0 or 1). NRZ schemes were commonly used in the construction of unipolar schemes. However, this technique wastes electricity compared to the polar NRZ method, as the normalized power (i.e. the power required to deliver a single bit per resistance) is nearly double.

Due to these factors, unipolar encoding is no longer commonly employed in data transfers.

RZ(Return to zero)

Return to zero(RZ) has proven to be a viable alternative, if not a complete solution, to the NRZ's shortcomings. RZ, unlike NRZ, uses three voltage values: positive, negative, and zero. It also returns to zero during each bit, as the name implies.

RZ encoding texhnique

The logical one is represented as half-positive and half-zero volts, while logical zero is described as half-negative and half-zero.

This approach does, however, have significant disadvantages, which are as follows:

  • Transmission requires a lot of bandwidth.
  • It's a complicated encoding because it requires three voltage levels.
  • Manchester encoding and Differential-Manchester encoding have superseded mainly this approach in recent years.

Manchester and Differential Manchester Encoding

Manchester encoding is a hybrid of RZ and NRZ-L(NRZ-Level), in which instead of three voltage values, only two are used. The logical one is divided into two halves. The first half contains a negative voltage, and the second half contains a positive voltage. Logical zero is divided into two halves, with the first half holding a positive voltage and the second half containing a negative voltage. Synchronization is provided via the transition in the middle of the bit.

Manchester Encoding

The Differential-Manchester encoding is a hybrid of RZ and NRZ-I(NRZ-Invert), in which we apply the same logic as NRZ-I, i.e. inversion occurs when a logical one is encountered. No inversion occurs when logical zero is encountered.

Differential Manchester Encoding

Manchester encoding had a significant impact because it solved several problems associated with NRZ-L. In contrast, Differential Manchester solved problems related to NRZ-I. There was no baseline wandering, no low-frequency component, and no DC component because each logical bit had a positive and negative voltage contribution.

The bandwidth is a limitation of Manchester encoding and Differential Manchester encoding. Manchester encoding's and Differential Manchester encoding's minimum bandwidth is twice that of NRZ.

Advantages of Polar Line Coding

  • Reduced DC Component: Polar line coding eliminates the high DC component associated with unipolar coding by using both positive and negative voltage levels, improving the signal quality and reducing issues like baseline wander.
  • Improved Signal Integrity: By incorporating signal transitions between consecutive bits, polar coding enhances signal integrity and facilitates clock recovery at the receiver, leading to more reliable data transmission.
  • Noise Immunity: Polar coding is more resilient to noise and interference compared to unipolar coding, as the signal transitions provide better differentiation between data bits and noise, improving the overall robustness of the communication system.

Disadvantages of Polar Line Coding

  • Reduced Bandwidth Efficiency: Polar line coding typically requires more bandwidth compared to unipolar coding due to the presence of signal transitions, which can limit its suitability for applications with strict bandwidth constraints.
  • Complexity: The implementation of polar line coding involves additional hardware complexity compared to unipolar coding, as it requires the generation and detection of both positive and negative voltage levels, increasing the cost and complexity of the communication system.
  • Potential Signal Distortion: In systems with poor signal-to-noise ratios or channel impairments, polar coding may suffer from signal distortion, leading to errors in data transmission and requiring additional error detection and correction mechanisms to mitigate these issues.

Bipolar line coding

Positive, negative, and zero are the three voltage levels in bipolar. While representing, one bit of data has its voltage level set to zero, while the other bit inverts or alternates between positive and negative voltage.

Alternate Mark Inversion(AMI)

The representation here follows a simple logic. As shown in the graphic below, we use zero voltage to represent logical zero and alternating positive and negative voltages to represent logical one.

Bipolar AMI Signal

Pseudoternary

This is the polar opposite of AMI; in the previous section, we kept logical zero at 0 volts or neutral; in this section, we will keep logical one neutral (i.e. at 0 volts) and alternate logical zero.

Pseudoternary

Because one bit is represented by zero volts and the other by alternating voltages, the bipolar scheme or encoding has proven to be a feasible alternative to NRZ encoding because it has the same signal rate as NRZ and has no low frequency or DC component.

You can also read about the network models in computer network.

Also see, Message Switching in Computer Networks.

Advantages of Bipolar Line Coding

  • DC Balance: Bipolar line coding maintains a balance between positive and negative voltage levels, effectively reducing the overall DC component compared to unipolar coding. This helps mitigate issues such as baseline wander and improves signal integrity.
  • Efficient Spectrum Utilization: By encoding data using both positive and negative voltage levels and allowing for signal transitions, bipolar coding offers efficient spectrum utilization, making it suitable for high-speed data transmission over communication channels with limited bandwidth.
  • Enhanced Noise Immunity: Bipolar line coding provides better noise immunity compared to unipolar coding, as the presence of signal transitions enables the receiver to distinguish between data bits and noise more effectively, improving the reliability of data transmission in noisy environments.

Disadvantages of Bipolar Line Coding

  • Complexity: Implementing bipolar line coding requires additional hardware complexity compared to unipolar coding, as it involves generating and detecting both positive and negative voltage levels, increasing the cost and complexity of communication systems.
  • Higher Bandwidth Requirement: Bipolar coding typically requires more bandwidth compared to unipolar coding due to the presence of signal transitions, which can limit its suitability for applications with strict bandwidth constraints.
  • Synchronization Challenges: In systems with poor clock synchronization between the transmitter and receiver, bipolar coding may pose synchronization challenges, as the receiver needs to accurately detect signal transitions to recover the clock signal, potentially leading to clock recovery errors and data loss.

Frequently Asked Questions

What is line coding and its types?

Line coding is a method to convert digital data into signals suitable for transmission. Types include unipolar, polar, and bipolar coding.

What is line coding?

Line coding (also known as digital baseband modulation or digital baseband transmission) is a method in which a transmitter turns binary digit data into a baseband digital signal that may represent data on a transmission line.

Why do we use line coding?

A line code is a code that is used to send data from a digital signal via a transmission line. This coding method avoided signal overlapping and distortion, such as inter-symbol interference.

What is unipolar encoding?

A binary one is represented by a positive voltage, while a binary zero is represented by zero volts. It's the simplest line code, simply encoding the bitstream, and it's similar to modulation's on-off keying.

What is polar encoding?

Polar line coding techniques use positive and negative voltage levels to encode binary values. Like the unipolar line coding systems discussed above, Polar signaling has both NRZ and RZ forms. However, there are two types of NRZ schemes for polar line coding.

What is bipolar encoding?

Bipolar encoding is a sort of return-to-zero (RZ) line code used in telecommunications, in which two non-zero values are employed, resulting in three weights: +, -, and zero. A signal like this is referred to as a duobinary signal. DC-balanced bipolar encodings are meant to spend equal amounts of time in the ‘+’ and ‘-’ states.

Conclusion

In this article, we have discussed line coding. A line code is a digital signal's data transfer code via a transmission line. This coding method avoided signal overlap and distortion, such as inter-symbol interference. We have also discussed its techniques and characteristics.

Recommended Readings:


Check out some of the amazing Guided Paths on topics such as Data Structure and Algorithms, Competitive Programming, Basics of C, Basics of Java, Computer Networks, etc. along with some Contests and Interview Experiences only on Coding Ninjas Studio

Happy Learning!

Previous article
Difference between Unicast, Broadcast and Multicast
Next article
Carrier Sense Multiple Access(CSMA)
Live masterclass