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

Unit-I Data Communication

Uploaded by

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

Unit-I Data Communication

Uploaded by

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

Data and Computer

Communications
Chapter 1
Introduction
 1.WHY TO LEARN THIS SUBJECT
 2.WHAT TO LEARN
 3. HOW TO LEARN
 PREAMBLE
 1. ANALOG COMMUNICATION
 2. DIGITAL COMMUNICATION.
 3. DIGITAL ELECTRONICS
A Communications Model
 Source
– generates data to be transmitted
 Transmitter
– Converts data into transmittable signals
 Transmission System
– Carries data
 Receiver
– Converts received signal into data
 Destination
– Takes incoming data
Simplified Communications
Model - Diagram
Key Communications Tasks
 Transmission System Utilization
 Interfacing
 Signal Generation
 Synchronization
 Exchange Management
 Error detection and correction
 Addressing and routing
 Recovery
 Message formatting
 Security
 Network Management
Simplified Data Communications
Model
Networking
 Point to point communication not usually
practical
– Devices are too far apart
– Large set of devices would need impractical
number of connections
 Solution is a communications network
Simplified Network Model
Characteristics of Data
Communication
 The effectiveness of any data
communications system depends upon the
following four fundamental characteristics:
 1. Delivery: The data should be delivered to the correct destination and
correct user.
 2. Accuracy: The communication system should deliver the data accurately,
without introducing any errors. The data may get corrupted during transmission
affecting the accuracy of the delivered data.
 3. Timeliness: Audio and Video data has to be delivered in a timely manner
without any delay; such a data delivery is called real time transmission of data.
 4. Jitter: It is the variation in the packet arrival time. Uneven Jitter may affect the
timeliness of data being transmitted.
DATA REPRESENTATION
 Data is collection of raw facts which is processed to deduce information. There may be different forms in which data
may be represented. Some of the forms of data used in communications are as follows:

 1. Text -Text includes combination of alphabets in small case as well as upper case. It is stored as a pattern of bits.
Prevalent encoding system : ASCII, Unicode

 2. Numbers- Numbers include combination of digits from 0 to 9. It is stored as a pattern of bits. Prevalent encoding
system : ASCII, Unicode

 3. Images- An image is worth a thousand words‖ is a very famous saying. In computers images are digitally stored. A
Pixel is the smallest element of an image. To put it in simple terms, a picture or image is a matrix of pixel elements.
The pixels are represented in the form of bits. Depending upon the type of image (black n white or color) each pixel
would require different number of bits to represent the value of a pixel. The size of an image depends upon the
number of pixels (also called resolution) and the bit pattern used to indicate the value of each pixel. Example: if an
image is purely black and white (two color) each pixel can be represented by a value either 0 or 1, so an image made
up of 10 x 10 pixel elements would require only 100 bits in memory to be stored. On the other hand an image that
includes gray may require 2 bits to represent every pixel value (00 - black, 01 – dark gray, 10 – light gray, 11 –white).
So the same 10 x 10 pixel image would now require 200 bits of memory to be stored. Commonly used Image formats :
jpg, png, bmp, etc

 4. Audio Data can also be in the form of sound which can be recorded and broadcasted. Example: What we hear on
the radio is a source of data or information. Audio data is continuous, not discrete.

 5. Video:-Video refers to broadcasting of data in form of picture or movie.
DATA FLOW

 Two devices communicate with each other


by sending and receiving data. The data can
flow between the two devices in the
following ways.
 1. Simplex
 2. Half Duplex
 3. Full Duplex
DATA & SIGNALS

 data must be transformed to


electromagnetic signals.
 Data can be Analog or Digital.
 1. Analog data refers to information that is
continuous; ex. sounds made by a human voice
 2. Digital data refers to information that has discrete
states. Digital data take on discrete values.
 For example, data are stored in computer memory in
the form of Os and 1s
 Signals can be of two types:
 1. Analog Signal: They have infinite values
in a range.
 2. Digital Signal: They have limited number
of defined values
ANALOG SIGNAL  
 A sine wave is characterized by three
parameters:
 1. Peak Amplitude
 2. Frequency
 3. Phase
Frequency
Two signals with the same amplitude and phase,
but different frequencies
Units of period and 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.
 If a signal does not change at all, its
frequency is zero.
 If a signal changes instantaneously, its
