Line Codings
Line Codings
sent
1,001,000 bits
Built-in
Detection It is desirable to have a built-in error-detecting capability
in the generated code to detect some or all the errors that occurred during transmission. Some encoding schemes that we will discuss have this capability to some extent.
to Noise
Another desirable code characteristic is a code
that is immune to noise and other interferences. Some encoding schemes that we will
discuss have this capability.
Complexity
example, a scheme that uses four signal levels is more difficult to interpret than one that
uses only two levels.
Coding Schemes
We can roughly divide line coding schemes into five broad categories, as shown in Figure
4.4.
4.4 Line coding schemes
Unipolar
NRZ,
biphase (Manchester.
differential Manchester)
Polar
Line
Bipolar
Multilevel
Multitransition
2B/IQ, 8B/6T,
4U-PAM5
MLT-3
There are several schemes each category. We need to be familiar with all schemes
discussed in this section to understand the rest the book. This section can be used a
reference for schemes encountered later.
Unipolar Scheme
In a unipolar scheme, all the signal levels are on one side
below.
107
f
f
: 1
I
I
v
I
Time
the both sides of the width. In the first variation, NRZ-L (NRZ-Level),
P time
axis.
For
the value of the bit. In the second
I example, the voltage
variation, NRZ-I (NRZ-Invert), the
Compared
with
its
polar level for 0 can be
change or lack of change in the level
counterpart (see the next section), this positive and the
the voltage determines the value of the
scheme is very costly. As we will see voltage level for I
bit. there no change, the bit is 0; if
shortly, the normalized power (power can be negative.
there is a change, the bit is
needed to send 1 bit per unit line
Non-Return-to-Zero (NRZ) In
resistance) is double that for polar NRZ. amplitude.
can have two versions of polar NRZ: NRZFor this reason, this scheme nor-mally Figure 4.6. The figure Figure
4.6 Polar
also shows
the value and NRZ-I
not used in data communications today.
schemes
I
I
NRZ-L
NRZ-I
1:
Time
Time
o
o
o No inversion: Next
bit is 0 Inversion:
Next bit is 1
In NRZL the
level
of
the
volta
Z
I
t
h
e
i
n
v
ersio
n
the
lack
of
inver
sion
deter
mine
s the
valu
e
o
f
t
h
e
b
i
t
previously
defined.
baseline
LAlthough
et uswandering is a problem
comp for both variations, it is
are twice as severe in
there is a
these NRZ-L.
or
two long sequence
sche Is in NRZ-L, the
mes average signal power
108
becomes skewed. The receiver might have difficulty discerning the bit value. In NRZ-I this
problem occurs only for a long sequence
as.
somehow we
eliminate the long
sequence as, we
avoid baseline wandering. We will see shortly how this
done.
synchronization problem (sender and receiver clocks are not synch
also exists in
schemes. Again, this
is
serious
I.
a long
a
scheme
sequence
1s affects only NRZ-L.
Another problem with
occurs when there is a sudden change
po
the system. For example,
twisted-pair cable is the medium, a change in the p
the wire results
all
interpreted as Is and all Is interpreted as as. NRZ-I
have this problem. Both schemes have an average signal rate
NI2 Bd.
NRZ-L and NRZ-J both have
NI2 Bd.
us discuss the bandwidth. Figure 4.6 also shows the normalized bandwidth for both
variations.
vertical axis shows the power density (the power for each I
bandwidth);
the horizontal axis shows the frequency.
reveals a very serious problem for this
type encoding. The value
the power density is velY
around frequencies close to
zero. This means that there are DC components that carry a high level energy. As a matter
fact, most
the energy is concentrated in frequen-cies between a and
This means that
although the average
the signal rate is
the energy is not distributed evenly between the
two halves.
Example 4.4
A system is using NRZ-I to transfer 10-Mbps data. What are the average signal rate and mini-
mum bandwidth?
The average signal rate S =NI2 = 500 kbaud. The minimum bandwidth for this average baud
rate
= S = 500 kHz.
The main problem with
and receiver clocks are not synchronized.
and the next bit is starting. One solution is the
uses three values: positive, negative, and zero.
between bits but during the bit. In Figure 4.7 we see that the signal goes to 0 in the mid-
dle
each bit.
tage
occupies greater bandwidth.
polarity resulting all interpreted as 1s and all 1s interpreted as as, still exist here,
but there is no DC component problem. Another problem is the complexity:
three levels voltage, which is more complex to create and discern. As a result
these deficiencies, the scheme is not used today. Instead, it has
better-performing Manchester and differential Manchester schemes (discussed next).
4.1 DIGITAL-TO-DIGITAL CONVERSION
4.7 Polar
scheme
Amplitude
l
l
l
replace
Time
o
n
c
h
es
te
r
Biphase:
Differential
the middle
the bit) and the idea
In Manchester encoding, the duration
remains at one level during the first
half and moves to the other level in the
second half. The transition at the
middle
the
bit
provides
synchronization.
Differential
Manchester, on the other hand,
combines the ideas RZ and NRZ-I.
There is always a transition at the
middle of the bit, but the bit values are
determined at the beginning the bit.
the next bit is 0, there is a transition;
if the next bit is 1, there is none. Figure
4.8 shows both Manchester and
differential Manchester encoding.
Manchester
Differential
Manchester
di
ff
er
e
nt
ia
l
M
a
n
c
h
es
ter
encodin
g, the
transitio
n the
middle
the
bit is
used for
synchro
nization
.
The
Manchester
scheme
overcomes several problems associated
with
and
differential
Manchester
overcomes
several
problems associated with NRZ-I. First,
there is no baseline wandering. There is
no
component because each bit has
a positive and
110
negative voltage contribution. The only drawback is the signal rate. The signal rate for
Manchester and differential Manchester double that for NRZ. The reason that there
always one transition at the middle of the bit and maybe one transition at the end of each
bit. Figure 4.8 shows both Manchester and differential Manchester encoding schemes.
Note that Manchester and differential Manchester schemes are also called
schemes.
The minimum bandwidth ofManchester and differential Manchester
Bipolar Schemes
In
encoding (sometimes called multilevel binary), there are three voltage lev-els:
positive, negative, and zero. The voltage level for one data element is at zero, while the
voltage level for the other element alternates between positive and negative.
bipolar encoding, we use three levels: positive, zero,
negative.
and pseudoternary
Time
Amplitude
I
I
I
AMI
Time
Pseudoternary
but
The NRZ scheme hasperformance
around
this
there most
its energyfrequency. The concen-tration of
no concentrated near zerothe energy in bipolar encoding
frequency, which makesaround frequency
Figure 4.9
The bipolar scheme was developedDC
unsuitable
forshows
the
typical
energy
as an alternative to NRZ. The bipolar com it
pone
transmission
over
concentration
for
a
bipolar
scheme has the same signal rate NRZ,
nt.
channels
with
poorscheme.
111
m
2 data patterns. We can have different types
signal
elements by allowing different signal levels. If we have L different levels, then we can produce Ln
m
m
combinations
signal patterns. 2 = L then each data pattern is encoded into one signal pattern. If 2
n
< L , data patterns occupy only a subset of signal patterns. The subset can be carefully designed to prevent
baseline wandering, to pro-vide synchronization, and to detect errors that occurred during data transmission.
Data
the data
m
n
2 >L
encoding is
patterns
because some
not possible
cannot be
encoded.
The code designers have classified these types
coding mBnL, where m is the
length of the binary pattern, B means binary data, n is the length
the signal pattern,
and L the number
levels in the signaling. A letter is often used in place
L: B
(binary) for L = T (ternary) for L =3, and Q (quaternary) for L =
Note that the first
two letters define the data pattern, and the second two define the signal pattern.
(2BIQ), uses
m
elements is encoded as a pattern
elements in which
Ln.
n signal
with a price. There are no redundant signal patterns in this scheme because 2 =4 .
As we will see in Chapter 9,
is used in DSL (Digital Subscriber Line) tech-nology
high-speed connection to the Internet by using subscriber telephone lines.
provide a
112
Next
level
+3
10
Transition table
00
I
I
I
I
I
+3
I
I
I
+1
p
1\
I
I
I
I
I
I
Save
Time
0.5
oo
I
I
I
I
I
Bandwidth
1/2
A very interesting scheme is eight binary, six ternary (8B6T). This code used with
100BASE-4T cable, as we will see in Chapter The idea to encode a pattern
8 bits a
pattern 6 signal elements, where the signal has three levels (ternary). In this type of scheme,
8
we can have 2 =256 different data patterns and 3 =478 different signal
256 =222 red
patterns. The mapping table is shown in Appendix D. There are 478 signal elements that provide synchronization and error detection. Part
the redund
also used to provide
balance. Each signal pattern has a weight of 0 or +1
value
means that there is no pattern with the weight To make the whole stream Dc-balanced, the
sender keeps track of the weight. If two groups weight 1 are encountered one after
another, the first one
sent as is, while the next one is totally inverted to give a weigh
Figure 4.11 shows an example
three data patterns encoded as three sign
terns. The three possible signal levels are represented as
and +. The first 8-b
tern 00010001 is encoded as the signal pattern
with weight 0; the secon
pattern 010 10011 is encoded as - + + + 0 with weight + The third bit pattern
encoded as + - -
actual signal. The receiver can easily recognize that this is an inverted pattern because
the weight is
The pattern is inverted before decoding.
Figure 4.11
Multilevel:
scheme
01()10011
+v
I
I
pattern :
SECTION 4.1
DIGITAL-TO-DIGITAL CONVERSION
113
in practice
dimensional five-level pulse amplitude modulation (4D-PAM5). The 4D means that data
is sent over four wires at the same time. uses five voltage levels, such as
0, and 2.
However, one level, level 0, is used only for forward error detection (discussed in Chap-ter 10). we assume that
the code is just one-dimensional, the four levels create something similar to 8B4Q. In other words, an 8-bit word
is translated to a signal element four differ-ent levels. The worst signal rate for this imaginary one-dimensional
version is N X 4/8, or
The technique is designed to send data over four channels (four wires). This means the
signal rate can be reduced to
a significant achievement. All 8 bits can be fed into a
wire simultaneously and sent by using one signal element. The point here is that the four signal elements
comprising one signal group are sent simultaneously in a four-dimensional setting. Figure 4.12 shows the
imaginary one-dimensional and the actual four-dimensional implementation. Gigabit LANs (see Chapter 13) use
this technique to send 1-Gbps data over four copper cables that can handle 125 Mbaud. This scheme has a lot
8
4
redundancy in the signal pattern because 2 data patterns are matched to 4 = 256 signal patterns. The extra signal
patterns can be used for other purposes such as error detection.
4.12 Multilevel: 4D-PAM5 scheme
00011110
1 Gbps
250 Mbps
Wire 1 (125 MBd)
250 Mbps
+1
250 Mbps
250 Mbps
114
The behavior
-3 can best
described
the state diagram shown in Figure 4.13. The
three voltage levels
0, and +V) are shown by three states (ovals). The transition from one
state (level) another is
the connecting lines. Figure 4.13 also shows two examples
an MLT-3 signal.
I
I
I
I
I
I
I
I
Next bit: 0
: Time
1
I
a. Typical case
Last
non-zero non-zero
Next bit: 0 level: +V level: - V Next bit: 0
Transition states
b. Worse case
One might wonder why we need to use MLT-3, a scheme that maps one bit to one signal
element. The signal rate is the same as that for NRZ-I, but with greater complexity (three
levels and complex transition rules). It turns out that the shape
the signal in this scheme
helps to reduce the required bandwidth. Let us look at the worst-case scenario, a sequence
I
In this case, the signal element pattern +
is repeated every 4 bits. A nonperiodic
signal has changed to a periodic signal with the period equal to 4 times the bit duration. This
worst-case situation can be simulated as an analog signal with a fre-quency one-fourth
the
bit rate. In other words, the signal rate for MLT-3 is one-fourth the bit rate. This makes MLT-3
a suitable choice when we need to send 100 Mbps on a copper wire that cannot support more
than 32 MHz (frequencies above this level create electromagnetic emissions). MLT-3 and
LANs are discussed in Chapter 13.
Summary
Category
Scheme
Unipolar
Unipolar
(average)
NRZ
NRZ-L
No self-synchronization
NRZ-I
Biphase
SECTION 4.1 DIGITAL-TO-DIGITAL CONVERSION
Table
Summary
Category
Bipolar
Characteristics
long
Bandwidth
(average)
AMI
Characteristics
No self-synchronization for long OS,
No self-synchronization for long same double bits
Multilevel
Multiline
B =3N/4
8B6T
Self-synchronization, no DC
4D-PAM5
Self-synchronization, no DC
MLT-3
Block Coding
We need redundancy to ensure synchronization and to provide some kind
inherent error detecting. Block
coding can give us this redundancy and improve the perfor-mance
line coding. In general, block coding
changes a block
m bits into a block
n bits, where n is larger than Block coding is referred to as an
mB/nB encoding technique.
replaces each
The slash in block encoding (for example, 4B/5B) distinguishes block encoding from multilevel
encoding (for example, 8B6T), which is written without a slash. Block coding normally involves three steps:
division, substitution, and combination. In the division step, a sequence bits is divided into groups m
bits. For example, in 4B/5B encoding, the original bit sequence is divided into 4-bit groups. The heart
block cod-ing is the substitution step. In this step, we substitute an m-bit group for an n-bit group. For
example, in 4B/5B encoding we substitute a 4-bit code for a 5-bit group. Finally, the n-bit groups are
combined together to form a stream. The new stream has more bits than the original bits. Figure 4.14 shows
the procedure.
4.14 Block coding concept
Division of a stream into m-bit groups
m bits
m bits
m bits
or 1s,
Scheme
substitu
11
n bits
Combining n-bit groups into a stream
n bits
n bits