Data Communication & Computer Networks: Week # 4
Data Communication & Computer Networks: Week # 4
Computer Networks
Week # 4
Email: [email protected]
https://sites.google.com/a/cs.uol.edu.pk/dccn/
Powerpoint Templates
ACKNOWLEDGMENTS
These lecture slides contain material from slides prepared
by Behrouz Forouzan for his book Data Communication
and Networking (4th/ 5th edition).
Channel capacity
3
Channel Capacity
Theoretical formulas to calculate the data rate
Nyquist bit rate (noiseless channel)
Shannon’s channel capacity formula (noisy channel)
Nyquist theorem:
Given a bandwidth of B, the highest signal rate that
4
Channel Capacity: Nyquist Bandwidth
Nyquist theorem:
In the general case, in which a signal element may represent more
5
Channel Capacity: Nyquist Bandwidth
Examples:
Bandwidth of voice grade line: 3000 Hz
using binary encoding (each signal level represents 1 bit)
maximum data rate = 2 X B = 2 X 3000 bits/sec
= 6000 bits/sec
6
Nyquist Bandwidth: Examples
For the same channel transmitting a signal with four signal levels
(for each level, we send 2 bits). The maximum bit rate?
7
Nyquist Bandwidth: Examples
How many signal levels to send 200 kbps over a noiseless channel
with a bandwidth of 20 kHz?
8
Shannon capacity formula
maximum data rate or capacity of a noisy channel whose bandwidth is B Hz and whose
signal-to-noise ratio is S/N, is given
C B log 2 1 SNR
This equation represents theoretical maximum that can be achieved
maximum data rate = B log2(1+S/N) bps
9
Channel Capacity: Shannon’s Theorem
Shannon’s Theorem
Example: channel of 3000 Hz and SNR of 30 dB
C= B log2(1+SNR) bps
First, obtain SNR (ratio) from SNRdB
SNRdB 10 log10 S / R 10 log10 SNR
10
Shannon Formula: Example
Spectrum of a channel between 3 MHz and 4 MHz ;
SNRdB = 24 dB
B 4 MHz 3 MHz 1 MHz
SNR dB 24 dB 10 log10 SNR
SNR 251
Using Shannon’s formula
C 10 log 2 1 251 10 8 8Mbps
6 6
11
Shannon Formula: Example
Assume that SNRdB = 36 and the channel bandwidth is 2 MHz
The theoretical channel capacity?
12
Analog/Digital Conversions
Digital-To-Digital Conversion
Representation of digital data by using digital
signals
Techniques for digital-to-digital conversion
Line coding
Block coding
Scrambling
Digital-To-Digital Conversion
Line Coding: the process of converting digital data to
digital signals
Assumption: Data is stored in computer memory as
sequence of bits
Line coding converts sequence of bits to digital signals
digital signal
Digital-To-Digital Conversion
Characteristics of Line Coding Schemes
Signal element versus data element
piece of information
In data communications, our goal is to send data elements
which are what we need to send
Data elements are being carried
A signal element is the shortest unit (time wise) of a digital signal
The data rate (bit rate) is the number of data elements (bits) sent
in I second
The unit is bits per second (bps)
The signal rate (baud rate, modulation rate or pulse rate) is the
the baud rate, not the bit rate, determines the required bandwidth
for a digital signal
Digital-To-Digital Conversion
Characteristics of Line Coding Schemes
Baseline wandering
In decoding a digital signal
Problem with RZ
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
1. Manchester
2. Differential Manchester
Line Coding Schemes: Polar
Biphase: Manchester
Transition in middle of each bit period
Transition serves as clock and data
Used by IEEE 802.3 (10Mbps Ethernet)
Negative-to-Positive Transition (low to high) = 1
Positive-to-Negative Transition (high to low) = 0
Line Coding Schemes: Polar
Bi-phase: Differential Manchester
Mid-bit transition is clocking only (for synchronization)
• Transition at start of a bit period represents zero
• No transition at start of a bit period represents one
• Note: this is a differential encoding scheme
• Used by IEEE 802.5 (Token ring)
Line Coding Schemes: Polar
Line Coding Schemes: Bipolar
Bipolar encoding
There are three voltage levels; +ve, -ve, zero to represent the
symbols (note not transitions to zero as in RZ)
Voltage level for one symbol is at “0” and the other alternates
between +ve & -ve.
Bipolar Alternate Mark Inversion (AMI): the “0” symbol
is represented by zero voltage and the “1” symbol alternates
between +V and -V.
Pseudoternary is the reverse of AMI: the “1” symbol is
represented by zero voltage and the “0” symbol alternates
between +V and -V
Line Coding Schemes: Bipolar
Bipolar encoding
Bipolar Alternate Mark Inversion (AMI) and Pseudoternary
Alternate Mark Inversion(AMI)
Pros and Cons:
Line coding
Block coding
Scrambling
Block Coding
of m bits
For example, in 4B/5B encoding, the original bit sequence
is divided into 4-bit groups
In the substitution 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 in combination step, the n-bit groups are combined
table
◦ the receiver knows that there is an error in the transmission
The 5 bit words are pre-determined in a dictionary and are
chosen in such a way so that there will be at least two
transitions per block of bits
4B/5B mapping codes
Substitution in 4B/5B block coding