0% found this document useful (0 votes)
48 views

Digital To Digital Encoding

Uploaded by

vijay
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
48 views

Digital To Digital Encoding

Uploaded by

vijay
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 51

Digital Transmission

Physical Layer
PSG COLLEGE OF TECHNOLOGY DEPARTMENT OF APPLIED
MATHEMATICS AND COMPUTATIONAL SCIENCES COMPUTER
NETWORKS 20XC42 & 20XW42 COMPUTER NETWORKS
Text and Reference books

TEXT BOOKS:
1. Behrouz A Forouzan, “Data Communications and
Networking”, Tata McGraw Hill, 2013
.2. Behrouz A Forouzan, “TCP/ IP Protocol Suite”, Tata
McGraw Hill, 2017.
3. Peterson, Larry L., and Bruce S. Davie. Computer
networks: a systems approach. Elsevier, 2012.

REFERENCES■
1. Kevin Fall R and Richard Stevens W, "TCP/IP Illustrated,
Volume 1: The Protocols”, Addison-Wesley, Ann Arbor, 2011.
2. James F. Ku rose, Keith Ross, “Computer Networking: A
& TCP/IP
Top-Down Approach”, Addison-Wesley, 2017. a Protocol
3. Douglas Comer, “Internetworking with TCP/IP”, Prentice
Hall, 2013. i
^■! ■
Suite
4. William Stallings, "Data and Computer
Communications”, Prentice Hall, 2007.

hlmiAJiriuan
Digital and Analog Transmission

1) Analog data to Analog signals - The modulation techniques such


as Amplitude Modulation, Frequency Modulation and Phase
Modulation of analog signals --“as is” (e.g., radio) (AD via AT)

2) Digital data to Analog signals - The modulation techniques


such as Amplitude Shift Keying (ASK),Frequency Shift Keying
(FSK), Phase Shift Keying (PSK)——> broadband & wireless
(DD via AT)
3) Analog data to Digital signals - This process can be termed as
digitization, which is done by Pulse Code Modulation (PCM),Delta
Modulation---sampling (e.g., voice, audio, video) (AD via DT)

4) Digital data to Digital signals -Unipolar,Polar,Bipolar,Multilevel,


MLT—baseband ethernet (DD via DT)
Digital Transmission

A computer network is designed to send information from


one point to another. This information needs to be converted to
either a digital signal or an analog signal for transmission
First, we discuss digital-to-digital conversion techniques,
methods which convert digital data to digital signals.
Second, we discuss analog-to-digital conversion techniques,
methods which change an analog signal to a digital signal

Digital to Digital Conversion


Analog to Digital Conversion
Digital to Digital Conversion
• The conversion involves three
techniques:
line coding,
• block coding
4 scrambling.

’ Line coding is always needed;


block coding and scrambling may or may not
be needed.
Line Coding
Line coding is the process of converting digital data to digital
signals.
Line coding converts a sequence of bits to a digital signal. At the
sender, digital data are encoded into a digital signal; at the •
receiver, the digital data are recreated by decoding the digital

Dal a ekmtnt: smallest rcpies^mihg n piece ofinlmnaiion. Signal


dement: shortest unit of a digital signal.
Signal Element vs Data Element
1 data element

• In data communications, our goal is to !1!0!1! 1 data element

send data elements. :1 : 0 : 1 :

• A data element is the smallest entity


