Digital Encoding

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

UCCN2043 Lecture Notes

6.0

Digital Encoding

In a digital communication system, the first step is to convert the information into a bit
stream of ones and zeros. This involved the following processes:
a) Analog to digital conversion (for analog information source)
b) Source coding
Before transmission, the bit stream has to be represented as:
electrical signal for copper-wire based medium
optical signal for optical fiber medium
electromagnetic wave for wireless
Depending on transmission type, the signal to be transmitted can be digital or analog. We
thus have the following scenario for digital communications:
Digital data, digital transmission signal
Digital data, analog transmission signal
When the term Digital communication is used, we actually mean the transmission of digital
data either through digital transmission signal or analog transmission signal.
Analog communication is beyond the scope of UCCN2043 and will not be discussed.
Transmission of digital data via analog transmission signal will be discussed in lesson 9 and
is usually called Digital modulation.
The following figures aid in the understanding of digital encoding and digital modulation.

Lesson 6 will focus in the transmission of digital data via digital transmission signal. In this
lesson, we will study the various representations of the bit stream as an electrical signal.
Page 1 of 11

UCCN2043 Lecture Notes


6.1

Requirements for Digital Encoding

Once the information is converted into a bit stream of ones and zeros, the next step is to
convert the bit stream into its electrical representation using digital encoding scheme.
Interpreting signals at receiver needs to know
 Timing of bits - when they start and end
 Signal levels
Factors affecting successful interpreting of incoming signals:
 Signal to noise ratio: increased SNR decreases error rate
 Data rate: increased data rate increases error rate
 Bandwidth: increased bandwidth allows increasing data rate
 Encoding schema
The electrical signal representation has to be chosen carefully. The following serves as the
evaluation factors for Data Encoding / Modulation schemes:
Signal Spectrum
 Lack of high frequencies reduces required bandwidth
 Lack of dc component is desirable, i.e. it should be avoided
 Concentrate power in the middle of the bandwidth
Clocking, i.e. synchronizing transmitter and receiver
 External clock
 Sync mechanism based on signal
o Some electrical representation helps in clocking to determine the
beginning and ending of each bit
Error detection
 Can be built into signal encoding
Signal interference and noise immunity
 Some codes (electrical representation ) are better than others
Cost and complexity
 Higher signal rate (& thus data rate) lead to higher costs
 Some codes require signal rate greater than data rate
A variety of encoding schemes have been proposed that address all these issues. In all
communication systems, the standards specify which encoding technique has to be used.
In this lesson, we discuss the most widely used encoding schemes. A good understanding of
these is very important as encoding/modulation is a one of the very crucial process in digital
communications.

Page 2 of 11

UCCN2043 Lecture Notes

6.2

Digital (Transmission) Signals & Encoding Schemes

Digital signal characteristics:


 Discrete, discontinuous voltage pulses
 Each pulse is a signal element
 Binary data encoded into signal elements
Numerous digital encoding schemas have been employed in practical communication
systems:
 Nonreturn to Zero-Level (NRZ-L)
NRZ techniques
 Nonreturn to Zero Inverted (NRZI)



Bipolar -AMI
Pseudoternary

Multilevel binary techniques




Manchester
Differential Manchester

Biphase techniques




B8ZS
HDB3

Scrambling

Categories of Encoding Schemes


Encoding schemes can be divided into the following categories:
Unipolar encoding
Polar encoding
Bipolar encoding
Unipolar encoding: In the unipolar encoding scheme, only one voltage level is used. Binary
1 is represented by positive voltage and binary 0 by an idle line. Because the signal will have
a DC component, this scheme cannot be used if the transmission medium is radio. This
encoding scheme does not work well in noisy conditions.
Polar encoding: In polar encoding, two voltage levels are used: a positive voltage level and a
negative voltage level. NRZ-I, NRZ-L, and Manchester encoding schemes, which we discuss
in the following sections, are examples of this encoding scheme.
Bipolar encoding: In bipolar encoding, three levels are used: a positive voltage, a negative
voltage, and 0 voltage. AMI and HDB3 encoding schemes are examples of this encoding
scheme.

Note: The encoding scheme to be used in a particular communication system is generally


standardized. You need to follow these standards when designing your system to
achieve interoperability with the systems designed by other manufacturers.

Page 3 of 11

UCCN2043 Lecture Notes


6.3

Non-Return To Zero Codes (NRZ)

