Digital Encoding
Digital Encoding
Digital Encoding
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
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
6.2
Bipolar -AMI
Pseudoternary
Manchester
Differential Manchester
Biphase techniques
B8ZS
HDB3
Scrambling
Page 3 of 11
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
Illustration:
NRZ-L encoding
NRZ-I encoding
Page 5 of 11
6.4
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:
Page 6 of 11
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:
Page 7 of 11
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
Page 9 of 11
(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)
10000110
+0000-+0
+000V-+0
+000+-+0
1010000011000011000000
+0-00000+-0000+-000000
+0-000V0+-B00V+-B00V00
+0-000-0+-+00+-+-00-00
Page 10 of 11
Page 11 of 11