frequency is infinite.
 Phase describes the position of the
waveform relative to time 0.
Three sine waves with the same amplitude
and frequency,
but different phases
 A complete sine wave in the time domain can
be represented by one single spike in the
frequency domain.
 The frequency domain is more compact and
useful when we are dealing with more than
one sine wave. For example, next fig 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
 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.
 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.
Digital Signal
Transmission Impairments
 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
 1.Attenuation-Loss of signal strength over distance
 2. Delay Distortion-Different Speed for different
frequencies.
 3. 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.
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
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.
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
 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
 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.
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 are transmitter antenna and medium as
receiving antenna.
– Crosstalk - same as above but between two
wires.
– Impulse - Spikes that result from power lines,
lightning, etc.
Signal to Noise Ratio (SNR)
 To measure the quality of a system the SNR
is often used. It indicates the strength of the
signal wrt the noise power in the system.
 It is the ratio between two powers.
 It is usually given in dB and referred to as
SNRdB.
 We can never achieve this ratio in real life; it
is an ideal.
Two cases of SNR: a high SNR
and a low SNR
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)
Topics discussed in this section:
 Noiseless Channel: Nyquist Bit Rate
 Noisy Channel: Shannon Capacity
 Using Both Limits
 Increasing the levels of a signal increases
the probability of an error occurring, in other
words it reduces the reliability of the system.
Why??
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.
Nyquist Theorem
 Nyquist gives the upper bound for the bit rate of a
transmission system by calculating the bit rate
directly from the number of bits in a symbol (or
signal levels) and the bandwidth of the system
(assuming 2 symbols/per cycle and first harmonic).
 Nyquist theorem states that for a noiseless channel:
C = 2 B log22n
C= capacity in bps
B = bandwidth in Hz
 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
 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.
Shannon’s Theorem
 Shannon’s theorem gives the capacity of a
system in the presence of noise.

C = B log2(1 + SNR)
 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.
 We can calculate the theoretical highest bit rate
of a regular telephone line. A telephone line
normally has a bandwidth of 3000. The signal-to-
noise ratio is usually 3162. For this channel the
capacity is calculated as

 This means that the highest bit rate for a


telephone line is 34.860 kbps. If we want to send
data faster than this, we can either increase the
bandwidth of the line or improve the signal-to-
noise ratio.
 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.
 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.
 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.
 The Shannon capacity gives us the upper
limit; the Nyquist formula tells us how many
signal levels we need.
Signal Propagation Basics
 Propagation in free space is always like light (straight line).
 Receiving power proportional to 1/d² in vacuum – much
more in real environments (d = distance between sender
and receiver)
 Receiving power additionally influenced by
 fading (frequency dependent)
 Shadowing (blocking)
 reflection at large obstacles
 refraction depending on the density of a medium
 scattering at small obstacles
 diffraction at edges
reflection refraction scattering diffraction
PERFORMANCE

 Performance metrics
– bandwidth
– latency
– bandwidth delay product
– throughput
Bandwidth: Number of bits that can be
transmitted over a certain tiem -- typically
per unit time.
Some people also refer it to the spectrum --
example 10 Ghz.
This typically translates to a maximum data
rate.
Transmission Time
 A function of bandwidth
 If bandwidth is B, transmission time is 1/B.
 If bandwidth is 10 Mbps, the transmission
time is 1/(10 x 106) = 1 s.
Propagation Delay
 Once a bit is put on a link, the time it takes
to go across the link.
 Depends on the speed with which the
electromagnetic signal (light) travels in the
medium -- 2 x 108 m/s in fiber.
 Propagation delay = distance/speed of
signal.
Queuing Delay
 At each intermediate node or router, a
packet is queued.
 Thus, it has to wait prior to transmission.
 How long does it have to wait ? Dependent
on the load on the network -- how many
packets are traversing that router ?
Latency
 How long does a packet take to go from one
host to another.
 Also called “Delay”.
Latency = Propagation Delay +
Queueing Delay +
Transmission Delay
Round Trip Time
 Packet is sent from sender to receiver.
 Receiver sends ACK (assume immediately)
to sender.
 Total time delay incurred between the
instance the packet is set to the time the
ACK is received.
 Note if forward delay = backward delay,
RTT = 2 * Latency (typically assumed --
although not always accurate).
Bandwidth Delay Product
 Think of this as a pipe.
 How much