NRZ are the simplest form of digital transmission, where the signal level remains constant for
the whole duration of one bit.
Bits are represented with constant levels, for the whole bit duration
No voltage for 0, constant positive voltage for 1 (unipolar)
In practice, negative voltage is assigned to 1
Various NRZ versions exist
Unipolar and bipolar
Absolute and differential
More often, bipolar version used (+ and pulses, zero voltage avoided).
Absolute NRZ is termed as NRZ-L whereas differential NRZ is termed NRZ-I.
NRZ encoding is used in slow speed communication interfaces (e.g. RS232) and storage
media (e.g. magnetic tapes)
Advantages
The simplest codes
Disadvantages
In its unipolar version a DC component occurs.
Impossible to distinguish between a long sequence of 0s and the absence of a
signal.
Difficult to keep the clocks of the source and receiver synchronized if there happen
to be long sequences of 1s or 0s. The receiver uses transitions in level to determine
clock cycle boundaries.
A Long series of 0s and 1s causes the average signal value, which is used to
distinguish between high and low values, to drift.
Thus for many reasons, it is desirable to have frequent transitions between the high and low
values.
Non-Return To Zero Level (NRZ-L)
In NRZ-L, binary 1 is represented by negative voltage and 0 by positive voltage. This scheme,
though simple, creates problems: if there is a synchronization problem, it is difficult for the
receiver to synchronize, and many bits are lost.
NRZ-L is used for short distances between terminal and modem or terminal and computer

Page 4 of 11

UCCN2043 Lecture Notes

Non-Return To Zero Invertive (NRZ-I)


NRZ-I is the differential version of NRZ. In the differential version, signal is encoded by
transitions rather than by levels (e.g. the occurrence of a bit of 1 causes a transition from
the previous voltage level).
Just as In NRZ-L, the voltage is constant during the bit interval.
Binary 1 is represented by the existence of a signal transition at the beginning of the bit
time (either a low-to-high or a high-to-low transition)
Binary 0 is represented by the maintenance of signal level at the beginning of the bit
time.
NRZ-I gets rid of the problems associated with long strings of 1s, but does nothing
about ;long strings of 0s.

Illustration:

NRZ-L encoding

NRZ-I encoding

Illustration: NRZ-L vs NRZ-I

Page 5 of 11

UCCN2043 Lecture Notes

6.4

Multilevel Binary Techniques

Multilevel Binary Techniques use three signal levels (0, +V and -V).
Two implementations of multilevel binary techniques will be discussed
 Bipolar Alternate Mark Inversion (Bipolar-AMI)
 Pseudo-ternary
Bipolar-AMI Encoding
 0 represented by no line signal
 1 represented by alternating positive or negative pulse
 No loss of synchronization if a long string of 1s (0s still a problem)
Pseudo-ternary Encoding
 1 represented by absence of line signal
 0 represented by alternating positive and negative pulse
 No loss of sync if a long string of 0s (1s still a problem)
No advantage or disadvantage if comparison is made between Bipolar-AMI and Pseudoternary encoding.
Illustration:

Multilevel Binary Techniques: Pros & Cons


Pros
 No loss of sync in case a long string of 1s (in Bipolar-AMI)
 Zero DC component by the nature of these codes
 Simple mechanism for error detection (two consecutive pulses of the same sign show
an error)
Cons:
 Synchronization issues for long runs of 0 (Bipolar-AMI) or of 1 (pseudo-ternary)
 Introduce some kind of redundancy: three levels to encode two bits
 Receiver must distinguish between three levels (+A, -A, 0)

Page 6 of 11

UCCN2043 Lecture Notes


6.5

Biphase Technique

Bi-phase codes address the main disadvantage of NRZ, i.e. the lack of transitions in case
of long runs of identical bits.
It is oftentimes sad that Manchester is made of a data signal and a clock signal, because
in a Manchester code a transition always occurs in the middle of the bit period (similar to
the transition exhibited by a clock signal).
Two implementations of Biphase techniques will be discussed
 Manchester
 Differential Manchester
Manchester Encoding
 Transition in middle of each bit period
 Low to high represents 1
 High to low represents 0
 Transition serves as clock and data
 Used by IEEE 802.3 (10Mbps Ethernet)
Illustration:

Differential Manchester Encoding


 Mid-bit transition is clocking only
 Transition at start of a bit period represents 0
 No transition at start of a bit period represents 1
 Note: this is a differential encoding scheme
 Used by IEEE 802.5 (Token ring)
Illustration:

Page 7 of 11

UCCN2043 Lecture Notes


Biphase Techniques: Pros & Cons
Pros
 Predictable transition at the middle of each bit, which can be used for synchronization
