Lecture # 15 Computer Communication & Networks. Today’s Menu ϞEncoding/Decoding ϞUnipolar, Polar...

35
Lecture # 15 Computer Communication & Networks

Transcript of Lecture # 15 Computer Communication & Networks. Today’s Menu ϞEncoding/Decoding ϞUnipolar, Polar...

Page 1: Lecture # 15 Computer Communication & Networks. Today’s Menu ϞEncoding/Decoding ϞUnipolar, Polar and Bipolar encoding.

Lecture # 15

Computer Communication & Networks

Page 2: Lecture # 15 Computer Communication & Networks. Today’s Menu ϞEncoding/Decoding ϞUnipolar, Polar and Bipolar encoding.

Today’s Menu

Ϟ Encoding/Decoding

Ϟ Unipolar, Polar and Bipolar encoding

Page 3: Lecture # 15 Computer Communication & Networks. Today’s Menu ϞEncoding/Decoding ϞUnipolar, Polar and Bipolar encoding.

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

be propagated over the wire

Page 4: Lecture # 15 Computer Communication & Networks. Today’s Menu ϞEncoding/Decoding ϞUnipolar, Polar and Bipolar encoding.

Encoding/Decoding

Page 5: Lecture # 15 Computer Communication & Networks. Today’s Menu ϞEncoding/Decoding ϞUnipolar, Polar and Bipolar encoding.

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

Ϟ A variety of other encoding schemes are also used

Page 6: Lecture # 15 Computer Communication & Networks. Today’s Menu ϞEncoding/Decoding ϞUnipolar, Polar and Bipolar encoding.

Encoding/Decoding

Types of Encoding

1. Unipolar2. Polar3. 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 with more complex encoding systems

Page 7: Lecture # 15 Computer Communication & Networks. Today’s Menu ϞEncoding/Decoding ϞUnipolar, Polar and Bipolar encoding.

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’

Ϟ The other state usually a ‘0’ is represented by zero

voltage

Page 8: Lecture # 15 Computer Communication & Networks. Today’s Menu ϞEncoding/Decoding ϞUnipolar, Polar and Bipolar encoding.

Unipolar Encoding

Ϟ Figure shows the idea: 1’s are encoded as +ve values, and

0’s are encoded as –ve values

Page 9: Lecture # 15 Computer Communication & Networks. Today’s Menu ϞEncoding/Decoding ϞUnipolar, Polar and Bipolar encoding.

Unipolar Encoding

Pros and Cons of Unipolar Encoding

Pros Ϟ Straight forward and simpleϞ Inexpensive to implement Cons Ϟ DC componentϞ Synchronization

Page 10: Lecture # 15 Computer Communication & Networks. Today’s Menu ϞEncoding/Decoding ϞUnipolar, Polar and Bipolar encoding.

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Ϟ Differential Manchester

Page 11: Lecture # 15 Computer Communication & Networks. Today’s Menu ϞEncoding/Decoding ϞUnipolar, Polar and Bipolar encoding.

Polar Encoding

Page 12: Lecture # 15 Computer Communication & Networks. Today’s Menu ϞEncoding/Decoding ϞUnipolar, Polar and Bipolar encoding.

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 means the bit is a 0 (vice versa)

Page 13: Lecture # 15 Computer Communication & Networks. Today’s Menu ϞEncoding/Decoding ϞUnipolar, Polar and Bipolar encoding.

Non Return to Zero (NRZ)

Problem with NRZ-L: When long streams of 0’s or 1’s are there in data, receiver receives a continuous voltage and should determine how many bits are sent by relying on its clock, which may or may not be synchronized with the sender clock

Page 14: Lecture # 15 Computer Communication & Networks. Today’s Menu ϞEncoding/Decoding ϞUnipolar, Polar and Bipolar encoding.

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Ϟ A transition (low-to-high or high-to-low) at the beginning

of a bit time denotes a binary 1 for that bit time; no transition indicates a binary 0

Page 15: Lecture # 15 Computer Communication & Networks. Today’s Menu ϞEncoding/Decoding ϞUnipolar, Polar and Bipolar encoding.

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

Ϟ The string of 0’s can still cause problem but since 0’s are not as likely, they are less of a problem

Page 16: Lecture # 15 Computer Communication & Networks. Today’s Menu ϞEncoding/Decoding ϞUnipolar, Polar and Bipolar encoding.

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

Ϟ However, their limitations make these codes unattractive for signal transmission applications

Page 17: Lecture # 15 Computer Communication & Networks. Today’s Menu ϞEncoding/Decoding ϞUnipolar, Polar and Bipolar encoding.

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

Ϟ Signal changes not between bits but during each bit

