How2Lab Logo
tech guide & how tos..


Data Encoding Techniques


We have seen that analog or digital data traverses through a communication media in the form of a signal from the source to the destination. The channel bridging the transmitter and the receiver may be a guided transmission line such as a wire or a wave guide or it can be a non-guided atmospheric or space channel. But, irrespective of the medium, the signal traversing the channel becomes attenuated and distorted with increasing distance. Hence a process is adopted to match the properties of the transmitted signal to the channel characteristics so as to efficiently communicate over the transmission media, i.e. to conserve the bandwidth and minimize errors of the transmitted signal. This process is called encoding.

Either form of data can be encoded into either form of signal. For digital signaling, the data source can be either analog or digital, which is encoded into digital signal, using different encoding techniques. The basis of analog signaling is a constant frequency signal known as a carrier signal, which is chosen to be compatible with the transmission media being used, so that they can traverse a long distance with minimum of attenuation and distortion. Data can be transmitted using these carrier signals by a process called modulation, where one or more fundamental parameters of the carrier wave, i.e. amplitude, frequency and phase are being modulated by the source data. The resulting signal, called modulated signal traverses the media, which is demodulated at the receiving end and the original signal is extracted.


What is modulation?

The process of matching the properties of the transmitted signal to the channel characteristics is known as modulation. It is the systematic variation of a carrier waveform transmitted over the channel.


What is demodulation?

At the receiver, the information-bearing signal must be extracted from the modulated carrier. The process of converting a modulated signal back to its original form is known as demodulation or detection.