(self-clocking codes)
 Error detection possible due to the same feature
 No DC component
Cons:
 Bandwidth efficiency issues (half the bandwidth efficiency of NRZ)
Clearly, Manchester encoded signal has a larger number of transitions than NRZ or AMI
signals, thus line synchronization is easier.
But, in the same time, the larger number of transitions leads to high frequency components of
important energy, meaning that the spectral efficiency of the Manchester encoded signal is
lower.
Practically, Manchester coding is a good choice in those applications where the physical
available bandwidth guaranteed that the signal is not distorted by the transmission
environment.
In the 10Mbps l0BaseT Ethernet networks (letit be on coaxial or twisted pairs cable),
the bandwidth of the physical medium is large enough such as to allow Manchester
coding.
For 100 Mbps and higher Ethernet networks, the spectrum of a Manchester encoded
signal extends past the high frequency limit for unshielded twisted pair Ethernet cables.
Thus, other encoding schemes are used for high speed Ethernet.

6.6

Scrambling Techniques

Based on bipolar-AMI, but use scrambling to replace sequences that would produce
constant voltage
These filling sequences must:
 produce enough transitions to sync
 be recognized by receiver & replaced with original
 be same length as original
Design goals
 have no dc component
 have no long sequences of zero level line signal
 have no reduction in data rate
 give error detection capability

Page 8 of 11

UCCN2043 Lecture Notes


Two implementations of Scrambling techniques will be discussed
 B8ZS: Bipolar With 8 Zeros Substitution
 HDB3: High Density Bipolar 3 Zeros
Both B8ZS and HDB-3 may be seen as improved versions of AMI. They are generally used
in long-distance communications.
 B8ZS employed in 1.544 Mbps-T1,
 HDB-3 in 2.048 Mbps-E1
B8ZS
Bipolar With 8 Zeros Substitution
Rule: 8 consecutive zeros are NOT encoded with no signal for eight bit periods, a signal
which has 4 transitions being used instead
Whenever an all-zero octet occurs:
 encode as 0 0 0 + - 0 - + if last non-zero voltage pulse was positive
 encode as 0 0 0 - + 0 + - if the last non zero pulse was a negative
AMI code rules are broken twice by polarity violation: once inside of the eight-zeros
group, once between the first non-zero pulse preceding the group and its correspondent
within the group
Unlikely to occur as a result of noise
Receiver detects and interprets as octet of all zeros
Illustration:

Page 9 of 11

UCCN2043 Lecture Notes


HDB3
High-density Bipolar, order 3
Rule: 4 consecutive zeros are NOT encoded with no signal for four bit periods, but with a
signal which has at least one transition
When a group of four 0 (0000) occurs:
 encode as 000V if the number of bits of 1 after the last polarity violation is odd or if
this is the first occurrence of four 0
 encode as B00V if the number of bits of 1 after the last polarity violation is even or
zero
 V stands for violation bit and has to be the same polarity as the previous mark
 B is a stuffing bit and is of opposite polarity to the previous mark
* In other words: String of four zeros replaced according to the following:
(Violation)
(000V)

(B00V)

Special notes:
 If the violation bit and the immediate AMI bits polarity is similar then change the
polarity of all AMI bits at the right hand side of the violation bit to their opposite
polarity, keep this repeating for violation bits which satisfy the rule.
 As soon a 4 consecutive zeros is found convert it and proceed, because you have to
count + and for the next 4 consecutive zeros including the + and on the last 4
consecutive zeros which you finished converting.
This rule targets the elimination of the DC component (the polarity violation always
changes its sign)

Example 1of HDB3 encoding:


The pattern of bits
encoding using AMI is
encoded in HDB3 is
which is

10000110
+0000-+0
+000V-+0
+000+-+0

Example 2 of HDB3 encoding:


The pattern of bits
encoding using AMI is
encoded in HDB3 is
which is

1010000011000011000000
+0-00000+-0000+-000000
+0-000V0+-B00V+-B00V00
+0-000-0+-+00+-+-00-00

Page 10 of 11

UCCN2043 Lecture Notes


Illustration:

Scrambling techniques pros and cons


Pros:
 Classical drawbacks of AMI are eliminated
 No redundancy, therefore the same rate is maintained
 Error detection capabilities
o E.g.: when in HDB3 two consecutive polarity violations have the same sign,
this could be only caused by a transmission error.
 Good spectral efficiency
Cons:
 Extra-processing needed at transmitter and, especially at receiver side

Page 11 of 11

You might also like