DIGITAL ENCODING_231010_142534

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 18

DIGITAL ENCODING

The various techniques for conversion of digital and analog data to

digital signal commonly referred to as encoding techniques.

In a digital communication system, the first step is to convert the

information into a bit stream of ones and zeros. Then the bit stream

has to be represented as an electrical signal.

Data Signal Approach

Digital Digital Encoding

Analog Digital Encoding

Analog Analog Modulation

Digital Analog Modulation

Fig. Various approaches for conversion of data into signal

The most common technique for converting analog signal into

digital form is PCM (Pulse Code Modulation).

This conversion is composed of 3 main stages:


 The Analog signal is first sampled.

 Transferring the sampled signal through a quantizer .

 Converting the quantized value to a binary


representation.

Sampling
From Nyquist theorem, we know that an Analog signal can be

reconstructed from a sequence of samples if the sampling rate is, at

least, twice as the highest frequency of the signal. The LPF must

come before the sampling. Its task is to filter frequencies that are

higher than that of the sampling rate, thus eliminating a

phenomenon called Aliasing (may happen at the reconstruction of

the signal, when part of the signal frequencies overlaps other

frequencies). Actually, the LPF ensures that the prerequisite of

Nyquist theorem is satisfied. The Analog signal is sampled. These

samples are distributed over an infinite set of values, which cannot

transmit. For this reason, we need to use Quantization.

Quantization
Quantization is used to confine the infinite set of sampled values to a

finite set of values that can be transmitted later. The letter M is used

to designate the number of values in that finite set. Usually M is

chosen as a power of 2, i.e. M = 2n (will be used later, for binary

representation of the quantized values). The quantization is

implemented simply by rounding. Each sampled value is rounded to

the closest legal value of the quantizer.

Binary Representation

The last stage of PCM is converting the decimal value of the

quantization to a binary representation. This is the reason that M

was chosen as a power of 2. In our quantizer example we used M=8

=> the number of bits needed for binary representation is n=3.


Fig. 1 PCM Transmitter

Digital Data, Digital Signal

• Digital signal is a sequence of discrete, discontinuous voltage

pulses.

• Each pulse is a signal element.

• Binary data are transmitted by encoding the bit stream into

signal elements.

• In the simplest case, one bit is represented by one signal

element.
— E.g., 1 is represented by a lower voltage level, and 0 is

represented by a higher voltage level.

ENCODING SCHEMES
Encoding schemes can be divided into the following categories:

 Unipolar encoding

 Polar encoding

 Bipolar encoding

Unipolar encoding: In unipolar encoding scheme, only one voltage

level is used. All signal elements have same sign. Binary 1 is

represented by positive voltage and binary 0 by an idle line.

Unipolar RZ and NRZ are examples of this encoding scheme.

Polar encoding: In polar encoding, two voltage levels are used: a

positive voltage level and a negative voltage level. NRZ-I, NRZ-L,

Manchester, Differential Manchester are examples of this encoding

scheme.
Bipolar encoding: In bipolar encoding, three levels are used: a

positive voltage, a negative voltage and 0 voltages. Bipolar RZ, AMI

and HDB3 encoding schemes are examples of this encoding scheme.

Unipolar Non Return to Zero (

Description: “0” is represented as no voltage and “1” by high

voltage level. The main behavior of NRZ codes is that the voltage

level remains constant during bit interval. The end or start of a bit

will not be indicated and it will maintain the same voltage state, if

the value of the previous bit and the value of the present bit are

same.

Example:
Notes:

 This is the simplest representation of digital signal.


 It has major shortcomings:
 it has a DC component, meaning that its average voltage
is not 0 but some positive constant.

 It is difficult to keep the clocks of the source and receiver


in synchronize if there happen to be long sequences of
ones and zeros. As there is a long sequence of constant
voltage level and the clock synchronization may be lost
due to the absence of bit interval, it becomes difficult for
the receiver to differentiate between 0 and 1. The receiver
uses transitions in level to determine clock cycle
boundaries.
 It is impossible to distinguish between a long sequence of
zeros and the absence of signal.
 Again, for a series of long “1” / “0”, it is difficult to know
how many we got.
 Long strings of zeros and ones do not produce any
transitions which may create problem in error detection.
Polar NRZ-L: Polar Non Return to Zero Level
Description: “0” is represented as negative voltage level and “1” by
positive voltage level. Signal never returns to zero voltage.

Example:

Notes:

 It handles the DC component issue, meaning the average voltage


level is 0.

 It still has the synchronization problem. With a long string of 1s

or 0s the output is a constant voltage over a long period of time.


Under these circumstances, any drift between the timing of

transmitter and receiver will result in a loss of synchronization

between the two.

NRZ-I: Non Return to Zero Inverted on Ones on


Description: Transition on “1” only. NRZI is an example of
differential encoding. In differential encoding,

• Data represented by changes rather than levels


• More reliable detection of transition rather than level

Example:

Notes:

This line code has the same two shortcomings of the previous code:
 no change in voltage in the case of zeroes sequence and no carry
of synchronization information.

 this code doesn’t handle the DC component (average is not 0).

Unipolar Return to Zero

Description: “1” is represented by positive voltage level of half bit

duration and zero for the second half. “0” is represented as no

voltage.

Notes

— Simplicity in implementation.

— Long string of zeros causes synchronization problem

— Does not have any error correction capability.


Polar Return to Zero

Description: “1” is represented by positive voltage level of half bit

duration and zero for the second half.

“0” is represented as negative voltage level for the half of bit

duration and zero for the second half.

Signal always returns to zero level.

Notes:

 Used in baseband data transmission, magnetic recording


 Tries to solve the problem of losing synchronization due to

long strings of consecutive 1s or 0s.

 The transition may be used for synchronization.

 No DC Component.

Bipolar – AMI (Alternate Mark Inversion)


Description: No voltage on “0”, the first “1” is a positive voltage, the
second “1” is a negative voltage, and the voltage values of
subsequent one’s alternate.

Example :

Notes:

There are several advantages to this approach:


 First, there will be no loss of synchronization if a long string of

“1” s occurs. Each “1” introduces a transition, and the receiver

can resynchronize on that transition.

 Second, because the “1” signals alternate in voltage from positive

to negative, there is no net dc component.

 The pulse-alteration property provides a simple means of

detecting error.

Manchester
Description: “0” is represented as a transition from high to low

voltage level in the middle of the bit, while “1” is represented by the

transition from low to high at the middle of the bit. The mid-bit

transition serves as a clocking mechanism.

Example:
Notes:

 good for timing as we have a transition every cycle, fully self


synchronizing.
 no DC component, the average voltage is 0.
 the absence of an expected transition can be used to detect errors

(error detection)

 used in IEEE 802.3 standard for baseband coaxial cable and

twisted pair CSMA/CD LAN.


Differential Manchester
Description: Always a transition in the middle of a bit, transition at

the beginning only for 0.

1 is represented by the absence of a transition at the beginning of a

bit period.

Example:

Notes:

 fully self synchronizing, no DC component, the average voltage


is 0.
 used in IEEE802.5 token ring LAN, using shielded twisted pair.

 Error detection
— Absence of expected transition

MLT-3 ( Multilevel Transmit)

Description: MLT-3 cycles through the voltage levels -1, 0, +1, and

0. It moves to the next state to transmit a “1” bit, and stays in the

same state to transmit a “0” bit.

Example:

1 0 1 0 0 1 1 1 0 0 1

+V
11 0 11 0

-V

Notes:

 Used in Fast Ethernet LAN (100Mbps)

You might also like