Delay does the pipe hold in bits ?

Bandwidth
 In essence, if I send a stream of bits, the first bit
traverses the bit in “Delay” seconds.
 In the meantime, how many more bits can I send ?
 For a transcontinental channel -- latency =
50 milliseconds.
 Bandwidth = 45 Mbps.
 Bandwidth delay product =
50 x 10-3 x 45 x 106
= 2.25 Mbits
 We can transmit 2.25 M bits before the first
bit reaches the other end of the channel !
Throughput
 Defines how efficiently channel is being
used.
Throughput = Transfer size/ Transfer time.
What is the transfer time ?
RTT + (Transfer size/Bandwidth)
(ignoring queuing delays).
 1 MB file over a 1 Gbps network with RTT
100 milliseconds.
 Transfer time = 100 ms + (1 MB/1Gbps) =
100 ms + 8 ms = 108 ms.
 Effective throughput = 1 MB/108 ms = 74.1
Mbps.
Impact of data size
 If data size increases,
 (Transfer size/Bandwidth) increases.
 Could become much larger than RTT.
 In that case, Throughput ~ (Transfer size
/(Transfer size/Bandwidth) ~ Bandwidth!
 Bottomline : Throughput increases with
data transfer size.
Data and Signals
 Data can be analog or digital.
Analog data are continuous and take
continuous values.
 Digital data have discrete states and take
discrete values.
 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.
The Theoretical Basis for Data
Communication
• Fourier Analysis
• Bandwidth-Limited Signals
• Maximum Data Rate of a Channel
A binary signal and its root-
mean-square Fourier amplitudes.
Guided Transmission Data
• Magnetic Media
• Twisted Pair
• Coaxial Cable
• Fiber Optics
Twisted Pair

Category 3 UTP.
(b) Category 5 UTP.
Fiber Cables
) Side view of a single fiber.
(b) End view of a sheath with three
Wireless Transmission
• The Electromagnetic Spectrum
• Radio Transmission
• Microwave Transmission
• Infrared and Millimeter Waves
• Lightwave Transmission
Wide Area Networks
 Large geographical area
 Crossing public rights of way
 Rely in part on common carrier circuits
 Alternative technologies
– Circuit switching
– Packet switching
– Frame relay
– Asynchronous Transfer Mode (ATM)
The Electromagnetic Spectrum
Radio Transmission

a) In the VLF, LF, and MF bands, radio waves


follow the curvature of the earth.
(b) In the HF band, they bounce off the
ionosphere.
Communication Satellites
Analog and Digital Transmissions
SIGNAL ENCODING
TECHNIQUES
 Digital data, digital signal [wired LAN]
 Analog data, digital signal[codec]
– Frequency Division Multiplexing (FDM)
– Wave Division Multiplexing (WDM) [fiber]
– Time Division Multiplexing (TDM)
– Pulse Code Modulation (PCM) [T1]
– Delta Modulation
Digital data, analog signal[modem]
 Analog data, analog signal
 Analog data to Analog signals − The
modulation techniques such as Amplitude Modulation,
Frequency Modulation and Phase Modulation of analog
signals, fall under this category.
 Analog data to Digital signals − This process
can be termed as digitization, which is done by Pulse Code
Modulation (PCM). Hence, it is nothing but digital
modulation. As we have already discussed, sampling and
quantization are the important factors in this. Delta
Modulation gives a better output than PCM.
 Digital data to Analog signals − The
modulation techniques such as Amplitude
Shift Keying (ASK), Frequency Shift Keying
(FSK), Phase Shift Keying (PSK), etc., fall
under this category. These will be discussed
in subsequent chapters.
 Digital data to Digital signals −
Digital Data, Digital Signal
 Digital signal
– Discrete, discontinuous voltage pulses
– Each pulse is a signal element
– Binary data encoded into signal elements
 Unipolar
– All signal elements have same sign
 Polar
– One logic state represented by positive voltage the
other by negative voltage
 Data rate
– Rate of data transmission in bits per second
 Duration or length of a bit
– Time taken for transmitter to emit the bit
 Modulation rate
– Rate at which the signal level changes
– Measured in baud = signal elements per second
 Mark and Space
– Binary 1 and Binary 0 respectively
Line Coding
 Line Coding – process of converting binary
