Muhammad Waseem Iqbal
Lecture # 15
Today’s Menu
Ϟ Encoding/Decoding
Encoding/Decoding
Ϟ Digital-to-Digital conversion or encoding/decoding is the
representation of digital information by digital signal
Ϟ For example when we transmit data from computer to the
printer, both original and transmitted data have to be
digital
Ϟ Encoding a digital signal is where 1’s and 0’s generated by
the computer are translated into voltage pulses that can
Encoding/Decoding
Ϟ A digital signal is a sequence of discrete, discontinuous
voltage pulses, each pulse is a signal element
Ϟ Binary data are transmitted by encoding each data bit into
signal elements
Ϟ In the simplest case, there is a one-to-one
correspondence between bits and signal elements
Ϟ An example would be in which binary 0 is represented by
a lower voltage level and binary 1 by a higher voltage level
Encoding/Decoding
Types of Encoding
1. Unipolar 2. Polar 3. Bipolar
1-Unipolar:
Ϟ Encoding is simple , with only one technique in use
Ϟ Simple and primitive
Ϟ Almost obsolete today
Ϟ Study provides introduction to concepts and problems involved
Unipolar Encoding
Ϟ It works by sending voltage pulses on the transmission
medium
Ϟ The signal elements all have the same algebraic sign, that
is, all positive or negative
Ϟ One voltage level stands for binary 0 while the other
stands for binary 1
Ϟ It is called Unipolar because it uses only one polarity
Ϟ This polarity is assigned to one of the two binary states
usually a ‘1’
Unipolar Encoding
Ϟ Figure shows the idea: 1’s are encoded as +ve values, and
Unipolar Encoding
Pros and Cons of Unipolar Encoding Pros
Ϟ Straight forward and simple Ϟ Inexpensive to implement
Cons
Polar Encoding
2-Polar:
Ϟ Polar encoding uses two voltage levels, positive and negative
Ϟ One logic state is represented by a positive voltage level, and the other by a negative voltage level
It has 3 subcategories:
1. Non Return to Zero (NRZ)
ϞNRZL ϞNRZI
2. Return to Zero (RZ) 3. Biphase
ϞManchester
Non Return to Zero (NRZ)
In NRZ, the level of signal is either positive or negative
NRZ-L (Non-Return-to-Zero-Level)
Ϟ Level of the signal depends on the type of bit it represents Ϟ A +ve voltage usually means the bit is a 1 and a –ve voltage
Non Return to Zero (NRZ)
Non Return to Zero (NRZ)
NRZ-I (Non-Return-to-Zero-Invert On One)
Ϟ The inversion of the level represents a 1 bit Ϟ A bit 0 is represented by no change
Non Return to Zero (NRZ)
Problem with NRZ-I
Ϟ NRZ-I is superior to NRZ-L due to synchronization provided by signal change each time a 1 bit is encountered
Non Return to Zero (NRZ)
Ϟ The NRZ codes are the easiest to engineer and, in addition, make efficient use of bandwidth
Ϟ The main limitations of NRZ signals are the presence of a dc component and the lack of synchronization capability Ϟ Because of their simplicity and relatively low frequency
response characteristics, NRZ codes are commonly used for digital magnetic recording
Return to Zero (RZ)
Ϟ Any time, data contains long strings of 1’s or 0’s, receiver can loose its timing
Ϟ In unipolar, we have seen a good solution is to send a separate timing signal but this solution is expensive
Ϟ A better solution is to somehow include sync in encoded signal somewhat similar to what we did in NRZ-I but it should work for both strings of 0 & 1
Ϟ One solution is RZ encoding which uses 3 values; Positive, Negative and Zero
Return to Zero (RZ)
Ϟ Like NRZ-L, +ve voltage means 1 and a –ve voltage means 0, but unlike NRZ-L, half way through each bit interval, the signal returns to zero
Return to Zero (RZ)
Problem with RZ
Ϟ The only problem with RZ encoding is that it requires two signal changes to encode one bit and therefore occupies more bandwidth
Biphase
Ϟ Best existing solution to the problem of synchronization Ϟ Signal changes at the middle of bit interval but does not
stop at zero
Ϟ Instead it continues to the opposite pole
There are two types of biphase encoding
1. Manchester
Manchester
Ϟ Uses inversion at the middle of each bit interval for both synchronization and bit representation
Negative-to-Positive Transition = 1 Positive-to-Negative Transition = 0
Differential Manchester
Ϟ Inversion at the middle of the bit interval is used for synchronization but presence or absence of an additional transition at the beginning of bit interval is used to identify a bit
Ϟ A transition means binary 0 & no transition means binary 1
3-Bipolar Encoding
Ϟ Although the biphase techniques have achieved widespread use in local-area-network applications at relatively high data rates, they have not been widely used in long-distance applications
Ϟ The principal reason for this is that they require a high signaling rate relative to the data rate
Bipolar Encoding
Ϟ An approach is to make use of some sort of scrambling scheme
Ϟ The idea behind this approach is simple;
Ϟ Sequences that would result in a constant voltage level on the line are replaced by filling sequences that will provide sufficient transitions for the receiver's clock to maintain synchronization
Bipolar Encoding
Ϟ Like RZ, it uses three voltage levels
Ϟ Unlike RZ, zero level is used to represent binary 0
Ϟ Binary 1’s are represented by alternate positive and negative voltages
Ϟ AMI
Ϟ Pseudoternary Ϟ B8Zs
Alternate Mark Inversion(AMI)
Ϟ Simplest type of bipolar encoding
Ϟ A binary 0 is represented by no line signal, and a binary 1 is represented by a positive or negative pulse
Ϟ The binary 1 pulses must alternate in polarity
Alternate Mark Inversion(AMI)
Pros and Cons:
Ϟ There will be no loss of synchronization if a long string of is occurs
Ϟ Each 1 introduces a transition, and the receiver can resynchronize on that transition
Ϟ A long string of 0s would still be a problem
Pseudoternary
Ϟ Inverse of AMI
Pseudoternary
Ϟ Two variations are developed to solve the problem of synchronization of sequential 0’s
1. B8Zs (used in North America) 2. HDB3 (used in Europe & Japan)
B8Zs
Ϟ Bipolar with 8-zeros substitution
Ϟ Difference between AMI and B8Zs occurs only when 8 or more consecutive zeros are encountered
Ϟ Forces artificial signal changes called violations
Ϟ Each time eight 0’s occur, B8Zs introduces changes in pattern based on polarity of previous 1 (the ‘1’ occurring just before zeros)
HDB3
Ϟ High-Density Bipolar-3 Zeros
Ϟ Alteration of AMI adopted in Europe and Japan
Ϟ Introduces changes into AMI, every time four consecutive zeros are encountered instead of waiting for eight zeros as in the case of B8Zs
Ϟ As in B8Zs, the pattern of violations is based on the polarity of the previous 1 bit
Ϟ HDB3 also looks at the number of 1’s that have occurred since the last substitution
HDB3
HDB3
Ϟ High-Density Bipolar-3 Zeros
Ϟ If the last violation was positive, this violation must be negative, and vice versa