Handout 3 - Data Communications
Handout 3 - Data Communications
Handout 3 - Data Communications
Data Communication
1. Introduction
The rise in popularity of computer networking in the 1970s and 1980s has brought the
fields of computer science and data communications very close together. Therefore, to
have a good understanding of computer networking you must understand some of the
basic theory of data communications.
The most basic form of data or information transmission is called simplex. This means
that data is sent in one direction only, from sender to receiver. (See Figure 1.)
Examples of simplex transmission are radio and television. With simplex
transmission, problems encountered during the transmission are not detected and
corrected. Senders cannot even be sure that the data is received.
In the next level of data transmission, called half-duplex transmission, data is sent in
both directions, but in only one direction at a time. With half-duplex transmission,
you can incorporate error detection and request that any bad data be resent. Surfing
the World Wide Web is a form of half-duplex data transmission. You send a request
for a Web page and then wait while it is being sent back to you. Most modem
connections use half-duplex data transmission.
All data stored in computers is stored in digital form (i.e. it is a sequence of 0s and
1s). Exactly how this digital data is transmitted over the physical cabling of the
network can vary. Although the data itself is in digital form the communication
method can be either digital or analogue. Figure 2 illustrates the difference between
digital and analogue transmission. If the digital signal is transmitted in analogue form
then some kind of conversion must take place at both the sending and receiving
computers.
1
Figure 1 – Simplex, half-duplex and full-duplex information transmission
2
channel's information-carrying capacity. Bandwidth is defined as "the range of
frequencies that the channel is capable of transmitting without interference or signal
loss" and is measured in Hertz. The greater the range of frequencies a medium can
handle, the greater is its information-carrying capacity. In data communications,
bandwidth is generally specified in bits per second (bps). A channel that supports a 2
Mbps bandwidth can support a transmission rate of two million bits per second.
The most common, and easiest way to transmit digital signals is to use two different
voltage levels for the two binary digits (0 and 1). For example, a voltage level of zero
could represent a 0 digit, and a constant positive voltage could represent a 1 digit.
More commonly, a negative voltage is used to represent one of the binary digits and a
positive voltage to represent the other. In this case the scheme is known as Nonreturn
to zero (NRZ), because the signal is never at zero voltage. (See Figure 3.)
Although it is the easiest and most common technique, NRZ and similar schemes
have an important disadvantage. Suppose that the sender simply sends a stream of bits
down the cable. The sender has a clock that controls the timing of the transmitted bits.
For example, if the data are transmitted at a rate of 1 Mbps (1 million bits per second),
then one bit will be transmitted every microsecond, as measured by the sender’s
clock. The receiver will then attempt to read one bit every microsecond, according to
its own clock. If the senders and receivers clocks are not precisely aligned, then
eventually there will be problems. If the clocks are misaligned by just 0.01
microseconds, then after 50 or more bits have been received the receiver may be in
error because of the drift in timing. This is known as the synchronisation problem in
digital communications. To overcome this problem a technique is required for
synchronising the sending and receiving of the data.
3
Figure 3 – The NRZ and Manchester encoding digital transmission techniques
Manchester encoding and related techniques offer one means of overcoming the
synchronisation problem. With Manchester encoding data is transmitted not by the
voltage level of the stream, but by a transition in this voltage level. For example, a
low-to-high transition could represent a 1, and a high-to-low transition could represent
a 0. As well as representing the data, this transition acts as a clocking mechanism.
When the receiving computer notices the voltage transition it can resynchronise its
clock to align with that of the sender. Figure 3 illustrates the use of Manchester
encoding to transmit a bit stream.
There are two other common approaches for synchronising the sender and the receiver
in data communications. These are known as asynchronous and synchronous
transmission.
4
Figure 4 – A character transmitted using asynchronous communication
The alternative to transmitting the digital data inside the computer as a digital signal is
to convert the digital data into analogue form, transmit it over the network, and then
convert it back into digital data at the receiving computer. The signals are continuous
and non-discrete, and flow across the physical medium in the form of electromagnetic
or optical waves. While digital systems use repeaters, analogue systems use amplifiers
to regenerate analogue signals at their original strength.
Three of the more common schemes for analogue transmission of digital data are
illustrated in Figure 5. All are called carrier modulation schemes, because they
transmit data by modulating (changing) some part of the waveform. In amplitude
modulation (AM), or amplitude shift keying (ASK), the amplitude, or height of the
wave, is modulated to represent the 1s and 0s of the signal. Usually constant positive
amplitude represents one binary value, and zero amplitude represents the other. In
frequency shift keying (FSK), the frequency is modulated, with two different
frequency values representing the two binary values. In phase shift keying (PSK), it is
the phase that is modulated: to transmit a binary 0 the phase should remain the same
as the previous bit transmitted, for a binary 1 the phase should change by 180o (i.e. the
opposite phase).
Any analogue signal has a modulation rate. This is the number of times per second
that the signal can be safely modulated (changed), without interference or signal loss.
Therefore using any of the encoding techniques just described the modulation rate
represents a limit on the speed at which the digital data can be transmitted. More
efficient transmission can be achieved if each signalling element is made to represent
more than one bit. For example, instead of using a phase-shift of 180o, the quadrature
phase-shift keying (QPSK) technique uses phase shifts of multiples of 90o:
45 o phase shift= binary 11
135 phase shift
o
= binary 10
225 o phase shift = binary 00
315 phase shift
o
= binary 01
5
Thus, for each modulation change, two bits are transmitted instead of one.
It is evident, therefore, that the data rate R (in bits per second) is not the same as the
modulation rate D (in Hertz). In fact the relationship between the two can be
expressed as
R = D.b
where b is the number of bits transmitted with each modulation change. This can also
be written
R = D.log2 L
where L is the number of different signal elements (e.g. 4 for QPSK).
Generally, the word modulation refers to the conversion of digital data to analogue
signals. Demodulation refers to the opposite process. Since computers store all
information in digital form, and telephone lines always use analogue transmission, it
follows that the computer’s data must be modulated before transmission and
demodulated upon reception. The device that performs these tasks is called a
modulator/demodulator, or modem.
The techniques described above show that there is a wide range of choices for
transmission of digital data. So which is the best? Digital transmission has the appeal
of simplicity, since no modulation and demodulation of the data is required. However,
for longer distances analogue transmission may be preferable: oscillating signals are
known to travel longer distances with less attenuation than constant amplitude signals.
In practise, large WANs like the Internet will employ a range of different
communication techniques, although most LANs use digital transmission only.
6
7. Multiplexing
The technique of allowing multiple signals to be transmitted at the same time over the
same cable is called multiplexing. This is illustrated in Figure 6 – in this case three
different sources can transmit to three different destinations over a single channel.
The role of the multiplexor is to accept data from more than one source, and transmit
it over the shared channel. The demultiplexor accepts data from the shared channel,
and sends it on to its correct destination.
FDM was the earliest and least sophisticated method of multiplexing, and can be
employed only if the data is being transmitted in analogue form. Because analogue
data communication does not necessarily use the entire bandwidth of the
communication channel, it offers the possibility of dividing the bandwidth of the line
into independent, permanently assigned, lower-speed sub channels that operate on
particular frequencies within the spectrum. The speed (bits per second) at which the
channel operates depends upon the amount of bandwidth (measured in Hz) assigned
to each channel; the required bandwidth increases or decreases in proportion to the
operating speed. Therefore, the slower the transmission rates, the more sub-channels
can be assigned within the bandwidth; the faster the rates, the fewer sub channels can
be assigned.
One disadvantage of FDM is that because the sub-channels are permanently assigned,
bandwidth can be wasted if a particular sub-channel has no data to be transmitted at a
given time.
7
more time slots and takes its turn at transmitting and receiving data using the
transmission line. The process of accepting data from many computers in succession
is called interleaving. Depending upon the multiplexer type, the device accepts only
one bit (bit interleaving) or character (character interleaving) from each input line,
puts it into a specifically allocated time slot on the high-speed transmission line, and
then moves on to the next time slot in the sequence. TDM can be used with both
digital and analogue signals. We can divide TDM methods into 2 types: synchronous
TDM and statistical TDM.
With synchronous TDM, the time slots are permanently assigned to the sub-channels,
so as with FDM if a particular sub-channel has no data to send when its time slot
arrives, the multiplexor will fill out the assigned slot with some type of information
and that time slot will be wasted. Synchronous TDM can handle a number of sub-
channels that have different data rates by assigning more than one time slot per cycle
to sources that have higher data rates.
8. Error checking
In the parity checking scheme the stream of 1s and 0s is broken down into characters
(groups of 5 to 8 bits). At the end of each character an extra bit is appended, known as
8
the parity bit. The value of this bit is chosen so that the total number of 1s in the
character is even (even parity) or odd (odd parity). For example, if the sender is
transmitting the character 1110010 and using odd parity, the parity bit will be set to 1.
Therefore the actual transmitted data will be 11100101, making the total number of 1s
equal to 5. The receiver examines the received character, and if the total number of 1s
is odd, assumes that no error has occurred. If one bit has been changed due to noise on
the transmission medium the receiver detects an error and requests the character to be
resent. Note, however, that if two bits (or any even number of bits) are changed due to
errors, an undetected error occurs.
This simple parity-checking scheme can be extended to correct for as well as detect
errors. Consider Figure 7. As before, the data bits are divided into characters, in this
case of 8 bits, each with an associated parity bit. But this time, the characters are also
grouped together into blocks of 8, making an 8x8 grid of data bits. Parity bits are
added not just to the rows of bits, but also vertically, to the columns. Figure 7(a)
shows such a scheme with no transmission errors. Now when an error occurs, as
shown in Figure 7(b), two parity errors occur, indicating respectively the row and
column at which the error has occurred. This extended parity checking scheme can
detect and correct for a single transmission error. However, if two errors occur on the
same row or column, the error will be detected but cannot be corrected for.
8.2 Checksum
Checksum can normally detect, but not correct for, multiple bit errors. However, there
are cases in which checksum can miss transmission errors. For example, consider the
9
following sequence of integers: 11, 34, 3, 0, 12. The checksum generated by this
sequence would be 60, so the transmitted sequence would be 11, 34, 3, 0, 12, 60. Now
assume that two bits in this sequence are corrupted and their values flipped, so that the
transmitted sequence is actually 11, 32, 3, 2, 12, 60. The receiving computer would
calculate the checksum value as 60 (=11+32+3+2+12) and assume that there has been
no error. In fact, undetected transmission errors can occur with checksum whenever
the same bit is changed in two different integers in the sequence: in the example
described above the second bit in the integers 34 and 0 was flipped, one changing
from 0 to 1 and one changing from 1 to 0.
One of the most common and powerful schemes is called the cyclic redundancy
check, or CRC. This technique works as follows. Given a k-bit data sequence, then
sending computer generates an extra n-bit sequence, known as the frame check
sequence (FCS). The extra n bits are generated so that the resulting sequence,
consisting of k+n bits, is exactly divisible by some predetermined number. The
receiving computer will divide the received sequence by the predetermined number
and if there is no remainder, assumes that there was no transmission error. The CRC
error-checking scheme can detect, but not correct for, almost all transmission errors.
Two common terms that you may come across in data communications textbooks are
baseband and broadband. Communication can be referred to as baseband when the
signal is digital and no multiplexing is being used. Therefore only a single channel of
data is transmitted. Broadband is a general term for a communication channel with a
large bandwidth. Broadband systems are usually analogue and use multiplexing to
allow multiple channels of data to be transmitted over the same cable.
10
Summary of Key Points
11