Digital Encoding Techniques
Digital Encoding Techniques
Digital Encoding Techniques
A computer network is designed to send information from one point to another. Data that we send can either
be digital or analog. Also signals that represent data can also be digital or analog. (Data as well as signals
that represent data can either be digital or analog)
Thus to send data by using signals, we must able to convert data into signals. This conversion can be Analog
to Analog, Analog to Digital, Digital to Analog or Digital to Digital.
In digital encoding, the data is digital while the signal can be either digital or analog.
1. Line Coding
2. Block Coding
3. Scrambling
Line Coding is always needed, whereas Block Coding and Scrambling may or may not be needed
depending.
Line coding is the process of converting digital data to digital signals. By this technique we convert a
sequence of bits to a digital signal. At the sender side digital data are encoded into a digital signal and at the
receiver side the digital data are recreated by decoding the digital signal.
But, before learning difference between first three schemes we should first know the characteristic of these
line coding techniques:
There should be self-synchronizing i.e., both receiver and sender clock should be synchronized.
There should have some error-detecting capability.
There should be immunity to noise and interference.
Page 1 of 11
There should be less complexity.
There should be no low frequency component (DC-component) as long distance transfer is not
feasible for low frequency component signal.
There should be less base line wandering.
Unipolar scheme –
In this scheme, all the signal levels are either above or below the axis.
Non return to zero (NRZ) – It is unipolar line coding scheme in which positive voltage defines bit 1
and the zero voltage defines bit 0. Signal does not return to zero at the middle of the bit thus it is
called NRZ. For example: Data = 10110.
But this scheme uses more power as compared to polar scheme to send one bit per unit line
resistance. Moreover for continuous set of zeros or ones there will be self-synchronization and base
line wandering problem.
Polar schemes –
In polar schemes, the voltages are on the both sides of the axis.
NRZ-L and NRZ-I – These are somewhat similar to unipolar NRZ scheme but here we use two
levels of amplitude (voltages). For NRZ-L(NRZ-Level), the level of the voltage determines the
value of the bit, typically binary 1 maps to logic-level high, and binary 0 maps to logic-level low,
and for NRZ-I(NRZ-Invert), two-level signal has a transition at a boundary if the next bit that we
are going to transmit is a logical 1, and does not have a transition if the next bit that we are going to
transmit is a logical 0.
Note – For NRZ-I we are assuming in the example that previous signal before starting of data set
“01001110” was positive. Therefore, there is no transition at the beginning and first bit “0” in current
data set “01001110” is starting from +V. Example: Data = 01001110.
Page 2 of 11
Comparison between NRZ-L and NRZ-I: Baseline wandering is a problem for both of them, but for
NRZ-L it is twice as bad as compared to NRZ-I. This is because of transition at the boundary for NRZ-I (if
the next bit that we are going to transmit is a logical 1). Similarly self-synchronization problem is similar in
both for long sequence of 0’s, but for long sequence of 1’s it is more severe in NRZ-L.
Return to zero (RZ) – One solution to NRZ problem is the RZ scheme, which uses three values
positive,negative,and zero. In this scheme signal goes to 0 in the middle of each bit.
Note – The logic we are using here to represent data is that for bit 1 half of the signal is represented by +V
and half by zero voltage and for bit 0 half of the signal is represented by -V and half by zero voltage.
Example: Data = 01001.
Main disadvantage of RZ encoding is that it requires greater bandwidth. Another problem is the
complexity as it uses three levels of voltage. As a result of all these deficiencies, this scheme is not used
today. Instead, it has been replaced by the better-performing Manchester and differential Manchester
schemes.
Page 3 of 11
Differential Manchester is somewhat combination of the RZ and NRZ-I schemes. There is always a
transition at the middle of the bit but the bit values are determined at the beginning of the bit. If the next bit
is 0, there is a transition, if the next bit is 1, there is no transition.
Note –
1. The logic we are using here to represent data using Manchester is that for bit 1 there is transition form -V
to +V volts in the middle of the bit and for bit 0 there is transition from +V to -V volts in the middle of the
bit.
2. For differential Manchester we are assuming in the example that previous signal before starting of data set
“010011” was positive. Therefore there is transition at the beginning and first bit “0” in current data set
“010011” is starting from -V. Example: Data = 010011.
The Manchester scheme overcomes several problems associated with NRZ-L, and differential
Manchester overcomes several problems associated with NRZ-I as there is no baseline wandering
and no DC component because each bit has a positive and negative voltage contribution.
Only limitation is that the minimum bandwidth of Manchester and differential Manchester is twice
that of NRZ.
Bipolar schemes –
In this scheme there are three voltage levels positive, negative, and zero. The voltage level for one data
element is at zero, while the voltage level for the other element alternates between positive and negative.
Alternate Mark Inversion (AMI) – A neutral zero voltage represents binary 0. Binary 1’s are
represented by alternating positive and negative voltages.
Page 4 of 11
Pseudoternary – Bit 1 is encoded as a zero voltage and the bit 0 is encoded as alternating positive
and negative voltages i.e., opposite of AMI scheme. Example: Data = 010010.
The bipolar scheme is an alternative to NRZ.This scheme has the same signal rate as NRZ,but there is no
DC component as one bit is represented by voltage zero and other alternates every time.
Block Coding
Block coding helps in error detection and re-transmission of the signal. It is normally referred to as mB/nB
coding as it replaces each m-bit data group with an n-bit data group (where n>m). Thus, its adds extra bits
(redundancy bits) which helps in synchronization at receiver’s and sender’s end and also providing some
kind of error detecting capability.
It normally involves three steps: division, substitution, and combination. In the division step,a sequence of
bits is divided into groups of m-bits. In the substitution step, we substitute an m-bit group for an n-bit group.
Finally, the n-bit groups are combined together to form a stream which has more bits than the original bits.
Page 5 of 11
At the receiver, the NRZ-I encoded digital signal is first decoded into a stream of bits and then decoded
again to remove the redundancy bits.
Drawback – Though 4B/5B encoding solves the problem of synchronization,it increases the signal rate of
NRZ-L.Moreover,it does not solve the DC component problem of NRZ-L.
A group of 8 bits can have 2^8 different combinations while a group of 10 bits can have 2^10 different
combinations. This means that there are 2^10-2^8=768 redundant groups that are not used for 8B/10B
encoding and can be used for error detection and disparity check.
Thus, this technique is better than 4B/5B because of better error-checking capability and better
synchronization.
Page 6 of 11
SCRAMBLING
Scrambling is a technique that does not increase the number of bits and does provide synchronization.
Problem with technique like Bipolar AMI(Alternate Mark Inversion) is that continuous sequence of zero’s
create synchronization problems one solution to this is Scrambling.
V(Violation), is a non-zero voltage which means signal have same polarity as the previous non-zero
voltage. Thus it is violation of general AMI technique.
B(Bipolar), also non-zero voltage level which is in accordance with the AMI rule (i.e.,opposite
polarity from the previous non-zero voltage).
Note – Both figures (left and right one) are correct, depending upon last non-zero voltage signal of previous
data sequence (i.e., sequence before current data sequence “100000000”).
HDB3(High-density bipolar3-zero)
In this technique four consecutive zero-level voltages are replaced with a sequence “000V” or “B00V”.
Page 7 of 11
If the number of nonzero pulses after the last substitution is odd, the substitution pattern will be
“000V”, this helps maintaining total number of nonzero pulses even.
If the number of nonzero pulses after the last substitution is even, the substitution pattern will be
“B00V”. Hence even number of nonzero pulses is maintained again.
Explanation – After representing first two 1’s of data we encounter four consecutive zeros.Since our last
substitutions were two 1’s(thus number of non-zero pulses is even).So,we substitute four zeros with
“B00V”.
Page 8 of 11
1. Amplitude Shift keying – Amplitude Shift Keying is a technique in which carrier signal is analog and
data to be modulated is digital. The amplitude of analog carrier signal is modified to reflect binary data.
The binary signal when modulated gives a zero value when the binary data represents 0 while gives the
carrier output when data is 1. The frequency and phase of the carrier signal remain constant.
It is susceptible to noise interference and entire transmissions could be lost due to this.
It has lower power efficiency.
2. Frequency Shift keying – In this modulation the frequency of analog carrier signal is modified to reflect
binary data.
The output of a frequency shift keying modulated wave is high in frequency for a binary high input and is
low in frequency for a binary low input. The amplitude and phase of the carrier signal remain constant.
Page 9 of 11
Advantages of frequency shift Keying –
Frequency shift keying modulated signal can help avoid the noise problems beset by ASK.
It has lower chances of an error.
It provides high signal to noise ratio.
The transmitter and receiver implementations are simple for low data rate application.
3. Phase Shift keying – In this modulation the phase of the analog carrier signal is modified to reflect binary
data.The amplitude and frequency of the carrier signal remains constant.
Page 10 of 11
This is regarded as the most robust digital modulation technique and is used for long distance
wireless communication.
It has double data rate carrying capacity compare to BPSK as two bits are mapped on each
constellation points.
Page 11 of 11