19-202-0306
DATA AND COMPUTER
COMMUNICATION
Reference Textbooks
1) Behrouz A. Forouzan, Data
Communication and Networking,
4th Edition, McGraw Hill, 2006.
2) Behrouz A. Forouzan, Data
Communication and Networking,
5th Edition, McGraw Hill, 2012
Chapter 1
Introduction
DATA COMMUNICATIONS
• The term telecommunication means
communication at a distance.
• The word data refers to information presented
in whatever form is agreed upon by the parties
creating and using the data.
• Data communications are the exchange of data
between two devices via some form of
transmission medium such as a wire cable.
• Factors affecting effectiveness of data
communication system : delivery, accuracy,
timeliness, jitter
Components of a data communication system
Data flow (simplex, half-duplex, and full-duplex)
NETWORKS
A network is a set of devices (often referred to as
nodes) connected by communication links. A node
can be a computer, printer, or any other device
capable of sending and/or receiving data generated
by other nodes on the network. A link can be a cable,
air, optical fiber, or any medium which can transport a
signal carrying information.
Network Criteria
Performance
Depends on Network Elements
Measured in terms of Delay and Throughput
Reliability
Failure rate of network components
Measured in terms of availability/robustness
Security
Data protection against corruption/loss of data due to:
Errors
Malicious users
Physical Structures
Type of Connection
Point to Point - single transmitter and receiver
Multipoint - multiple recipients of single transmission
Physical Topology
Connection of devices
Types of connections: point-to-point and multipoint
Categories of topology
A fully connected mesh topology (five devices)
A star topology connecting four stations
A bus topology connecting three stations
A ring topology connecting six stations
A hybrid topology: a star backbone with three bus netwo
Network Types
Local Area Networks (LANs)
Short distances
Designed to provide local interconnectivity
Wide Area Networks (WANs)
Long distances
Provide connectivity over large areas
Internetworks
Two or more networks connected
An isolated LAN in the past and today
WANs: a point-to-point WAN and a switched WAN
An internetwork made of two LANs and one point-to-point WAN
Switching
• a switch connects at least two links together
• two types :circuit-switched and packet-switched
• In a circuit-switched network, a dedicated
connection, called a circuit, is always available
between the two end systems; the switch can only
make it active or inactive.
• In a packet-switched network, the communication
between the two ends is done in blocks of data
called packets
Circuit Switched Network
Packet Switched Network
THE INTERNET
The Internet has revolutionized many aspects of our
daily lives. It has affected the way we do business as
well as the way we spend our leisure time. The
Internet is a communication system that has brought
a wealth of information to our fingertips and
organized it for our use.
The Internet today
PROTOCOLS
A protocol is synonymous with rule. It consists of a
set of rules that govern data communications. It
determines what is communicated, how it is
communicated and when it is communicated. The
key elements of a protocol are syntax, semantics and
timing
Elements of a Protocol
Syntax
Structure or format of the data
Indicates how to read the bits - field delineation
Semantics
Interprets the meaning of the bits
Knows which fields define what action
Timing
When data should be sent and what
Speed at which data should be sent or speed at which it is
being received.
Internet Standards
Thoroughly tested specification that is useful to and
adhered to by those who work with the Internet
Internet Administration
Chapter 2
Network Models
LAYERED TASKS
We use the concept of layers in our daily life. As an
example, let us consider two friends who
communicate through postal mail. The process of
sending a letter to a friend would be complex if there
were no services available from the post office.
Tasks involved in sending a letter
THE OSI MODEL
Established in 1947, the International Standards
Organization (ISO) is a multinational body dedicated
to worldwide agreement on international standards.
An ISO standard that covers all aspects of network
communications is the Open Systems
Interconnection (OSI) model. It was first introduced
in the late 1970s.
Note
ISO is the organization.
OSI is the model.
Seven layers of the OSI model
An exchange using the OSI model
LAYERS IN THE OSI MODEL
In this section we briefly describe the functions of
each layer in the OSI model.
Physical layer
Note
The physical layer is responsible for movements of
individual bits from one hop (node) to the next.
Physical layer- other functionalities
• Defines physical characteristics of interface and
medium
• Defines type of encoding
• Defines the duration of a bit
• Defines the direction of transmission
• Concerned with the synchronization of sender and
receiver at the bit level.
Data link layer
Note
The data link layer is responsible for moving
frames from one hop (node) to the next.
Data link layer-other functionalities
• Framing
• Flow control
• Error control
• Access control
• Physical addressing
Hop-to-hop delivery
Network layer
Note
The network layer is responsible for the
delivery of individual packets from
the source host to the destination host.
Network layer-other functionalities
• Logical Addressing
• Routing
Source-to-destination delivery
Transport layer
Note
The transport layer is responsible for the delivery
of a message from one process to another.
Reliable process-to-process delivery of a message
Transport layer-other functionalities
• Service point addressing
• Segmentation and reassembly
• Connection control
Session layer
Note
The session layer is responsible for dialog
control and synchronization.
Presentation layer
Note
The presentation layer is responsible for translation,
compression, and encryption.
Application layer
Note
The application layer is responsible for
providing services to the user.
Summary of layers
Data Format in different layers
Physical layer- bits
Data link layer- frames
Network layer-packets
Transport layer-segments
Higher layers- message
Devices in different layers
TCP/IP PROTOCOL SUITE
The layers in the TCP/IP protocol suite do not exactly
match those in the OSI model. The original TCP/IP
protocol suite was defined as having four layers:
host-to-network, internet, transport, and application.
However, when TCP/IP is compared to OSI, we can
say that the TCP/IP protocol suite is made of five
layers: physical, data link, network, transport, and
application.
TCP/IP and OSI model
TCP/IP vs OSI model
ADDRESSING
Four levels of addresses are used in an internet
employing the TCP/IP protocols: physical, logical, port,
and specific.
Addresses in TCP/IP
Relationship of layers and addresses in TCP/IP
Physical Address
• Address of a node
• Included in the frame used by data link layer
• Lowest level address
Physical addresses
Physical Address
Physical addresses are 48-bit (6-byte) written as 12
hexadecimal digits; every byte (2 hexadecimal digits)
is separated by a colon, as shown below:
07:01:02:01:2C:4B
A 6-byte (12 hexadecimal digits) physical address.
Logical Address
• Universal addressing system in which each host
can be uniquely identified , regardless of
underlying physical network
• 32-bit address that can uniquely define a host
connected to the Internet
Logical addresses
Note
The physical addresses will change from hop to hop,
but the logical addresses usually remain the same.
Port Address
• For processes to receive data simultaneously, we
need to label the different processes
• The label assigned to a process is called port
address
• Port address is 16 bits in length
Figure 2.21 Port addresses
Port Address
A port address is a 16-bit address represented by
one decimal number as shown below
753
A 16-bit port address represented
as one single number.
Specific Address
Some applications have user-friendly addresses that
are designed for that specific application .
Eg:- e-mail address , URL
Chapter 3
Data and Signals
.
Note
To be transmitted, data must be
transformed to electromagnetic signals.
ANALOG AND DIGITAL
Data can be analog or digital. The term analog data refers to
information that is continuous; digital data refers to information
that has discrete states. Analog data take on continuous values.
Digital data take on discrete values.
Analog and Digital Signals
• Signals can be analog or digital.
• Analog signals can have an infinite
number of values in a range.
• Digital signals can have only a limited
number of values.
Comparison of analog and digital signals
PERIODIC ANALOG SIGNALS
In data communications, we commonly use periodic
analog signals and nonperiodic digital signals.
Periodic analog signals can be classified as simple
or composite. A simple periodic analog signal, a sine
wave, cannot be decomposed into simpler signals. A
composite
periodic analog signal is composed of multiple sine
waves.
A sine wave
Sine wave is represented by 3 parameters: peak amplitude, frequency
and phase.
Two signals with the same phase and frequency, but different
amplitudes
Note
Frequency and period are the inverse of
each other.
Two signals with the same amplitude and phase, but different
frequencies
Units of period and frequency
Example
The power we use at home has a frequency of 60 Hz.
The period of this sine wave can be determined as
follows:
Example
The period of a signal is 100 ms. What is its
frequency in kilohertz?
Solution
First we change 100 ms to seconds, and then we
calculate the frequency from the period (1 Hz = 10−3
kHz).
Frequency
• Frequency is the rate of change with
respect to time.
• Change in a short span of time means
high frequency.
• Change over a long span of
time means low frequency.
Note
If a signal does not change at all, its
frequency is zero.
If a signal changes instantaneously, its
frequency is infinite.
Note
Phase describes the position of the
waveform relative to time 0.
Three sine waves with the same amplitude and frequency, but different
phases
Example
A sine wave is offset 1/6 cycle with respect to time 0.
What is its phase in degrees and radians?
Solution
We know that 1 complete cycle is 360°. Therefore,
1/6 cycle is
Wavelength and period
Wavelength=propagation speed * period
The time-domain and frequency-domain plots of a sine wave
Note
A complete sine wave in the time domain
can be represented by one single spike in
the frequency domain.
Example
The frequency domain is more compact and useful
when we are dealing with more than one sine wave.
For example, the figure in the following slide shows
three sine waves, each with different amplitude and
frequency. All can be represented by three spikes in
the frequency domain.
The time domain and frequency domain of three sine waves
Signals and Communication
A single-frequency sine wave is not
useful in data communications
We need to send a composite signal,
a signal made of many simple sine
waves.
According to Fourier analysis, any
composite signal is a combination
of simple sine waves with different
frequencies, amplitudes, and
phases.
Composite Signals and
Periodicity
If the composite signal is periodic, the
decomposition gives a series of
signals with discrete frequencies.
If the composite signal is nonperiodic,
the decomposition gives a
combination of sine waves with
continuous frequencies.
Example-A composite periodic signal
Decomposition of a composite periodic signal in the time and frequency
domains
The time and frequency domains of a nonperiodic signal
Bandwidth and Signal
Frequency
The bandwidth of a composite signal
is the difference between the highest
and the lowest frequencies contained
in that signal.
The bandwidth of periodic and nonperiodic composite signals
Example
If a periodic signal is decomposed into five sine
waves with frequencies of 100, 300, 500, 700, and
900 Hz, what is its bandwidth? Draw the spectrum,
assuming all components have a maximum
amplitude of 10 V.
Solution
Let fh be the highest frequency, fl the lowest
frequency, and B the bandwidth. Then
The spectrum has only five spikes, at 100, 300, 500,
700, and 900 Hz.
The bandwidth for Example
Example
A periodic signal has a bandwidth of 20 Hz. The
highest frequency is 60 Hz. What is the lowest
frequency? Draw the spectrum if the signal contains
all frequencies of the same amplitude.
Solution
Let fh be the highest frequency, fl the lowest
frequency, and B the bandwidth. Then
The spectrum contains all integer frequencies. We
show this by a series of spikes
The bandwidth for Example
Example
A nonperiodic composite signal has a bandwidth of
200 kHz, with a middle frequency of 140 kHz and
peak amplitude of 20 V. The two extreme
frequencies have an amplitude of 0. Draw the
frequency domain of the signal.
Solution
The lowest frequency must be at 40 kHz and the
highest at 240 kHz. Figure shows the frequency
domain and the bandwidth.
The bandwidth for Example
Real Life examples of non periodic composite
signal
n The signal propagated by an AM radio station.
n The signal propagated by an FM radio station.
n The signal received by an old-fashioned analog
black-and-white TV.
DIGITAL SIGNALS
In addition to being represented by an analog signal,
information can also be represented by a digital
signal. For example, a 1 can be encoded as a positive
voltage and a 0 as zero voltage. A digital signal can
have more than two levels. In this case, we can send
more than 1 bit for each level.
Two digital signals: one with two signal levels and the
other with four signal levels
Example
A digital signal has eight levels. How many bits are
needed per level?
We calculate the number of bits from the formula
Each signal level is represented by 3 bits.
Example
A digital signal has nine levels. How many bits are
needed per level?
We calculate the number of bits by using the formula.
Each signal level is represented by 3.17 bits.
However, this answer is not realistic. The number of
bits sent per level needs to be an integer .For this
example, 4 bits can represent one level.
Example
Assume we need to download text documents at the
rate of 100 pages per sec. A page is an average of
24 lines with 80 characters in each line. Assume that
one character requires 8 bits . What is the required
bit rate of the channel?
Solution
The bit rate is
Example
A digitized voice channel, is made by digitizing a 4-
kHz bandwidth analog voice signal. We need to
sample the signal at twice the highest frequency
(two samples per hertz). We assume that each
sample requires 8 bits. What is the required bit rate?
Solution
The bit rate can be calculated as
Digital Signal as a Composite Analog Signal
n Based on Fourier analysis, a digital signal is a composite
analog signal
n If digital signal is periodic, the decomposed signal has a
frequency domain representation with infinite bandwidth and
discrete frequencies
n If digital signal is non- periodic, the decomposed signal has a
frequency domain representation with infinite bandwidth and
continuous frequencies
The time and frequency domains of periodic and nonperiodic digital signals
Note
A digital signal is a composite analog
signal with an infinite bandwidth.
Digital Signal Transmission-Baseband transmission
Baseband transmission means sending digital signal
over a channel without changing the digital signal to
analog signal.
Baseband transmission requires a low-pass channel, a
channel with a bandwidth that starts from zero
Bandwidths of two low-pass channels
Case 1:Low pass channel with wide bandwidth
Example
n An example of a dedicated channel where the
entire bandwidth of the medium is used as one
single channel is a LAN.
n In a bus topology LAN with multipoint
connections, only two stations can communicate
with each other at each moment in time
(timesharing); the other stations need to refrain
from sending data.
n In a star topology LAN, the entire channel
between each station and the hub is used for
communication between these two entities.
Note
Baseband transmission of a digital signal
that preserves the shape of the digital
signal is possible only if we have a low-
pass channel with an infinite or very wide
bandwidth.
Case 2: Low Pass Channel with Limited Bandwidth
n Approximate the digital signal with an analog signal
n Level of approximation depends on the bandwidth available
n 3 levels of approximation
n Rough approximation is achieved using first harmonic
frequency
n B= N/2, where B is the bandwidth and N is the bit rate
n Better approximation is achieved using first and third harmonic
frequency
n Third harmonic, B= 3N/2
n
Case 2: Low Pass Channel with Limited Bandwidth
Note
InIn baseband
baseband transmission,
transmission, thebandwidth
the required requiredis
bandwidthproportional
is proportional
to the bitto the bit rate;
rate;
if need
if we we need
to sendto send
bits bits
faster, faster,
we need morewebandwidth.
need
more bandwidth.
Bandwidth requirements
Example
What is the required bandwidth of a low-pass channel
if we need to send 1 Mbps by using baseband
transmission?
Solution
The answer depends on the accuracy desired.
a. The minimum bandwidth, is B = bit rate /2, or 500
kHz.
b. A better solution is to use the first and the third
harmonics with B = 3 × 500 kHz = 1.5 MHz.
c. Still a better solution is to use the first, third, and
Example
We have a low-pass channel with bandwidth 100 kHz.
What is the maximum bit rate of this channel?
Solution
The maximum bit rate can be achieved if we use the
first harmonic. The bit rate is 2 times the available
bandwidth, or 200 kbps.
Digital Signal Transmission-Broadband transmission
• Broadband transmission or modulation means changing the
digital signal to analog signal for transmission
• Uses bandpass channel- a channel with a bandwidth that
does not start from zero
Note
If the available channel is a bandpass
channel, we cannot send the digital signal
directly to the channel;
we need to convert the digital signal to an
analog signal before transmission.
Modulation of a digital signal for transmission on a bandpass
channel
Example
An example is sending of computer data through a
telephone subscriber line, the line connecting a
resident to the central telephone office. These lines
are designed to carry voice with a limited bandwidth.
The channel is considered a bandpass channel. We
convert the digital signal from the computer to an
analog signal, and send the analog signal. We can
install two converters to change the digital signal to
analog and vice versa at the receiving end. The
converter, in this case, is called a modem
Example
A second example is the digital cellular telephone .
Although the bandwidth allocated to a company
providing digital cellular phone service is very wide,
we still cannot send the digital signal without
conversion. The reason is that we only have a
bandpass channel available between caller and
callee. We need to convert the digitized voice to a
composite analog signal before sending.
TRANSMISSION IMPAIRMENT
Signals travel through transmission media, which are
not perfect. The imperfection causes signal
impairment. This means that the signal at the
beginning of the medium is not the same as the
signal at the end of the medium. What is sent is not
what is received. Three causes of impairment are
attenuation, distortion, and noise.
Causes of impairment
Attenuation
Means loss of energy -> weaker signal
When a signal travels through a
medium it loses energy overcoming the
resistance of the medium
Amplifiers are used to compensate for
this loss of energy by amplifying the
signal.
Attenuation
Measurement of Attenuation
To show the loss or gain of energy the
unit “decibel” is used.
dB = 10log10P2/P1
P1 - input signal
P2 - output signal
Example
Suppose a signal travels through a transmission
medium and its power is reduced to one-half. This
means that P2 is (1/2)P1. In this case, the
attenuation (loss of power) can be calculated as
A loss of 3 dB (–3 dB) is equivalent to losing one-
half the power.
Example
A signal travels through an amplifier, and its power is
increased 10 times. This means that P2 = 10P1 . In
this case, the amplification (gain of power) can be
calculated as
Example
One reason that engineers use the decibel to
measure the changes in the strength of a signal is
that decibel numbers can be added (or subtracted)
when we are measuring several points (cascading)
instead of just two. In the following figure a signal
travels from point 1 to point 4. In this case, the
decibel value can be calculated as
Decibels for Example
Example
Sometimes the decibel is used to measure signal
power in milliwatts. In this case, it is referred to as
dBm and is calculated as dBm = 10 log10 Pm , where
Pm is the power in milliwatts. Calculate the power of
a signal with dBm = −30.
Solution
We can calculate the power in the signal as
Example
The loss in a cable is usually defined in decibels per
kilometer (dB/km). If the signal at the beginning of a
cable with −0.3 dB/km has a power of 2 mW, what is
the power of the signal at 5 km?
Solution
The loss in the cable in decibels is 5 × (−0.3) = −1.5
dB. We can calculate the power as
Distortion
Means that the signal changes its form or
shape
Distortion occurs in composite signals
Each frequency component has its own
propagation speed traveling through a
medium.
The different components therefore arrive
with different delays at the receiver.
That means that the signals have different
phases at the receiver than they did at the
source.
Distortion
Noise
There are different types of noise
Thermal - random noise of electrons in the
wire creates an extra signal
Induced - from motors and appliances,
devices act as transmitter antenna and
medium as receiving antenna.
Crosstalk - same as above but between two
wires.
Impulse - Spikes that result from power
lines, lightning, etc.
Noise
Signal to Noise Ratio (SNR)
To measure the quality of a system the SNR is
often used. It indicates the strength of the
signal with respect to the noise power in the
system.
It is the ratio between two powers.
It is usually given in dB and referred to as
SNRdB.
Two cases of SNR: a high SNR and a low SNR
Example
The power of a signal is 10 mW and the power of the
noise is 1 μW; what are the values of SNR and SNRdB ?
Solution
The values of SNR and SNRdB can be calculated as
follows:
Example
The values of SNR and SNRdB for a noiseless channel
are
We can never achieve this ratio in real life; it is an
ideal.
DATA RATE LIMITS
A very important consideration in data
communications is how fast we can send data, in
bits per second, over a channel. Data rate depends
on three factors:
1. The bandwidth available
2. The level of the signals we use
3. The quality of the channel (the level of noise)
Capacity of a System
The bit rate of a system increases with an
increase in the number of signal levels we use
to denote a symbol.
A symbol can consist of a single bit or “n” bits.
The number of signal levels = 2n.
As the number of levels goes up, the spacing
between level decreases -> increasing the
probability of an error occurring in the
presence of transmission impairments.
Increasing the levels of a signal reduces the
reliability of the system
Noiseless channel: Nyquist Bit Rate
Nyquist bit rate formula defines the
theoretical maximum bit rate
Nyquist theorem states that for a noiseless
channel:
C = 2 B log22n
Where,
C= capacity in bps
B = bandwidth in Hz
Example
Consider a noiseless channel with a bandwidth of
3000 Hz transmitting a signal with two signal levels.
The maximum bit rate can be calculated as
Example
Consider the same noiseless channel transmitting a
signal with four signal levels (for each level, we send
2 bits). The maximum bit rate can be calculated as
Example
We need to send 265 kbps over a noiseless channel
with a bandwidth of 20 kHz. How many signal levels
do we need?
Solution
We can use the Nyquist formula as shown:
Since this result is not a power of 2, we need to
either increase the number of levels or reduce the bit
rate. If we have 128 levels, the bit rate is 280 kbps. If
we have 64 levels, the bit rate is 240 kbps.
Noisy Channel: Shannon
Capacity
Shannon’s theorem gives the theoretical
highest data rate for a noisy channel.
The formula defines the characteristic
of a channel.
C = B log2(1 + SNR)
where,
C= capacity in bps
B = bandwidth in Hz
SNR=Signal to Noise Ratio
Example
Consider an extremely noisy channel in which the
value of the signal-to-noise ratio is almost zero. In
other words, the noise is so strong that the signal is
faint. For this channel the capacity C is calculated as
This means that the capacity of this channel is zero
regardless of the bandwidth. In other words, we
cannot receive any data through this channel.
Example
We can calculate the theoretical highest bit rate of a
regular telephone line. A telephone line normally has
a bandwidth of 3000 Hz. The signal-to-noise ratio is
usually 3162. For this channel the capacity is
calculated as
Example
The signal-to-noise ratio is often given in decibels.
Assume that SNRdB = 36 and the channel bandwidth
is 2 MHz. The theoretical channel capacity can be
calculated as
Example
We have a channel with a 1-MHz bandwidth. The
SNR for this channel is 63. What are the appropriate
bit rate and signal level?
Solution
First, we use the Shannon formula to find the upper
limit.
Example
The Shannon formula gives us 6 Mbps, the upper
limit. For better performance we choose something
lower, 4 Mbps, for example. Then we use the Nyquist
formula to find the number of signal levels.
Note
The Shannon capacity gives us the upper
limit; the Nyquist formula tells us how
many signal levels we need.
PERFORMANCE
One important issue in networking is the
performance of the network—how good is it? In this
section, we introduce terms that we need for future
chapters.
Topics discussed in this section:
Bandwidth - capacity of the system
Throughput - no. of bits that can be pushed through
Latency (Delay) - delay incurred by a bit from start to finish
Bandwidth-Delay Product
Bandwidth
Note
In networking, we use the term bandwidth
in two contexts.
The first, bandwidth in hertz, refers to the
range of frequencies in a composite signal or
the range of frequencies that a channel can
pass.
The second, bandwidth in bits per second,
refers to the speed of bit transmission in a
channel or link. Often referred to as Capacity.
Examples
1. The bandwidth of a subscriber line is 4 kHz for
voice or data. The bandwidth of this line for data
transmission can be up to 56,000 bps using a
sophisticated modem to change the digital signal
to analog.
2. If the telephone company improves the quality of
the line and increases the bandwidth to 8 kHz, we
can send 112,000 bps by using the same
technology as mentioned in Example 1
Throughput
• Amount of data transmitted per
specified time
• measure of how fast we can actually
send data through a network
• at first glance, bandwidth in bits per
second and throughput seem the
same ,but they are different.
• bandwidth is a potential measurement
of a link; the throughput is an actual
measurement of how fast we can send
data
Example
A network with bandwidth of 10 Mbps can pass only
an average of 12,000 frames per minute with each
frame carrying an average of 10,000 bits. What is the
throughput of this network?
Solution
We can calculate the throughput as
The throughput is almost one-fifth of the bandwidth
in this case.
Propagation & Transmission delay
Propagation speed - speed at which a
bit travels though the medium from
source to destination.
Transmission speed - the speed at
which all the bits in a message arrive at
the destination. (difference in arrival
time of first and last bit)
Propagation and Transmission Delay
Propagation Delay = Distance/Propagation speed
Transmission Delay = Message size/bandwidth
Latency = Propagation delay + Transmission delay +
Queueing time + Processing time
Example
What is the propagation time if the distance between
the two points is 12,000 km? Assume the
propagation speed to be 2.4 × 108 m/s in cable.
Solution
We can calculate the propagation time as
Example
What are the propagation time and the transmission
time for a 2.5-kbyte message (an e-mail) if the
bandwidth of the network is 1 Gbps? Assume that
the distance between the sender and the receiver is
12,000 km and that light travels at 2.4 × 108 m/s.
Solution
We can calculate the propagation and transmission
time as shown on the next slide:
Example (continued)
Note that in this case, because the message is short
and the bandwidth is high, the dominant factor is the
propagation time, not the transmission time. The
transmission time can be ignored.
Example
What are the propagation time and the transmission
time for a 5-Mbyte message (an image) if the
bandwidth of the network is 1 Mbps? Assume that
the distance between the sender and the receiver is
12,000 km and that light travels at 2.4 × 108 m/s.
Solution
We can calculate the propagation and transmission
times as shown on the next slide.
Example (continued)
Note that in this case, because the message is very
long and the bandwidth is not very high, the
dominant factor is the transmission time, not the
propagation time. The propagation time can be
ignored.
Bandwidth Delay Product- Case 1
Bandwidth Delay Product- Case 2
Note
The bandwidth-delay product defines the
number of bits that can fill the link.
Chapter 4
Digital Transmission
DIGITAL-TO-DIGITAL CONVERSION
In this section, we see how we can represent
digital data by using digital signals. The
conversion involves three techniques: line coding,
block coding, and scrambling. Line coding is
always needed; block coding and scrambling may
or may not be needed.
Line Coding
Converting a string of 1’s and 0’s (digital
data) into a sequence of signals that
denote the 1’s and 0’s.
For example a high voltage level (+V)
could represent a “1” and a low voltage
level (0 or -V) could represent a “0”.
Line coding and decoding
Data Element vs Signal
Element
Data element is the smallest entity that can
represent a piece of information (bit)
Signal element carries data elements.
Data elements are what we need to send,
signal elements are what we can send
‘r’ is the ratio which denotes the number of
data elements carried by each signal element
Signal element versus data element
Relationship between data
rate and signal rate
The data rate defines the number of bits sent
per sec - bps. It is often referred to the bit rate.
The signal rate is the number of signal
elements sent in a second and is measured in
bauds. It is also referred to as the modulation
rate.
Goal is to increase the data rate whilst
reducing the baud rate.
Data rate and Baud rate
The baud or signal rate can be
expressed as:
S = c x N x 1/r bauds
where N is data rate
c is the case factor (worst, best & avg.)
r is the ratio between data element &
signal element
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
Note: c = 1/2 for the avg. case as worst case is 1
and best case is 0
Note
Although the actual bandwidth of a digital
signal is infinite, the effective bandwidth is
finite.
Line encoding characteristics
Baseline wandering - a receiver will evaluate
the average power of the received signal
(called the baseline) and use that to determine
the value of the incoming data elements. If the
incoming signal does not vary over a long
period of time, the baseline will drift and thus
cause errors in detection of incoming data
elements.
A good line encoding scheme will prevent long
runs of fixed amplitude.
Line encoding characteristics
DC components - when the voltage level
remains constant for long periods of
time, there is an increase in the low
frequencies of the signal. Most
channels are bandpass and may not
support the low frequencies.
This will require the removal of the dc
component of a transmitted signal.
Line encoding characteristics
Self synchronization - the clocks at the
sender and the receiver must have the
same bit interval.
If the receiver clock is faster or slower it
will misinterpret the incoming bit
stream.
Effect of lack of synchronization
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.
At 1 Mbps, the receiver receives 1,001,000 bps
instead of 1,000,000 bps.
Line encoding characteristics
Error detection - errors occur during
transmission due to line impairments.
Some codes are constructed such that
when an error occurs it can be detected.
For example: a particular signal
transition is not part of the code. When
it occurs, the receiver will know that a
symbol error has occurred.
Line encoding characteristics
Immunity to Noise and interference -
there are line encoding techniques that
make the transmitted signal “immune”
to noise and interference.
This means that the signal cannot be
corrupted, it is stronger than error
detection.
Line encoding characteristics
Complexity - the more robust and
resilient the code, the more complex it
is to implement and the price is often
paid in baud rate or required bandwidth.
Line coding schemes
Unipolar NRZ scheme
All signal levels are on one side of the time
axis - either above or below
NRZ - Non Return to Zero scheme is an
example of this code. The signal level does
not return to zero during a symbol
transmission
Costly
Polar - NRZ
The voltages are on both sides of the time
axis.
There are two versions:
NRZ - Level (NRZ-L) - positive voltage for
one symbol and negative for the other
NRZ - Inversion (NRZ-I) - the change or lack
of change in polarity determines the value
of a symbol. E.g. a “1” symbol inverts the
polarity a “0” does not.
Polar NRZ-L and NRZ-I schemes
Note
In NRZ-L the level of the voltage determines
the value of the bit.
In NRZ-I the inversion
or the lack of inversion
determines the value of the bit.
Note
NRZ-L and NRZ-I both have a DC
component problem and baseline
wandering, it is worse for NRZ-L. Both have
no self synchronization &no error detection.
Both are relatively simple to implement.
Polar - RZ
The Return to Zero (RZ) scheme uses three
voltage values. +, 0, -.
Each symbol has a transition in the middle.
Either from high to zero or from low to zero.
This scheme has more signal transitions (two
per symbol) and therefore requires a wider
bandwidth.
No DC components or baseline wandering.
Self synchronization - transition indicates
symbol value.
More complex as it uses three voltage level. It
has no error detection capability.
Polar RZ scheme
Polar - Biphase: Manchester and
Differential Manchester
Manchester coding consists of combining the
NRZ-L and RZ schemes.
Duration of each bit is divided into 2 halves.
Voltage remains at one level during first half and
moves to the other level in the second half.
Differential Manchester coding consists of
combining the NRZ-I and RZ schemes.
Every symbol has a level transition in the middle.
But the level at the beginning of the symbol is
determined by the symbol value. One symbol
causes a level change, the other does not.
Polar biphase: Manchester and differential Manchester schemes
Note
In Manchester and differential Manchester
encoding, the transition
at the middle of the bit is used for
synchronization.
Note
The minimum bandwidth of Manchester
and differential Manchester is 2 times that
of NRZ. The is no DC component and no
baseline wandering. None of these codes
has error detection.
Bipolar - AMI and Pseudoternary
Code uses 3 voltage levels: +, 0, -, to
represent the symbols (note not transitions to
zero as in RZ).
The voltage level for one data element is at
zero, while the voltage level for the other
element alternates between + ve and – ve .
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.
Bipolar schemes: AMI and pseudoternary
Bipolar Characteristics
Has no DC component or baseline
wandering.
Has synchronization problems when
long runs of “0”s are present.
No error detection.
Multilevel Schemes
In these schemes we increase the number of
data bits per symbol thereby increasing the
bit rate.
In mBnL schemes, a pattern of m data
elements is encoded as a pattern of n signal
elements in which 2m ≤ Ln.
Representing Multilevel Codes
We use the notation mBnL, where m is
the length of the binary pattern, B
represents binary data, n represents the
length of the signal pattern and L the
number of levels.
L = B for 2 (binary), L = T for 3 (ternary),
L = Q for 4 (quaternary).
Multilevel: 2B1Q(2 binary 1 quaternary) scheme
Multilevel: 8B6T scheme
Multilevel using multiple
channels
In some cases, we split the signal
transmission up and distribute it over several
links.
The separate segments are transmitted
simultaneously. This reduces the signalling
rate per link -> lower bandwidth.
This requires all bits for a code to be stored.
Codes are represented as: xD-YYYz
xD: means that we use ‘x’ links
YYYz: We use ‘z’ levels of modulation where
YYY represents the type of modulation (e.g.
pulse ampl. mod. PAM).
Error detection
Multilevel: 4D-PAM5 scheme
Multiline transition Coding-
MLT3
Uses three levels (+V, 0, -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 current level
is 0, the next level is the opposite of
the last nonzero level
Multitransition: MLT-3 scheme
Summary of line coding schemes
Block Coding
For a code to be capable of error detection,
we need to add redundancy, i.e., extra bits to
the data bits.
Synchronization also requires redundancy -
transitions are important in the signal flow
and must occur frequently.
Block coding is done in three steps: division,
substitution and combination.
Note
Block coding is normally referred to as mB/
nB coding;
it replaces each m-bit group with an
n-bit group.
Block coding concept
Using block coding 4B/5B with NRZ-I line coding scheme
4B/5B mapping codes
Substitution in 4B/5B block coding
8B/10B block encoding
More bits - better error detection
The 8B/10B block code adds more
redundant bits and can thereby choose
code words that would prevent a long
run of a voltage level that would cause
DC components.
Scrambling
The best code is one that does not increase
the bandwidth for synchronization and has no
DC components.
Scrambling is a technique used to create a
sequence of bits that has the required
characteristics for transmission - self clocking,
no low frequencies, no wide bandwidth.
It is implemented at the same time as
encoding, the bit stream is created on the fly.
B8ZS- Bipolar with 8 zero
substitutions
8 consecutive zero-level voltages are replaced
by the sequence 000VB0VB
V denotes violation, a nonzero voltage that
breaks an AMI rule of encoding(opposite
polarity from the previous).
B denotes bipolar, a nonzero voltage in
accordance with the AMI rule.
AMI used with scrambling
Two cases of B8ZS scrambling technique
HDB3- High Density Bipolar 3-zero
HDB3 substitutes four consecutive zeros
with 000V or B00V depending
on the number of nonzero pulses after the
last substitution.
If # of non zero pulses is even the
substitution is B00V to make total # of non
zero pulse even.
If # of non zero pulses is odd the
substitution is 000V to make total # of non
zero pulses even.
Different situations in HDB3 scrambling technique
ANALOG-TO-DIGITAL CONVERSION
A digital signal is superior to an analog signal
because it is more robust to noise and can easily
be recovered, corrected and amplified. For this
reason, the tendency today is to change an analog
signal to digital data. In this section we describe
two techniques, pulse code modulation and delta
modulation.
PCM
PCM consists of three steps to digitize an
analog signal:
1. Sampling
2. Quantization
3. Binary encoding
Before we sample, we have to filter the
signal to limit the maximum frequency of
the signal as it affects the sampling rate.
Filtering should ensure that we do not
distort the signal, i.e. remove high frequency
components that affect the signal shape.
Components of PCM encoder
Sampling
Analog signal is sampled every TS secs.
Ts is referred to as the sampling interval.
fs = 1/Ts is called the sampling rate or
sampling frequency.
There are 3 sampling methods:
Ideal - an impulse at each sampling instant
Natural - a high speed switch is turned on for a
small period of time when sampling occurs
Sample and hold - creates flat-top samples using a
circuit
The process is referred to as pulse amplitude
modulation PAM and the outcome is a signal
with analog (non integer) values
Three different sampling methods for PCM
Note
According to the Nyquist theorem, the
sampling rate must be
at least 2 times the highest frequency
contained in the signal.
Nyquist sampling rate for low-pass and bandpass
signals
Example for Nyquist Sampling Rate
For an intuitive example of the Nyquist theorem, let us
sample a simple sine wave at three sampling rates: fs =
4f (2 times the Nyquist rate), fs = 2f (Nyquist rate), and
fs = f (one-half the Nyquist rate). Figure in the following
slide shows the sampling and the subsequent
recovery of the signal.
It can be seen that sampling at the Nyquist rate can
create a good approximation of the original sine wave
(part a). Oversampling in part b can also create the
same approximation, but it is redundant and
unnecessary. Sampling below the Nyquist rate (part c)
does not produce a signal that looks like the original
Recovery of a sampled sine wave for different sampling
rates
Example
Telephone companies digitize voice by assuming a
maximum frequency of 4000 Hz. The sampling rate
therefore is 8000 samples per second.
Example
A complex low-pass signal has a bandwidth of 200
kHz. What is the minimum sampling rate for this
signal?
Solution
The bandwidth of a low-pass signal is between 0 and
f, where f is the maximum frequency in the signal.
Therefore, we can sample this signal at 2 times the
highest frequency (200 kHz). The sampling rate is
therefore 400,000 samples per second.
Example
A complex bandpass signal has a bandwidth of 200
kHz. What is the minimum sampling rate for this
signal?
Solution
We cannot find the minimum sampling rate in this
case because we do not know where the bandwidth
starts or ends. We do not know the maximum
frequency in the signal.
Quantization
Sampling results in a series of pulses of
varying amplitude values ranging between
two limits: a min and a max.
The amplitude values are infinite between the
two limits.
We need to map the infinite amplitude values
onto a finite set of known values.
Steps in Quantization
1)The original analog signal has
instantaneous amplitude between Vmin
and Vmax
2) Divide the range into L zones, each of
height (delta)
= (Vmax - Vmin)/L
3) Assign quantized values of 0 to L-1 to
midpoint of each zone
4) Approximate the value of sample
amplitude to the quantized values
Quantization Example
Assume we have a voltage signal with
amplitudes Vmin=-20V and Vmax=+20V.
We want to use L=8 quantization levels.
Zone width = (20 - -20)/8 = 5
The 8 zones are: -20 to -15, -15 to -10,
-10 to -5, -5 to 0, 0 to +5, +5 to +10, +10
to +15, +15 to +20
The midpoints are: -17.5, -12.5, -7.5, -2.5,
2.5, 7.5, 12.5, 17.5
Encoding
Each zone is then assigned a binary code.
The number of bits required to encode the
zones, or the number of bits per sample as it
is commonly referred to, is obtained as
follows:
nb = log2 L
Given our example, nb = 3
The 8 zone (or level) codes are therefore: 000,
001, 010, 011, 100, 101, 110, and 111
Assigning codes to zones:
000 will refer to zone -20 to -15
001 to zone -15 to -10, etc.
Quantization and encoding of a sampled
signal
Quantization Error
When a signal is quantized, we introduce an
error - the coded signal is an approximation of
the actual amplitude value.
The difference between actual and coded
value (midpoint) is referred to as the
quantization error.
The value of error for any sample is less than
/2. i.e., -/2 ≤ error ≤ /2
Contribution of quantization error to SNRdB
depends on the bits per sample nb
SNRdB =6.02 nb + 1.76 dB
Example
What is the SNRdB in the previous example that we
used for Quantization?
Solution
We have 8 levels and 3 bits per sample,
SNRdB =6.02 *3 + 1.76 dB
SNRdB = 19.82 dB
Bit rate and bandwidth
requirements of PCM
The bit rate of a PCM signal can be calculated
form the number of bits per sample x the
sampling rate
Bit rate = nb x fs
A digitized signal will always need more
bandwidth than the original analog signal.
Price we pay for robustness and other
features of digital transmission.
Example
We want to digitize the human voice which normally
contains frequencies from 0 to 4000 Hz. What is the
bit rate, assuming 8 bits per sample?
Solution
The sampling rate and bit rate are calculated as
follows:
Recovery of original signal-
PCM Decoder
To recover an analog signal from a digitized
signal we follow the following steps:
We use a hold circuit that holds the amplitude
value of a pulse till the next pulse arrives.
We pass this signal through a low pass filter to
smooth the staircase signal into an analog signal.
The higher the value of L, the less distorted a
signal is recovered.
Components of a PCM decoder
Delta Modulation
This scheme sends only the difference
between pulses, if the pulse at time tn+1 is
higher in amplitude value than the pulse at
time tn, then a single bit, say a “1”, is used to
indicate the positive value.
If the pulse is lower in value, resulting in a
negative value, a “0” is used.
This scheme works well for small changes in
signal values between samples.
If changes in amplitude are large, this will
result in large errors.
The process of delta modulation
Modulator
• Modulator creates a stream of bits from an analog signal
• The process records the small positive or negative changes, called
delta δ
• If the delta is +ve, process records a 1; else 0
• To find the change, process compares the analog signal with a
base signal(staircase signal)
• Value of analog signal is compared with the last value of staircase
signal
• If the amplitude of analog signal is larger, next bit in the digital data
is 1; otherwise it is 0
Delta modulation components
Demodulator
• Demodulator takes the digital data and using the staircase maker
and the delay unit, creates the analog signal.
• The created analog signal then passes through a low-pass filter
for smoothing
TRANSMISSION MODES
The transmission of binary data across a link can
be accomplished in either parallel or serial mode.
In parallel mode, multiple bits are sent with each
clock tick. In serial mode, 1 bit is sent with each
clock tick. While there is only one way to send
parallel data, there are three subclasses of serial
transmission: asynchronous, synchronous, and
isochronous.
Data transmission and modes
Parallel transmission
• All n bits of one group can be transmitted with each clock tick
from one device to another
• Advantage- speed
• Disadvantage -cost
Serial transmission
Note
In asynchronous transmission, we send 1
start bit (0) at the beginning and 1 or more
stop bits (1s) at the end of each byte. There
may be a gap between
each byte.
Note
Asynchronous here means “asynchronous
at the byte level,”
but the bits are still synchronized;
their durations are the same.
Asynchronous transmission
Note
In synchronous transmission, we send bits
one after another without start or stop bits
or gaps. It is the responsibility of the
receiver to group the bits. The bits are
usually sent as bytes and many bytes are
grouped in a frame. A frame is identified
with a start and an end byte.
Synchronous transmission
Isochronous
In isochronous transmission we cannot
have uneven gaps between frames.
Entire stream of bits must be
synchronized
Ensures that data arrive at a fixed rate
Real-time audio and video
Chapter 5
Analog Transmission
DIGITAL-TO-ANALOG CONVERSION
Digital-to-analog conversion is the process of
changing one of the characteristics of an analog
signal based on the information in digital data.
Digital to Analog Conversion
Digital data needs to be carried on an
analog signal.
A carrier signal (frequency fc) performs
the function of transporting the digital
data in an analog waveform.
The analog carrier signal is manipulated
to uniquely identify the digital data
being carried.
Digital-to-analog conversion
Types of digital-to-analog conversion
Data Element vs Signal Element
Bit rate, N, is the number of bits per second
(bps).
Baud rate, S, is the number of signal
elements per second (bauds).
In the analog transmission of digital data,
the signal or baud rate is less than
or equal to the bit rate.
S=Nx1/r bauds
Where r is the number of data bits per
signal element.
Example
An analog signal carries 4 bits per signal element.
If 1000 signal elements are sent per second, find
the bit rate.
Solution
In this case, r = 4, S = 1000, and N is unknown. We
can find the value of N from
Example
An analog signal has a bit rate of 8000 bps and a
baud rate of 1000 baud. How many data elements
are carried by each signal element? How many
signal elements do we need?
Solution
In this example, S = 1000, N = 8000, and r and L are
unknown. We find first the value of r and then the
value of L.
Amplitude Shift Keying (ASK)
ASK is implemented by changing the
amplitude of a carrier signal to reflect
amplitude levels in the digital signal.
For example: a digital “1” could not affect the
signal, whereas a digital “0” would, by making
it zero. (Binary ASK or on-off keying)
Phase and frequency remains constant
Multilevel ASK is also available
Binary amplitude shift keying
Bandwidth of ASK
The bandwidth B of ASK is proportional
to the signal rate S.
B = (1+d)S
“d” is due to modulation and filtering,
lies between 0 and 1.
Frequency Shift Keying
The digital data stream changes the
frequency of the carrier signal, fc.
We use 2 carrier frequencies f1 , f2
(binary FSK)
For example, a “1” could be represented
by f1=fc +f, and a “0” could be
represented by f2=fc-f.
Multilevel FSK is also available
Binary frequency shift keying
Bandwidth of FSK
If the difference between the two
frequencies (f1 and f2) is 2f, then the
required Bandwidth B will be:
B = (1+d)x S +2f
Phase Shift Keyeing
We vary the phase shift of the carrier
signal to represent digital data.
The bandwidth requirement, B is:
B = (1+d)xS
PSK is much more robust than ASK as it
is not that vulnerable to noise, which
changes amplitude of the signal.
Binary and Quadrature PSK
Binary phase shift keying
Note
Quadrature amplitude modulation is a
combination of ASK and PSK.
ANALOG TO ANALOG CONVERSION
Analog-to-analog conversion is the representation
of analog information by an analog signal. One
may ask why we need to modulate an analog
signal; it is already analog. Modulation is needed if
the medium is bandpass in nature or if only a
bandpass channel is available to us.
Types of analog-to-analog modulation
Amplitude Modulation
A carrier signal is modulated only in
amplitude value
The modulating signal is the envelope of the
carrier
Frequency and phase of the carrier remains
the same
Amplitude modulation
Note
The total bandwidth required for AM
can be determined
from the bandwidth of the audio
signal: BAM = 2B.
AM band allocation
• Bandwidth of an audio signal (speech and music) is 5
kHz
• AM radio station needs a bandwidth of 10 kHz.
• Carrier frequencies range from 530 to 1700 kHz
• Each station’s carrier frequency must be separated
from those on either side of it by atleast 10 kHz to
avoid interference
Frequency Modulation
The modulating signal changes the freq.
fc of the carrier signal
The bandwidth for FM is high
It is approx. 10x the signal frequency
Note
The total bandwidth required for FM can be
determined from the bandwidth
of the audio signal: BFM = 2(1 + β)B. Where
is usually 4.
Frequency modulation
FM band allocation
• FM station needs a bandwidth of 200 kHz
• Carrier frequencies range from 88 to 108 MHz
• Stations should be separated by atleast 200 kHz
to keep their bandwidths from overlapping
Phase Modulation (PM)
The modulating signal only changes the
phase of the carrier signal.
The phase change manifests itself as a
frequency change but the
instantaneous frequency change is
proportional to the derivative of the
amplitude of the modulating signal.
Phase modulation
Note
The total bandwidth required for PM can be
determined from the bandwidth
and maximum amplitude of the modulating
signal:
BPM = 2(1 + β)B.
Where = 2 most often.