The various possible combinations and the common data encoding techniques adopted are discussed below:

  1. Digital Data, Digital Signal (Baseband LANs)

    A digital signal is a sequence of discrete discontinuous voltage pulses, where each pulse is a signal element. The binary data is transmitted by encoding each data bit into signal elements, in which the binary 0 represents the lower voltage and binary 1 represents the higher voltage level.

    To interpret digital signals, the receiver must know the timing of each bit, i.e. when the bit begins and when it ends. It should also determine whether the signal level for each bit position is high (1) or low (0). But due to noise and other impairments errors always creep in.

    Baseband LANs – A baseband LAN is defined as one that uses digital signals, which are inserted directly on the network transmission line as voltage pulses.

    Ethernet is a popular implementation of a baseband LAN.


    A few techniques of encoding digital data to digital signal are as follows:

    1.1 Non Return to zero (NRZ)

    The most common and easiest way to transmit digital signals is to use two different voltage levels for the two binary digits. Usually a negative voltage is used to represent one binary value and a positive voltage to represent the other. The data is encoded as the presence or absence of a signal transition at the beginning of the bit time. As shown in figure below, in NRZ encoding, the signal level remains same throughout the bit-period.

    The advantages of NRZ coding are:

    • Detecting a transition in presence of noise is more reliable than to compare a value to a threshold.
    • NRZ codes are easy to engineer and it makes efficient use of bandwidth.

    The main limitations are the presence of a D.C. component and the lack of synchronization capability. When there is long sequence of 0's or 1's, the receiving side will fail to regenerate the clock and synchronization between the transmitter and receiver clocks will fail.


    1.2 Biphase

    To over come the limitations of NRZ encoding, biphase coding techniques can be adopted. Manchester and Differential Manchester Coding are the two common Biphase techniques in use.

    In the Manchester Coding there is a transition at the middle of each bit period. A binary 1 corresponding to a low-to-high transition and a binary 0 corresponding to a high-to-low transition in the middle.

    In Differential Manchester, the encoding of a 0 is represented by the presence of a transition both at the beginning and at the middle and 1 is represented by a transition only in the middle of the bit period.

    The bandwidth required for biphase techniques are greater than that of NRZ techniques, but due to the predictable transition during each bit time, the receiver can synchronize properly on that transition. Biphase encoded signals have no D.C. components.

    Manchester codes are now very popular and has been specified for the IEEE 802.3 standard for baseband coaxial cables and twisted pair CSMA/CD bus LANs.

    The IEEE 802.3 standard, which is the basis of Ethernet, uses Manchester encoding at the physical level.

    Token passing rings (IEEE 802.5) use the Differential Manchester encoding scheme.


  2. Digital Data, Analog Signals (Broadband LANs)

    Analog signals are used to transmit data through optical fibers, telephone network, etc., where the digital devices were attached to a network via a modem (modulator - demodulator) which converts digital signal to analog signal and vice versa.

    Since modulation involves operations on one or more of the three characteristics of the carrier signals, namely amplitude, frequency and phase, three basic encoding or modulation techniques are available for conversion of digital data to analog signals.

    2.1 Amplitude – shift keying (ASK)

    The two binary values are represented by two different amplitudes of the carrier frequency as shown in figure below.

    This method is very much susceptible to noise and sudden gain changes and hence it is considered as an inefficient modulation technique.


    2.2 Frequency – Shift Keying (FSK)

    In this case two binary values are represented by two different frequencies near the carrier frequency as shown below.

    This method is less susceptible to errors than ASK. It is mainly used in higher frequency radio transmission.


    2.3 Phase Shift Keying (PSK)

    In this method, the phase of the carrier signal is shifted by the modulating signal with the phase-measured relative to the previous bit interval. The binary 0 is represented by sending a signal of the same phase as the preceding one and 1 is represented by sending the signal with an opposite phase to the previous one as shown below.


    A Broadband LAN uses analog signals to transfer data. Here digital signals are passed through a modem and transmitted on a carrier wave over one of the frequency bands of the cable.


  3. Analog Data, Digital Signals

    Conversion of analog data to digital signals permit the use of modern digital transmission and switching equipment. The device used for conversion of analog data to digital signal and vice versa is called a coder (coder-decoder). The two principle techniques used by coders are as follows:

    3.1 Pulse Code Modulation (PCM)

    This process is based on Shannon's sampling theorem. Number of samples of the signal are taken at regular intervals, at a rate higher than twice the highest significant signal frequency. For example, during the sampling of voice data, in the frequency range 300 to 4000 Hz, 8000 samples per second are sufficient for the coding.

    As shown in the figure above, the samples are represented as narrow pulses proportional to the value of the original signal. This process is called Pulse Amplitude Modulation (PAM). The PAM samples are quantized and approximated to n-bit integer by using analog-to-digital converter. In the above example, n = 3 and hence there are 8 (=23) levels available for approximating the PAM signals. The errors introduced by this process is known as quantization error. The digital data thus obtained can be encoded into one of digital signals discussed earlier.


    3.2 Delta Modulation (DM)

    Delta Modulation is a very popular alternative of PCM with much reduced complexity. Here the analog input is approximated by a staircase function, which moves up or down by one quantization level (a constant amount) at each sampling interval. Each sample delta modulation process can be represented by a single binary digit, which makes it more efficient than the PCM technique.


  4. Analog Data, Analog Signals

    Modulation, as we have already discussed, is a process of combining an input signal with a carrier signal to produce a modulated signal, whose bandwidth is centered at the carrier frequency. Modulation is necessary for transmission of analog signals due to two principal reasons:

    • A higher frequency is sometimes required for effective transmission, because, for transmitting baseband signals the required antenna size might be many kilometres in length.
    • Modulation permits frequency division multiplexing, which allow several digital signals to share a single transmission channel.

    There are three principal techniques for modulation, namely Amplitude Modulation (AM), Frequency Modulation (FM) and Phase Modulation (PM).

    4.1 Amplitude Modulation (AM)

    This is the simplest form of modulation where the amplitude of the carrier wave is being modulated by the analog signal known as the modulating signal. Due to the large amplitudes of the carrier wave the modulated signal can travel a large distance before they are completely attenuated. At the receiving end the signal is being demodulated to get the original data.

    The major problem of amplitude modulation is that, it is very much susceptible to external noise and electro-magnetic interference and hence the signal usually reaches the destination in a distorted form.


    4.2 Angle Modulation

    Frequency Modulation (FM) and Phase Modulation (PM) are the special cases of Angle modulation. For Phase Modulation, the phase is proportional to the modulating signal, whereas for frequency modulation, the derivative of the phase is proportional to the modulating signal.

    In this process, since the frequency or phase of the carrier wave is being modulated by the signal and the modulation lies near the baseband, the external noise or electro-magnetic interference cannot affect much the modulated signal at the receiving end.



Baseband and Broadband Signals

We can have either a baseband or broadband signaling. Baseband is defined as one that uses digital signaling, which is inserted in the transmission channel as voltage pulses. On the other hand broadband systems are those, which use analog signaling to transmit information using a carrier of high frequency.

In baseband LANs, the entire frequency spectrum of the medium is utilized for transmission and hence frequency division multiplexing cannot be used. Signals inserted at a point propagates in both the directions, hence transmission is bi-directional. Baseband systems extend only to limited distances because at higher frequency, the attenuation of the signal is most pronounced and the pulses blur out, causing the large distance communication totally impractical.

Since broadband systems use analog signaling, frequency division multiplexing is possible, where the frequency spectrum of the cable is divided into several sections of bandwidth. These separate channels can support different types of signals of various frequency ranges to travel at the same instance. Unlike baseband, broadband is a unidirectional medium where the signal inserted into the media propagates in only one direction.

