Chapter One
Data Communication Basics
Data Communication and
Computer Networks
Communication Basics
Data communications are the exchange of data between two
devices via some form of transmission medium such as a wire
cable.
It includes :
Writing and talking
Nonverbal communication (such as facial expressions, body
language or gestures)
Visual communication (the use of images or pictures such as
painting, photography, video or film)
Electronic Communication such as telephone calls, electronic mail,
cable television, satellite broadcasts.
For data communications to occur, the communicating devices
2
must be part of a communication system made up of a
Five components of data communication
1. Message: is the information (data) to be communicated. Popular forms
of information include text, numbers, pictures, audio, and video.
2. Sender: is the device that sends the data message. It can be a computer,
workstation, telephone handset, video camera, and so on.
3. Receiver: is the device that receives the message. It can be a computer,
workstation, telephone handset, television, and so on.
4. Transmission medium: is the physical path by which a message travels
from sender to receiver. Some examples of transmission media include
twisted-pair wire, coaxial cable, fiberoptic cable, and radio waves.
5. Protocol: is a set of rules that govern data communications. It represents
an agreement between the communicating devices. Without a protocol,
two devices may be connected but not communicating, just as a person
speaking French cannot be understood by a person who speaks only
Japanese.
3
Serial vs. parallel communications
In serial communications
A single bit will be transferred at a time using the
communication channel
Bits will be reassembled at the destination
Mostly used by computer peripherals like printers,
In parallel communications
Multiple bits (eg. Eight bits) will be transferred at
a time
Needs multiple (parallel) communication channels
4
Contd.
5
Definitions
The word data refers to information presented in whatever
form is agreed upon by the parties creating and using the data.
Signal: the electrical wave that is used to represent the data.
It Can be analog or digital signal
Data communications (Transmission) are the exchange
of data between two devices via some form of
transmission medium such as a wire cable or wireless media
using appropriate signal.
Network is a system in which a number of independent
computers are linked together to share data and peripherals,
such as hard disks and printers (more in the next chapters)
6
Data Representation Techniques
The type of data to be transmitted can be in the form of text,
audio, and video in the form of electrical signal, radio, laser,
or other radiated energy source.
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.
Example: analog clock (with second, minute and hour
hands) and digital clock
7
Analog and digital signals
An analog signal has infinitely many levels of
intensity over a period of time.
As the wave moves from value A to value B, it
passes through and includes an infinite number of
values along its path.
A digital signal, on the other hand, can have only a
limited number of defined values.
8
Although each value can be any number, it is often
Analog Signals
Are Continuous wave that carries information by
altering the characteristics of waves.
Analogue means that the original information is
retransmitted to the receiver/listener without any
manipulation.
Here the signal can take on any value (within the
limits set by the recording equipment and the
transmitter).
It measures rather than counts
9
Contd.
Radio, telephone and recording equipment historically
have been analog, but they are beginning to change –due
to large to computers to the other types of signals-
digitals
The disadvantage of analogue signals is that any
'noise', interference, added to the signal at any point
10
cannot be removed from the audio signal and this
Digital Signals
are a discrete series of pulses - either high or low -
on or off - sometimes expressed as binary code 1s
and 0s.
It counts but not measures
Discrete pluses of data transmission rather than
continues wave
More prevalent in computer based devices
11
Flashing light and telegraph message are
Contd.
The advantage of digital signals is that
1. they are much less likely to be degraded by
interference (noise).
2. also it is possible to send a lot more information
digitally (e.g. more television channels) than using
analogue technology.
3. They can be transmitted effectively along fibre optic
cables. (on - light signal, off - no light signal) and
these are cheaper to manufacture than copper
12
wiring and can cope with multiple signals without
Contd.
The signals from a satellite are digital. They use a
system called 'packet switching' which is the same as
used in computer networks and for the internet. This
system is particularly effective for dealing with noise
13
elimination.
Contd.
Which of the following signals are Analog and which
are Digital?
Volume control on a radio
Traffic lights
Motor bike throttle
Water tap
Dimmer switch
Light switch
In Music on a CD
14
Music on a tape
Modes of data transmission
There are 3 different transmission modes
characterized according to the direction of the
exchanges:
1. A simplex connection is a connection in which
the data flows in only one direction, from the
transmitter to the receiver.
This type of connection is useful if the data do
15
Contd.
2. A half-duplex connection (sometimes called an alternating connection
or semi-duplex) is a connection in which the data flows in one direction or
the other, but not both at the same time.
With this type of connection, each end of the connection
transmits in turn.
This type of connection makes it possible to have bidirectional
communications using the full capacity of the line.
In a half-duplex transmission, the entire capacity of a channel is taken over by
whichever of the two devices is transmitting at the time.
Walkie-talkies and CB (citizens band) radios are both half-duplex systems.
The half-duplex mode is used in cases where there is no need for
communication in both directions at the same time; the entire capacity of the
16
channel can be utilized for each direction.
Contd.
3. Full-Duplex: In full-duplex mode (also called duplex), both
stations can transmit and receive simultaneously
The full-duplex mode is like a two-way street with traffic flowing in both
directions at the same time.
In full-duplex mode, signals going in one direction share the capacity of
the link: with signals going in the other direction.
This sharing can occur in two ways: Either the link must contain two
physically separate transmission paths, one for sending and the other for
receiving; or the capacity of the channel is divided between signals
travelling in both directions.
One common example of full-duplex communication is the telephone
network. When two people are communicating by a telephone line, both
17
can talk and listen at the same time.
Contd.
18
Signal Encoding techniques
Digital data:- information that has discrete states
Analog Data:- information that is continuous
Digital Signal:- can have only a limited number of defined values.
Although each value can be any number, it is often as simple as
1 and 0.
Analog signal:- has infinitely many levels of intensity over a period
of time.
As the wave moves from value A to value B, it passes through
and includes an infinite number of values along its path.
19
Contd.
20
Assignment #1
Describe the following digital signal encoding
formats (which format is used by Ethernet?)
1. Non return-to-Zero-Level (NRZ-L)
2. Non return to Zero Inverted (NRZI)
3. Bipolar-AMI
4. Pseudoternary
5. Manchester
21
6. Differential Manchester
22
DIGITAL DATA, ANALOG SIGNALS
The most familiar use of this transformation is for
transmitting digital data through the public telephone
network.
The telephone network was designed to receive,
switch, and transmit analog signals in the voice-
voice frequency range of about 300 to 3400 Hz.
digital devices are attached to the network via a
23
Digital Data to Analog Signal Encoding
Techniques
Modulation involves operation on one or more of the
three characteristics of a carrier signal: amplitude,
frequency, and phase.
Accordingly, there are three basic encoding or
modulation techniques for transforming digital data into
analog signals
1. Amplitude-shift keying (ASK)
2. Frequency-shift keying (FSK)
3. Phase-shift keying (PSK)
24 Read about these techniques
25
Multiplexing
In data communication, there might be a need to
share a single media for multiple
communication (media/bandwidth sharing) in
order to utilize the available bandwidth wisely to
achieve specific goals.
Sharing of a single media (fiber, coaxial,
microwave,..) is known as multiplexing.
Whenever the bandwidth of a medium linking two
26
devices is greater than the bandwidth needs of
Contd.
Multiplexing is the set of techniques that allows
the (simultaneous) transmission of multiple
signals across a single data link.
As data and telecommunications use increases,
so does traffic.
In the above figure, there are n inputs to a multiplexer.
27 The multiplexer is connected by a single data link to a
Contd.
The link is able to carry n separate channels of data.
The multiplexer combines (multiplexes) data from the
n input lines and transmits over a higher capacity
data link.
The demultiplexer accepts the multiplexed data
stream, separates (demultiplexes) the data according
to channel, and delivers them to the appropriate
output lines.
Multiplexing
There are three types of Multiplexing
FREQUENCY- TIME – STISTICAL
DIVISON DIVISON MULTIPLEXIN
MULTIPLEXING MULTIPLEXING G
28
Frequency-division Multiplexing (FDM)
FDM is a signal transmission technology in which
multiple signals can simultaneously be
transmitted over the same line or channel.
Frequency-division multiplexing (FDM) can be used in
both wired and wireless networking for transmitting
large amounts of data at high speeds.
FDM is the simplest and oldest form of multiplexing in
wireless networking technology.
29 Frequency division multiplexing involves simultaneously
Contd.
These different frequencies, called channels, share
non-overlapping portions of the total frequency band
being used.
Signals from different data sources are fed into a
multiplexer that modulates each signal and transmits
them at different frequencies.
These signals are then transmitted over the wire or
30 through wireless communication and are separated at
FD Multiplexing Vs. FD Demultiplexing Example
31
Time-division multiplexing (TDM)
A multiplexing method for transmitting multiple data
streams in a single communication path.
In TDM, the data from different input channels is
divided into fixed-length segments and then
combined in round-robin fashion into a single output
data stream, which can then be transmitted over a
single channel transmission system and
32 demultiplexed at the destination location.
Contd.
TDM is a digital multiplexing technique for combining several
low-rate digital channels into one high-rate one.
One weakness in TDM is that if an input channel does not
have anything important to carry for a time, empty
segments are inserted into the output stream anyway. For
example, if channel A is not transmitting data, one-third of
the output channel is not being used. You can overcome
33
this weakness by using a more sophisticated multiplexing
Contd.
For example, if input streams A, B, and C are divided into
segments as shown here:
A: A1, A2, A3,...
B: B1, B2, B3,...
C: C1, C2, C3,...
the output stream will look like this:
MUX(ABC) A1, B1, C1, A2, B2, C2, A3, B3, C3,...
34
Statistical Multiplexing
It is a multiplexing technique that allows information from a
number of channels to be combined for transmission over a single
channel.
Statistical multiplexing dynamically allocates bandwidth to each
channel on an as-needed basis. This is in contrast to time-division
multiplexing (TDM) techniques, in which quiet devices use up a
portion of the multiplexed data stream, filling it with empty
packets. Statistical multiplexing allocates bandwidth only to
channels that are currently transmitting. It packages the data from
the active channels into packets and dynamically feeds them into
the output channel, usually on a FIFO (first in, first out) basis, but
it’s also able to allocate extra bandwidth to specific input channels.
Statistical multiplexing is sometimes referred to as statistical
35
Data Transmission : Error Detection
and Correction
Errors in transmitted data can occur for a variety
of reasons.
1. Some errors are due to equipment failure.
2. Some errors are due dispersion in optical
fibers (i.e. light pulses spread out).
3. Some errors are due to attenuation (loss of
signal power over a line).
4. Most errors are due to thermal noise that occurs
naturally on the line.
36
Dealing with Equipment Failure
The more pieces of equipment that your signal needs to
pass through, the more likely it is that you’ll have a failure.
Transmitter Modem Switch Switch Modem Receiver
Fewer intermediate devices or more reliable devices will
reduce the probability of failure.
Redundant devices can also reduce the probability of
failure by taking over from other devices when they fail.
37
Dispersion
Dispersion mainly occurs in optical fibers.
A light pulse is made of billions of photons.
Each photon follows a slightly different path as it
bounces along the optical fiber.
A crisp light pulse will eventually spread out and
38 overlap with other pulses.
Attenuation
Attenuation is the reduction in the power of a
signal as it is transmitted.
Attenuation is a problem because the signal
eventually loses so much power that it becomes
difficult to distinguish it from the thermal noise
in the background
39
Dealing With Errors
We need to build systems that are resilient to errors in data.
There is no way to guarantee that all bits will be sent
uncorrupted.
One way to cope with this is to detect errors and request
that corrupted data should be retransmitted.
Detecting errors cannot be guaranteed either.
We can at least make it extremely unlikely that errors will go
undetected.
40
Errors in Data
Data is sent in the form of binary numbers.
The binary numbers consist bites - which are either 0 or 1.
There are four possible ways that noise can affect a bit:
If a bit is 0, the noise can affect it so it stays 0 – no error
If a bit is 0, the noise can change it to 1- error
If a bit is 1, the noise can affect it so it stays 1 - no error
if a bit is 1, the noise can change it to 0- error
41
Pure Noise
If the noise is overwhelming then (with some
surprise perhaps) we will still receive half the
bits correctly.
The problem is that there is no way of telling
which bits are correct and which bits are not.
The data is no better than if we generated the
42
Detecting Errors
Usually, noise levels are fairly low and most of the bits are received
correctly by the receiver.
The question is, how can the receiver know when an error has
occurred?
Because errors occur randomly, there is no way of knowing with
complete certainty if the data is correct.
The best we can do is detect most errors.
We could try sending the data twice and comparing the two transmissions
to see where the errors are.
This is inefficient, particularly if all we want to know if there is an error in a
particular block of data.
Even when we detect an error, the next question is: what to do about
43
it?
Parity Checking (Vertical Redundancy Check (VRC))
One of the most common ways of checking to see if an error
occurs is to count the bits in a character to see if there is an
even or odd number.
Before transmission, an extra bit (parity bit) is appended to
the character to force the number of bits to be even (or odd).
If the received character does not have an even (or odd) number
of bits then an error must have occurred.
Both the sender and receiver must know which form of parity to
use.
44
Contd.
A character such as 0110001 would be transmitted as:
Odd Parity: 01100010 (There are an odd number of 1s)
Even Parity: 01100011 (There are an even number of 1s)
Parity checking will detect a single error in a character
but not double errors.
8 bits including parity
7 bits of data
(count of 1 bits) Even odd
0000000 (0) 00000000 (0) 10000000 (1)
1010001 (3) 11010001 (4) 01010001 (3)
1101001 (4) 01101001 (4) 11101001 (5)
45
1111111 (7) 11111111 (8) 01111111 (7)
Hamming Distance
The Hamming distance between two bit patterns is the
number of dissimilar bits.
It measures the minimum number of substitutions
required to change one string into the other, or the
number of errors that transformed one string into the
other.
For example, the Hamming distance between
01000001 (‘A’) and 01000011 (‘C’) is 1 because there
is only one dissimilar bit.
46 One error in the wrong place can turn an ‘A’ into a ‘C’.
Hamming Distance
The Hamming distance between 01000001 (‘A’)
and 01000010 (‘B’) is 2 because there are two
dissimilar bits.
It would take two errors in the wrong place to
turn an ‘A’ into a ‘B’.
Adding a parity bit ensures that there is at least
47 a Hamming distance of 2 between any two code
Checksum
Another simple way of checking if there has
been an error in a block of data is to find a
checksum.
Imagine we send the data 121, 17, 29 and 47.
Adding these numbers up, we get 214.
We actually send 121,17,29,47 and 214.
The receiver can total up the first numbers
and compare it to the last one.
48
Contd.
Typically pairs of bytes are joined to make 16 bit numbers. It
is these 16 bit numbers that are totaled to make the
checksum.
If the checksum becomes larger than 65535 (the largest
possible 16 bit number) then the carried bits are discarded.
Checksums are common but not particularly good at
catching errors. Later errors can easily hide earlier ones.
49
Cyclic Redundancy Code (CRC)
A far more effective way of detecting errors in a
block of data is to use a Cyclic Redundancy Code.
In CRC, a number is mathematically calculated for
a packet by its source computer, and then
recalculated by the destination computer.
If the original and recalculated versions at the
destination computer differ, the packet is corrupt
and needs to be resent or ignored.
50
Contd.
The mathematical procedure for performing a CRC is
specified by the International Telecommunication Union
(ITU) and involves applying a 16-bit polynomial to the
data being transmitted by the packet for packets of 4 KB
of data or less, or a 32-bit polynomial for packets larger
than 4 KB.
The results of this calculation are appended to the packet
as a trailer. The receiving station applies the same
polynomial to the data and compares the results to the
trailer appended to the packet. Implementations of
Ethernet use 32-bit polynomials to calculate their CRC.
51