Page 18: Lecture # 15 Computer Communication & Networks. Today’s Menu ϞEncoding/Decoding ϞUnipolar, Polar and Bipolar encoding.

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

Ϟ A 1 bit is represented by positive to zero and a 0 is represented by negative to zero transition

Page 19: Lecture # 15 Computer Communication & Networks. Today’s Menu ϞEncoding/Decoding ϞUnipolar, Polar and Bipolar encoding.

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ϞBut of the 3 alternatives we have discussed, it is most effective

Page 20: Lecture # 15 Computer Communication & Networks. Today’s Menu ϞEncoding/Decoding ϞUnipolar, Polar and Bipolar encoding.

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

2. Differential Manchester

Page 21: Lecture # 15 Computer Communication & Networks. Today’s Menu ϞEncoding/Decoding ϞUnipolar, Polar and Bipolar encoding.

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

Ϟ By using a single transition for a dual purpose, Manchester achieves the same level of synchronization as RZ but with only two levels of amplitude

Page 22: Lecture # 15 Computer Communication & Networks. Today’s Menu ϞEncoding/Decoding ϞUnipolar, Polar and Bipolar encoding.

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

Ϟ Requires 2 signal changes to represent binary 0 but only one to represent binary 1

Page 23: Lecture # 15 Computer Communication & Networks. Today’s Menu ϞEncoding/Decoding ϞUnipolar, Polar and Bipolar encoding.

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

Ϟ This sort of inefficiency is more costly in a long-distance application

Page 24: Lecture # 15 Computer Communication & Networks. Today’s Menu ϞEncoding/Decoding ϞUnipolar, Polar and Bipolar encoding.

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

Ϟ The filling sequence must be recognized by the receiver and replaced with the original data sequence

Page 25: Lecture # 15 Computer Communication & Networks. Today’s Menu ϞEncoding/Decoding ϞUnipolar, Polar and Bipolar encoding.

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Ϟ HDB3

Page 26: Lecture # 15 Computer Communication & Networks. Today’s Menu ϞEncoding/Decoding ϞUnipolar, Polar and Bipolar encoding.

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 means alternate ‘1’ inversion

Page 27: Lecture # 15 Computer Communication & Networks. Today’s Menu ϞEncoding/Decoding ϞUnipolar, Polar and Bipolar encoding.

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Ϟ Because the 1 signals alternate in voltage from positive

to negative, there is no net dc component

Page 28: Lecture # 15 Computer Communication & Networks. Today’s Menu ϞEncoding/Decoding ϞUnipolar, Polar and Bipolar encoding.

Pseudoternary

Ϟ Inverse of AMIϞ In this case, it is the binary 1 that is represented by the

absence of a line signal, and the binary 0 by alternating positive and negative pulses

Page 29: Lecture # 15 Computer Communication & Networks. Today’s Menu ϞEncoding/Decoding ϞUnipolar, Polar and Bipolar encoding.

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)

Ϟ Both modify original pattern of AMI only on case of long stream of zeroes

Page 30: Lecture # 15 Computer Communication & Networks. Today’s Menu ϞEncoding/Decoding ϞUnipolar, Polar and Bipolar encoding.

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)

Ϟ Same as bipolar AMI, except that any string of eight zeros is replaced by a string with two code violations

Page 31: Lecture # 15 Computer Communication & Networks. Today’s Menu ϞEncoding/Decoding ϞUnipolar, Polar and Bipolar encoding.

B8Zs

Page 32: Lecture # 15 Computer Communication & Networks. Today’s Menu ϞEncoding/Decoding ϞUnipolar, Polar and Bipolar encoding.

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

Ϟ Same as bipolar AMI, except that any string of four zeros is replaced by a string with one code violation

Page 33: Lecture # 15 Computer Communication & Networks. Today’s Menu ϞEncoding/Decoding ϞUnipolar, Polar and Bipolar encoding.

HDB3

Ϟ High-Density Bipolar-3 Zeros

Page 34: Lecture # 15 Computer Communication & Networks. Today’s Menu ϞEncoding/Decoding ϞUnipolar, Polar and Bipolar encoding.

HDB3

Ϟ High-Density Bipolar-3 Zeros

Ϟ If the last violation was positive, this violation must be negative, and vice versa

Ϟ The table shows that this condition is tested for by knowing whether the number of pulses since the last violation is even or odd and the polarity of the last pulse before the occurrence of the four zeros

Page 35: Lecture # 15 Computer Communication & Networks. Today’s Menu ϞEncoding/Decoding ϞUnipolar, Polar and Bipolar encoding.

HDB3

Ϟ High-Density Bipolar-3 Zeros