# Line Coding: 7 Important Explanations

## CONTENTS: Line Coding | Manchester encoding

• What is line coding ?
• Types of line coding
• Properties of line coding
• Manchester encoding
• Uses of line coding in digital communication

## What is Line Coding?

“Line coding is a type of code which is used in transmitting data of any specific digital signal over a specific transmission line or path”.

The main purpose of this type of coding is to avoid overlapping & distortions of any signals (Ex- inter-symbol interference).

In Line coding, standard logic levels are also converted to a form which is more suitable for line transmission.

## Important features of Line Coding:

The following are the desirable properties of a line code:

• Self-synchronization i.e. timing or clock signal can be usually extracted from the code.
• Low probability of bit-error
• It should have a spectrum that is suitable for the channel
• The transmission bandwidth should be as small as possible
• Line codes must have error detection capability
• The code ought to be transparent

# What are the types of Line Coding?

## Different Types of Line Coding:

Line Coding can be classified into ‘four’ important divisions; they are:

1. Unipolar Line Coding
2. Polar Line Coding
3. Bipolar Line Coding
4. Manchester Line Coding

Again, Unipolar has an important division, which is ‘NRZ’.

Polar has two important divisions; they are ‘NRZ’ & ‘RZ’.

Bipolar is divided into AMI.

## Explain each of the Line Coding and their respective divisions:

• UNIPOLAR In this type of line code method, the signal levels lie above the axis or below the axis.

Diagram:

In positive logic, unipolar signalling the binary 1 is represented by a high level and a binary 0 by a zero-voltage level. This type of signalling is also called on-off signalling.

NRZ is a special type of Unipolar coding where the positive voltages denote bit 1 and the zero voltage defines bit 0. Here, the signal does not return to zero hence the name is NRZ.

### POLAR

In a polar type of coding, the signal levels lie on the both sides of the axis.

Here, binary 1’s and 0’s are denoted by equal +ve and -ve level. E.g., binary 1 is +A volts and binary 0 is a -A volts.

Non return to zero (NRZ) This NRZ is also kind of similar to the unipolar NRZ, but in case of Polar, NRZ is divided into two divisions i.e. NRZ-L & NRZ-I level.

In NRZ-L level, the bit values are determined by the voltage level. Here, binary 0 refers to logic-level low & bit 1 refers to logic-level high.

In NRZ-I level, when the logic refers to bit 1, two level transition takes place at the boundary & when the logic level refers to 0, no transition occurs at the boundary.

unlike NRZ, here the signal value returns to zero. Hence, to Solve some NRZ problems, RZ scheme is applied. RZ uses three values which are a. positive b. negative & c. zero.

A major drawback of RZ is it requires greater bandwidths. Also, since it uses three levels of voltages, this scheme is considered to be a bit complex.

• BIPOLAR In this type of coding, three different levels of voltages exist; they are positive, negative & zero. In which, one of them lies at zero and the other voltage levels stay at positive and negative.

Diagram:

This coding is also called pseudo-ternary signalling or alternative mark inversion (AMI) signalling. In this case, binary 1’s are represented by alternatively positive or negative values. The binary 0 is represented by a zero level.

The term pseudo-ternary means three encoded signal levels (+A, -A and zero volt) are used to represent two level binary data 1 & 0.

Alternative Mark Inversion (AMI)In this scheme, when the voltage is neutral, it refers to binary 0 and when the voltage is positive or negative the binary becomes 1.

Pseudo-ternary  In this coding scheme, bit 1 refers to zero voltage & bit 0 refers to any of positive or negative voltage alternatively.

## Manchester coding

Here, in this type of coding, symbol 1 is characterized by transmit a +ve pulse (say +A volts) for one-half of the signal length followed by a -ve pulse (say -A volts) for the other half of the signal length.

Correspondingly, symbol ‘0’ is characterized by a -ve half-bit pulse following the +ve half-bit pulse in Manchester encoding techniques.

Diagram: Manchester encoding, Image Credit – Stefan Schmidt, Manchester encoding both conventions, marked as public domain, more details on Wikimedia Commons

Manchester encoding is also called split-phase encoding.

Unlike NRZ or RZ, Manchester Encoding overcomes several issues in between the signals. In this Manchester encoding, there is no baseline wandering; neither there is any DC components as they are consisted with both of positive and negative voltage.

The only drawback of Manchester encoding scheme is its minimum bandwidth requirements.

## What is Differential Encoding?

At what time serial-data is carrying through circuits along a communication channel a problem arises. The waveform is likely to be inverted i.e. data complementation takes place. This means 1 may become 0 or 0 may become 1. This may occur in a twisted pair communication channels if a line code like polar signalling is utilized.

To overcome this problem in polar signalling, differential encoding is often used.

In a differential encoder, the encoded differential data are generated by a modulo 2 addition using XOR gate. Thus

en = dn en-1

In a differential encoding system, the decoded sequence remains same irrespective of the channel polarity.Let us consider the input sequence dn = 1 1 0 1 0 0 1. The encoded sequence due to differential encoding will be en = 1 0 1 1 0 0 0 1.

• Unipolar is the simplest type of technique.
• Always requires less bandwidth.
• The spectral line can be used here in unipolar RZ as clock

• No clock is present at unipolar NRZ.
• Signal droop occurs due to low frequency components.
• Unipolar RZ requires more bandwidth i.e. twice than unipolar NRX.

• This technique is also a simple one.
• No low frequency components are present

• No presence of clock
• No checking of errors
• Polar RZ signal’s bandwidth is twice than the NRZ

## What are the advantages of Bipolar Coding?

• No low frequency components.
• Single error detection cam be done.
• It demands lower bandwidth than both of Polar and Unipolar.