Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Handout 3 - Data Communications

Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 11

Chapter 3

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.

2. Forms of information transmission

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.

The most efficient method of transmitting data is to use a full-duplex transmission, in


which data can be transmitted and received at the same time. A telephone is a full-
duplex device because it allows both parties to talk at the same time.

3. Digital and analogue signals

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

Figure 2 – Digital vs. analogue signals

Analogue signals consist of a number of components: the amplitude is the height of


the waveform, the wavelength is the length of a single wave, and the phase can be
thought of as the starting point of the wave. For example, an analogue wave that starts
at zero and goes upwards (as in the wave in Figure 2) will have a different phase to
one that starts at zero and goes downward.

The analogue signal in Figure 2 is transmitting at a single frequency only (the


frequency is the inverse of the wavelength). However, a single channel will typically
transmit at a number of frequencies simultaneously, by summing the waveforms of
the different frequencies. The bandwidth of a communications channel determines a

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.

4. Digital transmission of digital data

In digital transmission, signals flow in the form of discrete pulses of electricity


(voltage) or light. The entire communication channel capacity is used to transmit a
single data signal (i.e. all frequencies are used). Because of the problem of attenuation
of the signal (i.e. signal loss over distance), digital transmission systems use repeaters
to boost the signal back to its original strength when transmitting over long distances.

When transmitting a digital signal in digital form over a network, a number of


techniques can be employed to encode the data stream. Two of the more common
techniques are described below.

4.1 Nonreturn to zero (NRZ)

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

4.2 Manchester encoding

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.

4.3 Synchronous and asynchronous communication

There are two other common approaches for synchronising the sender and the receiver
in data communications. These are known as asynchronous and synchronous
transmission.

In asynchronous transmission the timing problem is avoided by not sending long


uninterrupted streams of bits. Instead, data are transmitted one character at a time. A
character can consist of anything between 5 and 8 bits. Synchronisation must only be
maintained within each character; the receiver has a chance to resynchronise at the
beginning of each character. It is common to use asynchronous communication to
overcome the timing limitation of NRZ signalling. Figure 4 shows a character of 8
bits transmitted using asynchronous communication with NRZ encoding. Before
transmission the channel is in an idle state (the same as binary 1). Each character is
preceded by a start bit (same as binary 0). After transmission of the data bits there
follows a stop bit (same as binary 1), followed by another idle period. Using
asynchronous communication, the sender and receiver must agree on the number of
bits in a character before transmission begins.

4
Figure 4 – A character transmitted using asynchronous communication

In synchronous transmission the data bits are transmitted in a continuous stream


without interruption. To prevent timing drift between the sender and receiver, their
clocks must be somehow synchronised. One possibility is to provide a separate clock
line between the sender and receiver. One side (either the sender or receiver) will
transmit a regular pulse onto the clock line, and the other side will use these regular
pulses to synchronise its clock.

5. Analogue transmission of digital data

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.

This scheme can be extended. It is possible to transmit 3 bits at a time by using 8


different phase shifts. Furthermore, phase shift techniques can be combined with
amplitude modulation techniques to make even more values possible.

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.

Figure 5 – Amplitude modulation and frequency shift keying analogue


transmission techniques

6. Digital vs. analogue transmission

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.

Figure 6 – The roles of a multiplexor and demultiplexor

The two main types of multiplexing - time-division multiplexing (TDM) and


frequency-division multiplexing (FDM) - both aim to maximise the number of
message signals that can be transmitted over the shared transmission link.

7.1 Frequency Division Multiplexing (FDM)

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.2 Time Division Multiplexing (TDM)

Rather than divide a communications link into frequency-separated channels as FDM


does, TDM divides time into slices called time slots. Each computer is assigned one or

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.

7.2.1 Synchronous Time Division Multiplexing

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.

7.2.2 Statistical Time Division Multiplexing

Statistical TDM attempts to provide more efficient communication by avoiding the


wastage of time slots described above. Using statistical TDM there will be n sub-
channels (I/O lines) but only k (k < n) available time slots per cycle. Time slots are
dynamically allocated on demand. Only those sources that have data to send will
request a time slot so the chance of time slots being wasted is much reduced. Using
statistical TDM if every sub-channel has data to send for a particular cycle there will
not be enough time slots for every channel. However, with sources of different data
rates this is not usually the case. Statistical TDM can have more sub-channels than
synchronous TDM for the same communication link. Statistical TDM must add some
addressing information to each piece of data sent as there is no fixed assignment of
time slots.

8. Error checking

No transmission medium is perfect. Whether the data is transmitted using UTP/STP


cable, coaxial cable, fibre-optic cable or wireless networking, the transmitted data will
be subject to noise, or errors. Clearly these errors should be avoided if possible. If the
error could be detected then the receiving computer could send a message to the
sending computer asking for the corrupted data to be resent. A number of schemes
exist for detecting errors in data communication. The simplest scheme is called parity
checking.

8.1 Parity 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.

Figure 7 – An extended parity-checking scheme:


(a) with no transmission errors; (b) with a single error

8.2 Checksum

An alternative error-checking scheme is called checksum. This technique works by


considering the data stream as a sequence of integer values. After the sending
computer has transmitted n integer values, the arithmetic sum of the n integers is
computed and transmitted. The receiving computer computes the same sum and
compares it against the received checksum value.

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.

8.3 Cyclic redundancy check

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.

9. Baseband and broadband transmission

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

 The bandwidth of a communications channel is the range of frequencies over


which data can be transmitted
 In simplex communication data travels in one direction only (e.g. television)
 In half-duplex communication data can travel in both directions but only in
one direction at a time (e.g. modems)
 In full-duplex communication data can travel in both directions at once (e.g.
telephone)
 Digital data can be transmitted in digital form or analogue form
 Two of the most common schemes for digital transmission are Nonreturn to
Zero (NRZ) and Manchester encoding
 The synchronisation problem in digital transmission is caused by
misalignment of the senders and receivers clocks, and can lead to errors in
data transmission
 Synchronous and asynchronous transmission are both ways of ensuring that
the sending and receiving computers are synchronised in digital transmission
 Common schemes for analogue transmission are amplitude modulation (AM),
frequency shift keying (FSK), and phase-shift keying (PSK)
 Quadrature phase-shift keying (QPSK) allows multiple bits to be sent for each
change in modulation in the signal
 Multiple signals can be transmitted on the same cable using multiplexing
 In Frequency Division Multiplexing (FDM) the total bandwidth is divided up
into a number of sub channels with reduced bandwidth
 In Time Division Multiplexing (TDM) the full bandwidth is used, but each
computer takes turns to transmit
 Errors introduced during transmission can be detected, and sometimes
corrected by adding a parity bit to each character transmitted
 The checksum error detection scheme works by computing and transmitting
the arithmetic sum of a sequence of n integers
 The cyclic redundancy check (CRC) error detection scheme works by adding n
extra bits after the k data bits so that the resulting sequence of k+n bits is
exactly divisible by a predetermined number
 Baseband communication usually refers to digital non-multiplexed
transmission
 Broadband communication usually refers to high bandwidth analogue
transmission, which uses multiplexing to allow multiple channels.

11

You might also like