Data communications
signal encoding techniques
Reference Books
• Data and Computer Communications by William
Stallings , Sixth Edition , Publisher Prentice Hall
• Data Communications and Networking by
Behrouz A Forouzan, Behrouz Forouzan, 4th
Edition
• Andrew S. Tanebaum, Computer networks 5th
Ed(2011), Prentice Hall
Digital Transmission
• Methods to transmit data digitally
—Line coding
—Block coding
—Sampling
• Transmission modes
—Parallel
—Serial
– Synchronous
– Asynchronous
3
Digital Signals
• Digital – have a limited number of defined values
• Use binary (0s and 1s) to encode information
• Less affected by interference (noise); fewer errors
4
Line Coding
• Process of converting binary data to a digital signal
5
Line Coding Characteristics
• Signal Level versus Data Level
• Pulse Rate versus Bit Rate
• DC Components
• Self-Synchronization
6
Signal Level versus Data Level
• Signal level – number of different values allowed in a signal
• Data level – number of symbols used to represent data
b.Three signal levels, two data levels
7
Pulse Rate versus Bit Rate
• Pulse rate – defines number of pulses per second
—Pulse – minimum amount of time required to transmit
a symbol
• Bit rate – defines number of bits per second
8
DC Components
• Residual direct-current (dc) components or zero
frequencies are undesirable
—Some systems do not allow passage of a dc
component (such as a transformer); may distort the
signal and create output errors
—DC component is extra energy residing on the line
and is useless
9
DC Component
10
Self-Synchronization
• Digital signal includes timing information in the data being
transmitted to prevent misinterpretation
Figure 4.16 Lack of synchronization
11
Line Coding Schemes
12
Unipolar
• Simplest method; inexpensive
• Uses only one voltage level
• Polarity (+ or -) is usually assigned to binary 1;
a 0 is represented by zero voltage
13
Unipolar
• Potential problems:
—DC component
—Lack of synchronization
14
Polar
• Uses two voltage levels, one positive and one
negative
• Alleviates DC component
• Variations
—Nonreturn to zero (NRZ)
—Return to zero (RZ)
—Manchester
—Differential Manchester
15
Nonreturn to Zero (NRZ)
• Value of signal is always positive or negative
• NRZ-L (NRZ-Level)
—Signal level depends on bit represented; positive usually
means 0, negative usually means 1
—Problem : synchronization of long streams of 0s or 1s
• NRZ-I (NRZ-Invert)
—Inversion of voltage represents a 1 bit
—0 bit represented by no change
—Allows for synchronization
16
NRZ-L and NRZ-I Encoding
17
Return to Zero (RZ)
• In NRZ-I, long strings of 0s may still be a
problem
• May include synchronization as part of the signal
for both 1s and 0s
• How?
—Must include a signal change during each bit
—Uses three values: positive, negative, and zero
—1 bit represented by positive-to-zero
—0 bit represented by negative-to-zero
18
RZ Encoding
19
RZ Encoding
• Disadvantage
—Requires two signal changes to encode each bit;
more bandwidth necessary
20
Manchester
• Uses an inversion at the middle of each bit
interval for both synchronization and bit
representation
• Negative-to-positive represents binary 1
• Positive-to-negative represents binary 0
• Achieves same level of synchronization with only
two levels of amplitude
21
Manchester Encoding
22
Differential Manchester
• Inversion at middle of bit interval is used for
synchronization
• Presence or absence of additional transition at
beginning of interval identifies the bit
• Transition means binary 0; no transition means
1
• Requires two signal changes to represent binary
0 but only one to represent 1
23
Differential Manchester
24
Bipolar Encoding
• Uses three voltage levels: positive, negative, and
zero
• Zero level represents binary 0; 1s are represented
with alternating positive and negative voltages,
even when the 1 bits are not consecutive
• Two schemes
—Alternate mark inversion (AMI)
—Bipolar n-zero substitution (BnZS)
25
Bipolar AMI
• Neutral, zero voltage represents binary 0
• Binary 1s represented by alternating positive and
negative voltages
26
Sampling
• Analog data must often be converted to digital
format (ex: long-distance services, audio)
• Sampling is process of obtaining amplitudes of a
signal at regular intervals
27
Pulse Amplitude Modulation (PAM)
• Analog signal’s amplitude is sampled at regular intervals;
result is a series of pulses based on the sampled data
• Pulse Coded Modulation (PCM) is then used to make the
signal digital
28
Note:
Pulse amplitude modulation has some
applications, but it is not used by itself
in data communication. However, it is
the first step in another very popular
conversion method called
pulse code modulation.
29
Pulse Coded Modulation (PCM)
• First quantizes PAM pulses; an integral value in a
specific range to sampled instances is assigned
• Each value is then translated to its 7-bit binary
equivalent
• Binary digits are transformed into a digital signal
using line coding
30
Digitization of an Analog Signal
31
Sampling Rate: Nyquist Theorem
• Accuracy of digital reproduction of a signal
depends on number of samples
• Nyquist theorem: number of samples needed to
adequately represent an analog signal is equal
to twice the highest frequency of the original
signal
32
Note:
According to the Nyquist theorem, the
sampling rate must be at least 2 times
the highest frequency.
33
Transmission Mode
34
Parallel Transmission
• Bits in a group are sent simultaneously, each using a
separate link
• n wires are used to send n bits at one time
• Advantage: speed
• Disadvantage: cost; limited to short distances
35
Serial Transmission
• Transmission of data one bit at a time using only one
single link
• Advantage: reduced cost
• Disadvantage: requires conversion devices
• Methods:
— Asynchronous
— Synchronous
36
Asynchronous Transmission
• Transfer of data with start and stop bits and a
variable time interval between data units
• Timing is unimportant
• Start bit alerts receiver that new group of data
is arriving
• Stop bit alerts receiver that byte is finished
• Synchronization achieved through start/stop bits
with each byte received
37
Asynchronous Transmission
38
Asynchronous Transmission
• Requires additional overhead (start/stop bits)
• Slower
• Cheap and effective
• Ideal for low-speed communication when gaps
may occur during transmission (ex: keyboard)
39
Synchronous Transmission
40
Synchronous Transmission
• Requires constant timing relationship
• Bit stream is combined into longer frames,
possibly containing multiple bytes
• Any gaps between bursts are filled in with a
special sequence of 0s and 1s indicating idle
• Advantage: speed, no gaps or extra bits
• Byte synchronization accomplished by data link
layer
41
Credits
• Reference from
Data Communications and Networking, 3rd edition by
Behrouz A. Forouzan. McGraw Hill Publishing, 2004
42