11
element
that can represent a piece of 2 signal elements
information: this is the bit. In digital
data communications, a
a. One data element per one signal element (r= b. One data element per two signal
1) elements (r=

signal element carries data elements.


. A signal element is the shortest unit
2 data elements 4 data elements
(timewise) of a digital signal.
1 11 1 01 : : 1 1101

.In other words, data elements


are what we need to send; signal
elements are what we can send.
Data elements are being element 3 signal elements
carried; signal elements are thec.Two
2)
data elements per one signal element (r = d. Four data elements per three signal
elements (r=
carriers.
Data Rate vs Signal Rate
The data rate defines the number of data elements (bits) sent in 1s. The unit is bits per
second (bps).
The signal rate is the number of signal elements sent in 1s. The unit is the baud. Rate
at which the signal changes per second(mesurement of speed)
The data rate is sometimes called the bit rate; the signal rate is sometimes called the
pulse rate, the modulation rate, or the baud rate.
Relationship between data rate and signal rate as

1
S = c x N x ____ r

where N is the data rate (bps); c is the case factor(0-1 ,worst, best, avg), which varies for each case; S is
the number of signal elements; r is the ratio between data element & signal element
• The unit is the baud (Bd)f and ft is a measurement of speed

• This has a baud rate of l_Ekif as the • This has a baud rate of 3_Bd
signal only changes once a second ・ 3 pulses in 1 second
(taken to be the end) ii & rs [

・ This has a baud rate of 1 Bd, and a bit Baud rate still 1 Bd, but the bit rate
rate of 1 bps-only 2 voltage !e 、 /e!s is 2 bps - now each signal
so onlv i hit ne ____ represents 2 bits
Data Communication @lestariningati

Example

• A signal is carrying data in which one data element is encoded as


one signal element (r=1). If the bit rate is 100 kbps, what is the
average value of the baud rate if c is between 0 and 1? Solution

We assume that the average value of c is 1/2 . The baud rate is


then
Data Communication @lestariningati

Example

• A signal is carrying data in which one data element is encoded as


one signal element (r=1). If the bit rate is 100 kbps, what is the
average value of the baud rate if c is between 0 and 1? Solution

We assume that the average value of c is 1/2 . The baud


rate is then

S = cxNx - = 1 x 100,000 x | = 50,000 = 50 kbaud


%---------
A/ofe|

Although the actual bandwidth of a


digital signal is infinite, the effective
bandwidth is finite.

The baud rate, not the bit rate, determines the required
bandwidth for a digital signal
What is the bandwidth that s needed for a
communication channel given the baud rate?
There is a relationship between the baud rate (signal rate) and the bandwidth.
What is the bandwidth of the digital signal if we know the baud rate?
Minimum bandwidth that we need is the baud rate
l’ need to have atleast a bandwidth of the channel equals to baud rate in order to the
Signal to pass through (minimum)
More bandwidth more accurately the signal will be received ..but minimum bandwidth

1
Bmin = C X N X ---
r

Maximum data rate if the bandwidth of the channel is given.


(Same as Nyquist)

=H /c) x x r C = 2 B log22'
Data Communication

Self Synchronisation
To correctly interpret the signals received from the sender, the
‘receiver's bit intervals must correspond exactly to the sender's bit
intervals.
If the receiver clock is faster or slower, the bit intervals are not
matched and the receiver might misinterpret the signals.
Figure shows a situation in which the receiver has a shorter bit
duration. The sender sends 10110001, while the receiver receives
110111000011.
Effect of lack of synchronisation
Data Communication

Example

• In a digital transmission, the receiver clock is 0.1 percent faster than the sender clock.
How many extra bits per second does the receiver receive if the data rate is
1 kbps? How many if the data rate is 1 Mbps?
• Solution
• At 1 kbps, the receiver receives 1001 bps instead of 1000 bps.

1000 bits sent 1001 bits received 1 extra bps

• At 1 Mbps, the receiver receives 1,001,000 bps instead of 1,000,000 bps.

bits sent 1,001,000 bits received 1000 extraj^2gj|


Evaluation consideration for a line
encoding scheme
Baseline Wandering

• Baseline Wandering In decoding a digital signal, the


receiver calculates a running average of the received
signal power. This average is called the baseline. .The
incoming signal power is evaluated against this baseline to
determine the value of the data element.
A long string of Os or 1s can cause a drift in the baseline
(baseline wandering) and make it difficult for the receiver
to decode correctly.
A good line coding scheme needs to prevent baseline
wandering.
DC Components

■ When the voltage level in a digital signal is constant for a


while, the spectrum creates very low frequencies (results
of Fourier analysis).
These frequencies around zero, called DC (direct-
current) components, present problems for a system
that cannot pass low frequencies or a system that uses
electrical coupling (via a transformer).
For example, a telephone line cannot pass frequencies
below 200 Hz. Also a long- distance link may use one or
more transformers to isolate different parts of the line
electrically. For these systems, we need a scheme with
no DC component
Self synchronization

’ •To correctly interpret the signals,


receiver’s bit
intervals should exactly match with the sender’s bit
intervals.
' ・ The ability to recover timing from the signal itself. ・
Long series of ones and zeros could cause a problem
Built in Error Detection
It is desirable to have a built-in error-detecting capability in the
generated code to detect some of or all the errors that occurred
• during transmission.

Immunity to Noise and Interference

Another desirable code characteristic is a code that is immune to


noise and other interferences.
Complexity
A complex scheme is more costly to implement than a simple one.
• For example, a scheme that uses four signal levels is more
difficult to interpret than one that uses only two levels.
Data Communication

Line Coding Schemes

-----NRZ

______ NRZ, RZ, and biphase (Manchester,


and differential Manchester)

-----AMI and pseudoternary


Line coding

----- 2B/1Q, 8B/6T,and4D-PAM5

-----MLT-3
Data Communication

Unipolar Scheme

In a unjpolar scheme, all the signal,levels are on one side of


the time axis, either above or below.
NRZ (Non-Return-to-Zero) positive voltage defines bit 1 and
the zero voltage defines bit 0.
It is called NRZ because the signal does not return to zero at
the nAfnpiitude ......
1I
0
;1:1; 101
1 1 |v2+»o)2= |v2
1 1
1k
i Time Normalized power
i
1 1
i

□□11

Dming this “run1 ofQs, there are no oteerraMe Mt


bo<widuie$ makiqg it difficult foi We nceiTH to
distinguish OIB 0 finm aMottsr.
I I I I I I
Polar Schemes

In polar schemes, the voltages are on the both sides of the time axis. For example, the
voltage level for 0 can be positive and the voltage level for 1 can be negative.
In polar Non-Return-to-Zero (NRZ) encoding, we use two levels of voltage
amplitude. We can have two versions of polar NRZ: NRZ-Land NRZ-I, as shown in
Figure. The figure also shows the value of r, the average baud rate, and the bandwidth.
In the first variation, NRZ-L (NRZ-Level), the level of the voltage determines the value
of the bit. In the second variation, NRZ-I (NRZ-lnvert), the change or lack of
change in the level of the voltage determines the value of the bit. If there is no change,
the bit is 0; if there is a change, the bit is 1.

r= 1 S
ave=N/2

O No inversion: Next bit is 0 • Inversion: Next bit is 1


Polar RZ Use three
level +,-,0
In HZ, the signal changes not between bits but during the bit. (0 does not carry data-
extra signal level)
signal returns to 0 in the middle of each bit. It remains there until the beginning of the
next bit.
Timing information can be put in the middle of the bit
No constant voltage -no zero frequencies no de component
The main disadvantage of RZ encoding is that it requires two signal changes to
encode a bit and therefore occupies greater bandwidth.
The same problem we mentioned, a sudden change of polarity resulting in all as
interpreted as 1s and all 1s interpreted as as, still exist here, but there is no DC
component problem.
Data Communication

Biphase: Manchester and Differential Manchester The idea of


RZ (transition in middle of the bit) and the idea of NRZ-L are combined into the
Manchester scheme
•In Manchester encoding, the duration of the bit is divided into two halves. The voltage
remains at one level during the first half and moves to the other level in the second
half. The transition at the middle of the bit provides synchronization.
Differential Manchester, on the other hand, combines the ideas of RZ and NRZ-I.
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 none.

-4 Save-N
[

1- Bandwidth
0.5-

U
( )1 1 1
2 f/N
Bipolar Schemes: AMI and Pseudoternary

In bipolar encoding (sometimes called multilevel binary), there are three


voltage lev- els: positive, negative, and zero. . 3 levels for data
representation
The voltage level for one data element is at zero, while the voltage level for the
other element alternates between positive and negative.
A common bipolar encoding scheme is called bipolar alternate mark inversion
(AMI). A neutral zero voltage represents binary 0.
Binary Is are represented by alternating positive and negative voltages.
A variation of AMI encoding is called pseudoternary in which the 1 bit is
encoded as a zero voltage and the 0 bit is encoded as alternating positive
Data Communication

Multilevel Schemes
Group data bits and form data pattern then map them from a group of signal elements
The goal is to increase the number of bits per baud by encoding a pattern of m data
elements into a pattern of n signal elements.
Two types of data elements (Os and 1s), which means that a group of m data elements can
produce a combination of 2m data patterns.

If we have L different levels, then we can produce Ln combinations of signal patterns. If 2m


=Ln, then each data pattern is encoded into one signal pattern.
If 2m < Ln, data patterns occupy only a subset of signal patterns.
Data encoding is not possible if 2m > Ln because some of the data patterns cannot be
encoded.
The code designers have classified these types of coding as mBnL, where m is the length of
the binary pattern, B means binary data, n is the length of the signal pattern, and L is the
number of levels in the signaling.
length of the length of signal
binary pattern pattern

binary data number of levels in


signaling
B (binary) where L-2
Q (quaternary) where L=4 B
(binary) where L=2
Data Communication 2B1Q Scheme

2 bits are encoded into and


the total number of levels
used in signaling is
length of the length of signal
binary pattern pattern

L_
number of levels in
binary data signaling

The average signal rate of 2B1Q is S =N/4.


’ This means that using 2B1Q, we can send data 2 times faster than
by using NRZ-L. However, 2B1Q uses four different signal levels,
which means the receiver has to discern four different thresholds.
There are no redundant signal patterns in this scheme because 22
=41.
Data Communication @lestariningati

Previous level: Previous level:


positive negative
Next Next Next
bits level level
00 +1 -1
01 +3 -3
10 -1 +1
11 -3 +3
Transition table

Assuming positive original level


8B6T Scheme

a pattern of 8 data elements is encoded into a pattern of 6 signal elements where the signal
has 3 levels

2 types of data elements 3 types of signal elements


0 and 1

Group of 8 data elements I


2s data patterns Group of 6 ^gnal elements 36

Number of Redundant Signal signal


Patterns
patterns

Number of data patterns = 2s = 256


Number of signal patterns = 36 = 729
Number of redundant signal patterns = 729 - 256 =
473
Mapping Table 8B6T (partial)
+ 0 + -0
■:

■ *>0^*0 [ .■ - * ■a ■ I ■ Q Q

■ o3" ’*■■ w3 “

QOQ
D■■-0 DC«000 Q»*■«■
*C
•0”0 • •OQd
A
««OQQ
-

,■

QV^VQ 0-^
■ ■ «(tv

0-«o 4*

Q ■ ■ ■'-
Data Communication

8B6T Scheme

• This code is used with 100BASE-4T cable.


* Each signal pattern has a weight of 0 or +1 DC values. This means that there is
no pattern with the weight -1.
To make the whole stream DC-balanced, the sender keeps track of
the .weight.
If two groups of weight 1 are encountered one after another, the first one is
sent as is, while the next one is totally inverted to give a weight of -1.
DIGITAL DATA
I 8B6T| [partial)
000100010101001101010000 Code

+ -. + 0 +
00010001 ■ 01010011 ;
1 01010000 ;
I 1
1
1 tt
i
r 01010000 ---------► 50
inverted
t
1 t
1
inverted
+”+0+
1 I

-0-0++ ; -+-++0 i + — + 0+ i
weight: 0 weight: *1 weight: -1 >

““I~
weight: +1
Mapping Table 8B6T (partial)
+ 0 + -0
■:

■ *>0^*0 [ .■ - * ■a ■ I ■ Q Q

■ o3" ’*■■ w3 “

QOQ
D■■-0 DC«000 Q»*■«■
*C
•0”0 • •OQd
A
««OQQ
-

,■

QV^VQ 0-^
■ ■ «(tv

0-«o 4*

Q ■ ■ ■'-
4D-PAM5(Four-dimensional five- level pulse amplitude
modulation

•4D means that data is sent over four wires at the same
uses five voltage levels, such as -2, -1, 0,
•one level, level 0, is used only for forward error detection
in other words, an 8-bit word is translated to a signal element of four
different levels.
The technique is designed to send data over four channels (four wires). All 8 bits
can be fed into a wire simultaneously and sent by using one signal element.
Gigabit LANs use this technique to send 1-Gbps data over four copper cables that
can handle 125 Mbaud.
This scheme has a lot of redundancy in the signal pattern because 28 data
patterns are matched to 44= 256 signal patterns. The extra signal patterns can be
used for other purposes such as error detection.
Data Communication

00011110 1 Gbps
A 250 Mbps
---------Wire 1 (125 MBd)
>
250 Mbps
---------Wire 2 (125 MBd)

+2- 250 Mbps


+1- I ---------Wire 3 (125 MBd)
>
-1 - 250 Mbps
-2 - ---------Wire 4 (125 MBd)

>
Multiline Transmission: MLT-3

• The multiline transmission, three level (MLT-3) scheme uses three


levels (+V 0, and - V) and three transition rules to move between
the levels.
1.If the next bit is 0, there is no transition.
2. If the next bit is 1 and the current level is not 0, the next level
is 0.
3. If the next bit is 1 and the cutTent level is 0, the next level is
the opposite of the last nonzero level.
The behavior of MLT-3 can best be described by the state
• diagram
MLT-3 a suitable choice when we need to send 100 Mbps on a
copper wire
a.Typicalcase

c,Transition states

b. Worse case
Summary of Line Coding Schemes

Bandwidth
Category Scheme (average) Characteristics
Unipolar NRZ B = N/2 Costly, no self-synchronization if long Os or Is, DC
NRZ-L B = N/2 No self-synchronization if long Os or Is, DC
Polar ■ NRZ-I B = N/2 No self-synchronization for long Os, DC

Biphase B=N Self-synchronization, no DC, high bandwidth


Bipolar AMI B = N/2 No self-synchronization for long Os, DC

2B1Q B = N/4 No self- synchronization for long same double bits


Multilevel 8B6T B = 3N/4 Self-synchronization, no DC
4D-PAM5 B = N/8 Self-synchronization, no DC
Multiline MLT-3 B = N/3 No self-synchronization for long Os
Data Communication Block Coding

・ We need redundancy to ensure synchronization and to provide some


kind of inherent error detecting.
•Block coding changes a block of m bits into a block of n bits, where n is
larger than m. Block coding is referred to as an mB/nB encoding
technique.
•Block coding normally involves three steps: division, substitution, and
combination.
・ In the division step, a sequence of bits is divided into groups of m bits.
・ For example, in 4B/5B encoding, the original bit sequence is divided into 4-bit
groups.
・ The heart of block coding is the substitution step.
•In this step, we substitute an m-bit group for an n-bit group. For example, in 4B/5B
encoding we substitute a 4-bit code for a 5-bit group.
・ Finally, the n-bit groups are combined together to form a stream.
・ The new stream has more bits than the original bits.
Block coding concept

Sender Receiver

NRZ-I 4B/5B
encoding encoding decoding decoding
4B/5B
Every 4 bits of data is encoded into a 5-bit code. The 5-bit codes are normally line
coded using NRZ-invert (longer sequences of 1 are tolerated)!!! The selection of the 5-
bit code is such that each code contains no more than one leading 0 and no more
than two trailing Os.

Therefore, when these 5-bit codes are sent in sequence, no more than three
consecutive Os are encountered.
4-bit blocks 5-bit blocks

4B/5B coding is used in the optical fiber transmission $ystem (FDDI).


Sender

a Digital signal
a
Link
Data Communication

4B/5B Mapping Codes

Data Sequence Encoded Sequence Control Sequence Encoded Sequence


0000 11110 Q (Quiet) JOQOOcC

0001 01001
I (Idle) Q11TTr^

H (Halt) 'durud'
0010 10100
0011 10101 J (Start delimiter) 11000
0100 01010 K (Stall delimiter) 10001
0101 01011 T (End delimiter) 01101
0110 OHIO S (Set) 11001
0111 01111 R (Reset) 00111
1000 10010
1001 10011
1010 10110
1011 10111
1100 11010
1101 11011
1110 11100
1111 11101
Data Communication 8B/10B
□ The eight binary/ten binary (8B/10B) encoding is similar to
4B/5B encoding except that a group of 8 bits of data is now
substituted by a 10-bit code.
□ It provides greater error detection capability than 4B/5B.
□ The 8B/10B block coding is actually a combination of 5B/6B

In general, the technique is superior to 4B/5B because of better built-in error-checking


capability and better synchronization.
Data Communication Scrambling

•Biphase schemes that are suitable for dedicated links between stations in a LAN ・
Not suitable for long-distance communication because of their wide bandwidth
•requirement.
•The combination of block coding and NRZ line coding is not suitable for longdistance
encoding either, because of the DC component.

•Bipolar AMI encoding, on the other hand, has a narrow bandwidth and
does not create a DC component.
•However, a long sequence of Os upsets the synchronization.
•One solution is called scrambling. We modify part of the AMI rule to include
scrambling.
•Note that scrambling, as opposed to block coding, is done at the same time as
encoding. The system needs to insert the required pulses based on the defined
scrambling rules.
•Two common scrambling techniques ar
Data Communication

Bipolar with 8-zero substitution (B8ZS)


Bipolar with S-zero substitution (BSZS) is commonly used in North America. In
this .technique, eight consecutive zero-level voltages are replaced by the sequence
000VB0VB.
The V in the sequence denotes violation; this is a nonzero voltage that breaks an AMI
rule of encoding (opposite polarity from the previous).
The B in the sequence denotes bipolm.,which means a nonzero level voltage in
accordance with the AMI rule.

Sender Receiver

Violated digital signal

a nr
Modified AMI
」u
Modified AMI \
encoding x
encoding U
Data Communication @lestariningati

B8ZS substitutes eight consecutive zeros with 000VB0VB.

• There are two cases, as shown in Figure

100000000

H »»n H
i i i i i l_l ■ i
1 1 1 1 1
1g1 1 y1 1
a. Previous level is positive.

• One more point is worth mentioning. The letter V (violation) or B (bipolar) here is relative.
The V means the same polarity as the polarity of the previous nonzero pulse; B means the
polarity opposite to the polarity of the previous nonzero pulse.
Data Communication High-density bipolar 3-zero (HDB3)

High-density bipolar 3-zero (HDB3) is commonly used outside of North


America.
In this technique, which is more conservative than B8ZS, four consecutive
zero-level voltages are replaced with a sequence of OOOVor BOOV. The
reason for two different substitutions is to maintain the even number of
nonzero pulses after each substitution.
The two rules can be stated as follows:
1. If the number of nonzero pulses after the last substitution is odd, the
substitution pattern will be 000V, which makes the total number of
nonzero pulses even.
2. If the number of nonzero pulses after the last substitution is even, the
substitution pattern will be BOOV, which makes the total number of
nonzero pulses even.
Data Communication

First Second Third


substitution substitution substitution

|-| no ; 0ri
I
i L ! !
I
I
1
1 1
I ! I
」1
1
1 1 1 I i
1
1
1
1
1 i i 1 1
1 i i i i i
1 1 .....v......
1 1
we need11 to mention
1 1 1 1 1 v
• There are several points
1 1 here.
1 First,
1 before
1 the first substitution, the
number of nonzero t pulses is1 even,
M sof the f first substitution is BOOV. After this substitution,

the polarity of the 1 bit is changed because the AMI scheme, after each substitution, must
follow its own rule. After this bit, we need another substitution, which is 000V because we
have only one nonzero pulse (odd) after the last substitution. The third substitution is BOOV
because there are no nonzero pulses after the second substitution (even).
Example

• The maximum data rate of a channel (see Chapter 3) is Nmax = 2 x B x iog2 L (defined by
the Nyquist formula). Does this agree with the previous formula for Nmax?
• Solution
• A signal with L levels actually can carry log2L bits per level. If each level corresponds to
one signal element and we assume the average case (c = 1/2), then we have

2Vmax = - xB xr = 2xB x log2L c


If a signal does not change at allT its
frequency is zero.
If a signal changes instantaneously,
its frequency is infinite.

In digital signal ,the signal changes from 0 to 1 immediately

In networking, we use the term


bandwidth in two contexts. \ The
first, bandwidth in hertz, refers the range
of frequencies in composite signal or
the range frequencies that a channel can
pas

\ The second, bandwidth in bits per


second, refers to the speed of bit
transmission in a channel or link.

You might also like