Two data paths are required, which are connected at a point in the network called head-end. All the stations transmit towards the headend on one path and the signals received at the headend are propagated through the second path.

A comparison between the baseband and broadband LAN systems are given in the table below

BasebandBroadband
Digital SignalingAnalog Signaling (requires RF modem)
The entire bandwidth is consumed by the signalMultiple channels are possible using frequency division multiplexing
Bi – directionalUnidirectional
Bus topologyBus or tree topology
Distance up to a few kilometersCover large distances


Error detection techniques

Whenever information is transmitted through a noisy channel, errors are likely to occur. To control the errors and to improve the reliability of the transmitted data, detection of errors and correcting them is essential. A very simple error checking method is to send the source data block twice. The receiver compares them with the help of a comparator and if those two blocks differ, a request for re-transmission is made. To achieve forward error correction, three sets of the same data block are sent and majority decision selects the correct block. These methods are very inefficient and increase the traffic two or three times. Fortunately there are more efficient error detection and correction codes.

Two very popular error detection techniques are available which are discussed below. In both the methods extra bits are introduced into the data stream at the transmitter on a regular and logical basis, which allow the receiver to detect the errors and either request the transmitter for re-transmission of the erroneous block or correct it there itself.

1. Parity Checking

Blocks of data from the source are subjected to a check bit or Parity bit generator form, where a parity of 1 is added to the block if it contains an odd number of 1 bit and 0 is added if it contains an even number of 1 bits. For example, considering a 4-bit word the different combination of the bits and the corresponding parity bit is illustrated in the table below.

Decimal valueData BlockParity bitCode word
00000000000
10001100011
20010100101
30011000110
40100101001
50101001010
60110001100
70111101111
81000110001
91001010010
101010010100
111011110111
121100011000
131101111011
141110111101
151111011110

This scheme makes the total number of 1's even, that is why it is called even parity checking,

An observation of the table reveals that to move from one code word to another, at least two data bits should be changed. Hence these set of code words are said to have a minimum distance of 2, which means that a receiver which has a knowledge of the code word set can detect all single errors in each code word. However, if two errors occur in the code word, it becomes another valid member of the set and the decoder will see only another valid code word and know nothing of the error. Thus double errors cannot be detected. In fact it can be shown that a single parity check code can detect only odd number of errors in a code word.


2. Cyclic Redundancy Checks (CRC)

The Cyclic Redundancy Check is a very powerful and easy to implement technique. The generalized technique can be explained as follows.

If a k bit message is to be transmitted, the transmitter generates a r-bit sequence, known as Frame Check Sequence (FCS) so that the (k + r) bits are actually being transmitted. Now this r-bit FCS is generated by dividing the original number, appended by r zeros, by a predetermined number. This number, which is (r + 1) bit in length, can also be considered as the coefficients of a polynomial, called Generator Polynomial. The remainder of this division process generates the r-bit FCS. On receiving the packet, the receiver divides the (k + r) bit frame by the same predetermined number and if it produces no remainder, it can be assumed that no error has occurred during the transmission.

We can clarify the above procedure by dividing a sample 4-bit number in the above table, by 1011, using the modulo-2 arithmetic. Modulo-2 arithmetic is a binary addition process without any carry over, which is just the Exclusive-OR operation. Consider the case where k = 1101. Hence we have to divide 1101000 (i.e. k appended by 3 zeros) by 1011, which produces the remainder r=101, so that the bit frame (k + r) = 1101001 is actually being transmitted through the communication channel.

At the receiving end, if the received number, i.e. 1101001, is divided by the same generator polynomial 1011 to get the remainder as 101 it can be assumed that the data is free of errors.

The transmitter can generate the CRC by using a feedback shift register circuit. The same circuit can be used by the receiver to check whether any error has occurred.

There exists other error detection schemes, such as hamming code, which can be used not only for error detection but also for error correction.


Share:
Buy Domain & Hosting from a trusted company
Web Services Worldwide | Hostinger
About the Author
Rajeev Kumar
CEO, Computer Solutions
Jamshedpur, India

Rajeev Kumar is the primary author of How2Lab. He is a B.Tech. from IIT Kanpur with several years of experience in IT education and Software development. He has taught a wide spectrum of people including fresh young talents, students of premier engineering colleges & management institutes, and IT professionals.

Rajeev has founded Computer Solutions & Web Services Worldwide. He has hands-on experience of building variety of websites and business applications, that include - SaaS based erp & e-commerce systems, and cloud deployed operations management software for health-care, manufacturing and other industries.


Refer a friendSitemapDisclaimerPrivacy
Copyright © How2Lab.com. All rights reserved.