data (sequence of bits) to a digital signal •
digital signal depends ‘linearly’ on
information bits - bits are transmitted ‘one-
by-one’ - different from block coding
Data vs. Signal Level
 Data vs. Signal Level •
 data levels – number of values / levels used
to represent data (typically only two: 0 and
1)
 • signal levels – number of values / levels
allowed in a particular signal
DC Component DC Component
in Line Coding in Line Coding
 some line coding schemes have a residual
(DC) component, which is generally
undesirable ƒ transformers do not allow
passage of DC component ƒ
 DC component ⇒ extra energy – useless!
 Nonreturn to Zero-Level (NRZ-L)
 Nonreturn to Zero Inverted (NRZI)
 Bipolar -AMI
 Pseudoternary
 Manchester
 Differential Manchester
 B8ZS
 HDB3
Nonreturn to Zero-Level (NRZ-L)
 Two different voltages for 0 and 1 bits
 Voltage constant during bit interval
– no transition I.e. no return to zero voltage
 e.g. Absence of voltage for zero, constant
positive voltage for one
 More often, negative voltage for one value
and positive for the other
 This is NRZ-L
Nonreturn to Zero Inverted
 Nonreturn to zero inverted on ones
 Constant voltage pulse for duration of bit
 Data encoded as presence or absence of
signal transition at beginning of bit time
 Transition (low to high or high to low)
denotes a binary 1
 No transition denotes binary 0
 An example of differential encoding
NRZ
0→0=No change,0→1=change;1→0=change,1→1=no change
no transition means 0
NRZ pros and cons
 Pros
– Easy to engineer
– Make good use of bandwidth
 Cons
– dc component
– Lack of synchronization capability
 Used for magnetic recording
 Not often used for signal transmission
Multilevel Binary
 Use more than two levels
 Bipolar-AMI(Alternate Mark Inversion)
– zero represented by no line signal
– one represented by positive or negative pulse
– one pulses alternate in polarity
– No loss of sync if a long string of ones (zeros still a
problem)
– No net dc component
– Lower bandwidth
– Easy error detection
Pseudoternary
 One represented by absence of line signal
 Zero represented by alternating positive and
negative
 No advantage or disadvantage over bipolar-
AMI
Bipolar-AMI and Pseudoternary
Trade Off for Multilevel Binary
 Not as efficient as NRZ
– Each signal element only represents one bit
– In a 3 level system could represent log23 = 1.58
bits
– Receiver must distinguish between three levels
(+A, -A, 0)
– Requires approx. 3dB more signal power for
same probability of bit error
Biphase
 Manchester
– Transition in middle of each bit period
– Transition serves as clock and data
– Low to high represents one
– High to low represents zero
– Used by IEEE 802.3
 Differential Manchester
– Midbit transition is clocking only
– 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
Manchester Encoding
Differential Manchester Encoding
Biphase Pros and Cons
 Con
– At least one transition per bit time and possibly two
– Maximum modulation rate is twice NRZ
– Requires more bandwidth
 Pros
– Synchronization on mid bit transition (self clocking)
– No dc component
– Error detection
 Absence of expected transition
Modulation Rate
B8ZS
 Bipolar With 8 Zeros Substitution
 Based on bipolar-AMI
 If octet of all zeros and last voltage pulse preceding
was positive encode as 000+-0-+
 If octet of all zeros and last voltage pulse preceding
was negative encode as 000-+0+-
 Causes two violations of AMI code
 Unlikely to occur as a result of noise
 Receiver detects and interprets as octet of all zeros
HDB3
 High Density Bipolar 3 Zeros
 Based on bipolar-AMI
 String of four zeros replaced with one or two
pulses
B8ZS and HDB3
Block Coding
 unlike line codes which operate on a stream
of information bits, block codes operate on
block of information bits
 • redundant bit(s) are added to each block of
information bits to ensure synchronization
and error detection
Example [ 4B/5B block code ]
 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 0s. Therefore, when
these 5-bit codes are sent in sequence, no more
than three consecutive 0s are encountered.
1 0 1 0 1 1 1 0 0
Unipolar
NRZ

Polar NRZ

NRZ-Inverted
(Differential
Encoding)

Bipolar
Encoding

Mancheste
r
Encoding
Differential
Manchester
Encoding

Leon-Garcia & Widjaja: Communication Networks Figure 3.25

You might also like