PadhaikoAll subjects

Digital data, digital signal: RZ, NRZ, AMI, Manchester, differential…

Data Communication (ENCT 253)

Open in the Padhaiko app

4.4 Digital Data, Digital Signals: RZ, NRZ, AMI, Manchester, Differential Manchester, B8ZS, HDB3

Baseband transmission of digital data over guided media—such as twisted-pair copper wire, coaxial cables, and backplanes—requires converting binary data (s and s) into discrete-time electrical voltage pulses. This transformation is known as Line Coding (or digital-to-digital encoding).

Definition

Line Coding and Signal Element Parameters

Line Coding is the process of mapping a discrete binary sequence into a continuous-time, discrete-level baseband electrical signal suitable for physical channel transmission:

Performance Evaluation Criteria for Line Codes

Designing an optimal line code involves balancing several conflicting physical constraints:

  1. DC Component (Direct Current Bias): When a signal possesses a non-zero time-average voltage, it carries a DC component. Real-world communication channels frequently incorporate transformer coupling and AC-blocking capacitors for galvanic isolation and impedance matching. Signals containing a DC component cannot pass through AC-coupled links, causing severe waveform distortion, energy dissipation, and transformer core saturation. An ideal line code possesses zero DC component.
  2. Clock Synchronization (Self-Clocking Capability): The receiver must sample incoming pulses precisely at the center of each bit interval. If the transmitted signal remains at a constant unvarying voltage during long strings of consecutive 0s or 1s, the receiver's local clock drifts out of alignment, causing bit-drop errors. A self-clocking code contains guaranteed signal transitions within each bit interval, enabling receiver clock recovery directly from data transitions without a separate clock wire.
  3. Baseline Wander: The receiver evaluates incoming bits by comparing measured voltages against a decision threshold (baseline). When a signal with non-zero average voltage passes through high-pass filter elements, charge accumulates on capacitance, causing the baseline to wander up or down. Baseline wander degrades the effective noise margin and induces decision errors.
  4. Bandwidth and Spectral Efficiency: Codes that require multiple voltage transitions per bit (such as Manchester or RZ) occupy twice the transmission bandwidth of level-based codes (such as NRZ). Channels with limited cutoff frequencies require spectrally compact line codes.
  5. Built-in Error Detection: Line codes that incorporate structural constraints (such as alternating pulse polarity in Bipolar AMI) can detect physical-layer transmission errors immediately upon arrival without relying on higher-layer checksums.

Unipolar Line Coding

Definition

Unipolar Encoding

Unipolar encoding uses only one polarity of voltage (typically positive with respect to ground) alongside a zero-voltage state:

Limitations of Unipolar Encoding

  1. Severe DC Component: For an equiprobable random bit stream, the average voltage of Unipolar NRZ is . This substantial DC component wastes transmitter power and makes unipolar signals incompatible with AC-coupled media.
  2. Synchronization Failure: Long sequences of consecutive 0s (or 1s in NRZ) produce an unvarying flatline signal, depriving the receiver of transition edges needed to maintain clock phase lock.

Polar Line Coding

Polar line coding eliminates the high DC component of unipolar codes by using two symmetrical voltage levels of opposite polarity: positive () and negative ().

1. Polar NRZ-L (Non-Return to Zero, Level)

In Polar NRZ-L, the voltage level depends strictly on the state of the current bit:

(The inverted convention— for 1 and for 0—is equally valid provided transmitter and receiver agree).

Properties: Symmetrical voltages reduce the average DC component to zero if 0s and 1s occur with equal probability. However, continuous strings of identical bits still produce zero transitions, causing loss of synchronization.

2. Polar NRZ-I (Non-Return to Zero, Invert)

Polar NRZ-I is a differential encoding scheme where the presence or absence of a transition at the start of the bit interval defines the bit:

Advantage: Polar NRZ-I is immune to accidental polarity reversal (swapping the two wires of a twisted pair does not invert the received data). Furthermore, long sequences of 1s generate continuous transitions, maintaining clock synchronization. However, long strings of 0s still produce no transitions.

3. Polar RZ (Return to Zero)

To guarantee synchronization across all bit combinations, Polar RZ utilizes three discrete voltage levels (, , ) and mandates that every pulse returns to zero midway through the bit interval:

Trade-off: Every single bit contains a guaranteed transition to zero at , providing clock synchronization for arbitrary bit streams. However, because the pulse width is halved (), the required transmission bandwidth doubles (), and the receiver must discriminate between three voltage levels.

Biphase Line Coding (Manchester & Differential Manchester)

Biphase encoding represents the industry standard solution for self-clocking baseband local area networks (such as classic Ethernet and Token Ring).

Definition

Manchester Encoding (IEEE 802.3 Standard)

In Manchester encoding, an electrical transition occurs at the exact midpoint () of every bit interval. The midpoint transition serves simultaneously as a self-clocking synchronization strobe and as data representation:

Differential Manchester (IEEE 802.5 Token Ring)

In Differential Manchester, the inversion at the center of each bit interval is used strictly for receiver clock synchronization. Bit identity is determined by whether a transition occurs at the beginning of the bit interval:

Regardless of the bit value, a transition always occurs at the midpoint .

Key Advantage: Differential Manchester combines full self-clocking with polarity insensitivity; if the physical wire pair is inverted, the data decodes correctly without error.

Spectral Characteristics of Biphase Codes

Because every bit interval has at least one transition (and up to two transitions), biphase codes possess:

  1. Zero DC Component: Every bit spends exactly half its duration at and half at , ensuring that average voltage over any bit interval is identically zero:
  1. High Bandwidth Penalty: The signaling rate is doubled (), requiring twice the bandwidth of NRZ ().

Bipolar Line Coding (AMI & Pseudoternary)

Bipolar schemes utilize three signaling levels: positive (), negative (), and zero ().

Definition

Bipolar Alternate Mark Inversion (AMI)

In Bipolar AMI (Alternate Mark Inversion):

In Pseudoternary, the roles are reversed: binary 1 is represented by , while binary 0 alternates between and .

Engineering Advantages and Vulnerability of AMI

  1. Zero DC Component: Because successive binary 1s strictly alternate in sign, positive and negative pulses cancel out completely over time.
  2. Bandwidth Efficiency: Because pulses occupy the full bit duration and transition only between and , AMI occupies significantly narrower bandwidth than Manchester, with most energy concentrated around .
  3. Built-in Error Detection (Bipolar Violation): If channel noise introduces a spurious pulse or flips a sign, two pulses of the same polarity will arrive consecutively without an intervening opposite pulse. This breach of alternating polarity is called a Bipolar Violation and allows the receiver to detect single-bit physical-layer errors immediately.
  4. The Consecutive Zero Problem: When transmitting long sequences of binary 0s, the line remains at with zero transitions, causing receiver clock recovery to fail.

Scrambling Techniques: B8ZS and HDB3

To overcome the loss of synchronization caused by long strings of 0s in Bipolar AMI without sacrificing zero DC bias or increasing bandwidth, modern telecommunications networks employ Scrambling. Scrambling replaces predetermined sequences of consecutive 0s with specialized code patterns containing deliberate, identifiable bipolar violations.

1. B8ZS (Bipolar with 8-Zero Substitution)

Adopted across North America and Japan for T1 (DS1) carrier lines (), B8ZS replaces any sequence of eight consecutive zeros (00000000) with an 8-pulse substitution pattern based on the polarity of the preceding non-zero pulse:

2. HDB3 (High-Density Bipolar 3-Zero)

Adopted across Europe and internationally for E1 carrier lines (), HDB3 ensures that no more than three consecutive zeros ever appear on the transmission line. Any sequence of four consecutive zeros (0000) is replaced by a 4-pulse substitution pattern.

The substitution pattern depends on two conditions:

  1. The polarity of the preceding non-zero pulse ( or ).
  2. The count of non-zero pulses (bipolar 1s) transmitted since the last substitution (ODD or EVEN).
HDB3 Substitution Rules
Polarity of Preceding PulseNumber of 1s Since Last Substitution is ODDNumber of 1s Since Last Substitution is EVEN
Positive ()000+ ()-00- ()
Negative ()000- ()+00+ ()
Comparison of Line Coding Schemes
FeaturePolar NRZ-LPolar NRZ-IManchesterBipolar AMIB8ZS / HDB3
Voltage Levels2 ()2 ()2 ()3 ()3 ()
Signaling Rate ()
Bandwidth
DC ComponentLow / VariableLow / VariableZeroZeroZero
Sync on 0sLostLostPerfectLostPerfect
Sync on 1sLostPerfectPerfectPerfectPerfect
Error DetectionNoneNoneNoneInherent (violations)Inherent (scrambled)

Worked Examples

Example 4.8

4.8

Encode the binary data stream:

using the following line coding schemes:

  1. Polar NRZ-L (assuming bit 0 , bit 1 ).
  2. Polar NRZ-I (assuming signal level prior to this bit stream was ).
  3. Manchester (IEEE 802.3 standard: bit 0 , bit 1 ).
  4. Bipolar AMI (assuming the first bit 1 is encoded as a positive pulse ).

Present the signal level for each bit interval in a structured format.

Evaluating Polar NRZ-L: In Polar NRZ-L, each bit is directly mapped to its designated constant voltage level across the full interval :

  • Bit 1:
  • Bit 0:
  • Bit 0:
  • Bit 1:
  • Bit 0:
  • Bit 1:
  • Bit 1:
  • Bit 0:
  • Bit 0:
  • Bit 0:
  • Bit 1:

Evaluating Polar NRZ-I: In Polar NRZ-I, bit 1 causes an inversion from the previous level, while bit 0 maintains the current level (initial level ):

  • Bit 1: Inverts from .
  • Bit 0: No change .
  • Bit 0: No change .
  • Bit 1: Inverts from .
  • Bit 0: No change .
  • Bit 1: Inverts from .
  • Bit 1: Inverts from .
  • Bit 0: No change .
  • Bit 0: No change .
  • Bit 0: No change .
  • Bit 1: Inverts from .

Evaluating Manchester (IEEE 802.3): Each bit undergoes a transition at the midpoint :

  • Bit 1: Low-to-High ( for first half, for second half).
  • Bit 0: High-to-Low ( for first half, for second half).
  • Bit 0: High-to-Low ().
  • Bit 1: Low-to-High ().
  • Bit 0: High-to-Low ().
  • Bit 1: Low-to-High ().
  • Bit 1: Low-to-High ().
  • Bit 0: High-to-Low ().
  • Bit 0: High-to-Low ().
  • Bit 0: High-to-Low ().
  • Bit 1: Low-to-High ().

Evaluating Bipolar AMI: Bit 0 is always . Binary 1 pulses alternate in sign:

  • Bit 1: 1st 1 .
  • Bit 0: .
  • Bit 0: .
  • Bit 1: 2nd 1 .
  • Bit 0: .
  • Bit 1: 3rd 1 .
  • Bit 1: 4th 1 .
  • Bit 0: .
  • Bit 0: .
  • Bit 0: .
  • Bit 1: 5th 1 .
Answer:

Summary of encoded levels:

  • Polar NRZ-L: [-V, +V, +V, -V, +V, -V, -V, +V, +V, +V, -V]
  • Polar NRZ-I: [-V, -V, -V, +V, +V, -V, +V, +V, +V, +V, -V]
  • Manchester: [-/+, +/-, +/-, -/+, +/-, -/+, -/+, +/-, +/-, +/-, -/+]
  • Bipolar AMI: [+V, 0, 0, -V, 0, +V, -V, 0, 0, 0, +V]
Example 4.9

4.9

A B8ZS scrambler receives the following 14-bit data stream:

Assume the non-zero pulse preceding this bit stream was positive ().

  1. Show the encoded waveform sequence using B8ZS substitution.
  2. Identify the exact bit indices where intentional bipolar violations occur.
  3. Verify that the net DC bias introduced across the scrambled block is zero.

Tracing B8ZS Scrambling:

  • Preceding pulse prior to bit 1: .
  • Bit 1 is a binary 1. Following standard AMI alternation, bit 1 is encoded as a negative pulse ().
  • Next comes a run of eight consecutive zeros spanning positions 2 through 9 (00000000).
  • Because the preceding non-zero pulse (at bit 1) was negative (), the B8ZS substitution rule mandates:
  • Applying this pattern to bits 2 through 9:
    • Bit 2:
    • Bit 3:
    • Bit 4:
    • Bit 5:
    • Bit 6:
    • Bit 7:
    • Bit 8:
    • Bit 9:
  • Bits 10 and 11 are 00 encoded as .
  • Bit 12 is a binary 1. The last non-zero pulse was negative ( at bit 9). By AMI alternation, bit 12 is encoded as a positive pulse ().
  • Bits 13 and 14 are 00 encoded as .

Identifying Bipolar Violations:

  • Bit 5 is a negative pulse (). The preceding non-zero pulse was also negative ( at bit 1). Because two consecutive negative pulses occur without an intervening positive pulse, Bit 5 is an intentional Bipolar Violation ().
  • Bit 6 is a positive pulse (). This represents a valid bipolar alternation relative to bit 5 ().
  • Bit 8 is a positive pulse (). The preceding non-zero pulse was also positive ( at bit 6). Therefore, Bit 8 is an intentional Bipolar Violation ().
  • Bit 9 is a negative pulse (). This represents a valid bipolar alternation relative to bit 8 ().

Verifying DC Balance: Counting all non-zero pulses across the entire 14-bit stream:

  • Negative pulses: bit 1 (), bit 5 (), bit 9 (). Total negative count .
  • Positive pulses: bit 6 (), bit 8 (), bit 12 (). Total positive count .

The B8ZS substitution maintains exact DC balance.

Answer:

Encoded B8ZS sequence: [- 0 0 0 - + 0 + - 0 0 + 0 0]. Intentional bipolar violations occur at bit 5 and bit 8. Total positive pulses , total negative pulses , verifying zero net DC bias.

Example 4.10

4.10

A 100BASE-TX Fast Ethernet link transmits data at a bit rate of .

  1. Calculate the required baud rate and theoretical minimum Nyquist bandwidth if the data were transmitted using Manchester encoding.
  2. Calculate the required baud rate and minimum bandwidth if MLT-3 (a 3-level ternary line code with ) is used.
  3. Explain why modern Ethernet standards discarded Manchester encoding in favor of MLT-3 over Cat-5 twisted pair cable.

Calculating Manchester Signaling Metrics: In Manchester encoding, each bit interval contains two signal elements ():

The theoretical minimum Nyquist transmission bandwidth is:

Calculating Ternary / NRZ Metrics: For an encoding where each signal element conveys 1 bit ():

The minimum Nyquist transmission bandwidth is:

For MLT-3, cycling through four states () requires 4 transitions per cycle, reducing fundamental signal bandwidth even further to .

Analyzing Cable Limitations: Category 5 unshielded twisted pair (UTP) cable is certified for reliable transmission only up to a maximum analog bandwidth of . Manchester encoding operating at would require spectral bandwidth extending well beyond , exceeding the physical frequency limit of Cat-5 cable and causing severe attenuation, cross-talk, and electromagnetic radiation.

Answer:

Manchester: , . Ternary code: , . Manchester was discarded for Ethernet because its signaling exceeds the spectral bandwidth capacity of Cat-5 copper cable.

Exercises

Exercises

Question 1

Define line coding. List and explain the importance of three critical criteria used to evaluate line coding schemes: (1) DC component, (2) self-clocking synchronization, and (3) baseline wander.

Definition of Line Coding: Line coding is the conversion of digital binary data into a discrete-level, continuous-time electrical baseband pulse waveform suitable for transmission over physical transmission media.

Analysis of Key Evaluation Criteria:

  1. DC Component: The time-average voltage of the signal. If the DC component is non-zero, the signal cannot pass through AC-coupled transformers or capacitive isolation barriers, leading to severe pulse distortion and transformer saturation. Zero DC component is a vital design goal.
  2. Self-Clocking Synchronization: Receivers require regular signal transitions to extract and synchronize their sampling clocks. A line code that guarantees transitions regardless of the bit pattern (such as Manchester) prevents clock drift and bit-slip errors.
  3. Baseline Wander: In AC-coupled systems, a biased signal shifts the average reference voltage (the decision baseline). When the baseline wanders, the fixed decision threshold at the receiver causes erroneous bit detection.
Answer:

Line coding converts binary data into electrical pulses for baseband transmission. DC component causes transformer saturation and cannot pass AC-coupled links; self-clocking guarantees transition edges for receiver clock extraction; and baseline wander shifts the reference decision threshold, increasing bit errors.

Question 2

For the binary sequence 1 0 1 0 0 1 1 0 0 1:

  1. Encode using Polar NRZ-L (assuming bit 0 , bit 1 ).
  2. Encode using Polar NRZ-I (assuming initial signal level prior to first bit was ).
  3. Encode using Manchester (IEEE 802.3: bit 0 , bit 1 ).
  4. Encode using Bipolar AMI (assuming first bit 1 is positive ).

Evaluating Polar NRZ-L and NRZ-I:

  • Polar NRZ-L: Maps bits directly: Bit sequence: 1, 0, 1, 0, 0, 1, 1, 0, 0, 1 Output levels: [-V, +V, -V, +V, +V, -V, -V, +V, +V, -V]
  • Polar NRZ-I: Inverts on 1, holds on 0 (initial ):
    • Bit 1: inverts to
    • Bit 0: holds at
    • Bit 1: inverts to
    • Bit 0: holds at
    • Bit 0: holds at
    • Bit 1: inverts to
    • Bit 1: inverts to
    • Bit 0: holds at
    • Bit 0: holds at
    • Bit 1: inverts to Output levels: [-V, -V, +V, +V, +V, -V, +V, +V, +V, -V]

Evaluating Manchester and Bipolar AMI:

  • Manchester (IEEE 802.3):
    • Bit 1
    • Bit 0
    • Bit 1
    • Bit 0
    • Bit 0
    • Bit 1
    • Bit 1
    • Bit 0
    • Bit 0
    • Bit 1
  • Bipolar AMI: Bit 0 is ; bit 1 alternates sign: [+V, 0, -V, 0, 0, +V, -V, 0, 0, +V]
Answer:
  • Polar NRZ-L: [-V, +V, -V, +V, +V, -V, -V, +V, +V, -V]
  • Polar NRZ-I: [-V, -V, +V, +V, +V, -V, +V, +V, +V, -V]
  • Manchester: [-/+, +/-, -/+, +/-, +/-, -/+, -/+, +/-, +/-, -/+]
  • Bipolar AMI: [+V, 0, -V, 0, 0, +V, -V, 0, 0, +V]
Question 3

Explain how Bipolar AMI line coding functions. Explain what constitutes a Bipolar Violation and how this characteristic enables physical-layer transmission error detection without parity bits.

Functioning of Bipolar AMI: Bipolar Alternate Mark Inversion (AMI) uses three voltage levels (). Binary 0 is represented by zero volts (). Binary 1 pulses alternate in sign: the first 1 is positive (), the second is negative (), the third is positive (), and so forth.

Bipolar Violation and Physical Layer Error Detection: Under the AMI rule, every valid non-zero pulse must possess the opposite polarity of the preceding non-zero pulse. If channel noise flips a binary 0 into a pulse, or suppresses a pulse, two non-zero pulses of the same sign will arrive consecutively without an alternating opposite pulse in between (e.g., + ... + or - ... -). This condition is an AMI Bipolar Violation. The receiver hardware detects this violation immediately upon arrival, providing built-in physical-layer error detection without requiring higher-layer frame checksums or parity overhead.

Answer:

In Bipolar AMI, binary 0 is and binary 1 alternates between and . A Bipolar Violation occurs when two consecutive pulses of the same polarity are received. This rule violation allows the physical layer receiver to immediately detect transmission errors without added parity bits.

Question 4

Explain the B8ZS scrambling technique. Describe the substitution rule for eight consecutive zeros and encode the bit sequence 1 0 0 0 0 0 0 0 0 1, assuming the pulse preceding the first bit was negative ().

B8ZS Substitution Rule: B8ZS (Bipolar with 8-Zero Substitution) prevents loss of receiver synchronization on T1 carrier lines by replacing any string of eight consecutive zeros (00000000) with a pattern containing two intentional bipolar violations:

  • If previous non-zero pulse was positive (): replace with 000+-0-+
  • If previous non-zero pulse was negative () : replace with 000-+0+-

Encoding the Given Stream:

  • Previous pulse before bit 1 was negative ().
  • Bit 1 is a binary 1. Following AMI alternation, bit 1 is encoded as a positive pulse ().
  • Bits 2 through 9 are eight consecutive zeros (00000000).
  • Because the preceding non-zero pulse (at bit 1) was positive (), we apply the rule for :
  • Bit 10 is a binary 1. The preceding non-zero pulse was positive ( at position 8 of the substitution). By AMI alternation, bit 10 is encoded as a negative pulse ().
Answer:

The encoded B8ZS sequence is [+ 0 0 0 + - 0 - + -]. Intentional violations occur at the 4th and 7th zero positions (positions 5 and 8 of the sequence).

Question 5

Explain High-Density Bipolar 3-Zero (HDB3) scrambling. Detail why two different substitution patterns (000V and B00V) are used depending on whether the number of non-zero pulses since the last substitution is odd or even.

HDB3 Operating Principle: HDB3 replaces four consecutive zeros (0000) with a 4-pulse pattern that introduces an intentional bipolar violation at the 4th bit (). To prevent direct current bias from accumulating, the pattern chosen depends on the polarity of the last pulse and the parity (odd or even) of non-zero pulses transmitted since the last substitution.

Role of Odd vs. Even Substitution Patterns:

  1. Odd Count (000V): If an odd number of 1s has been transmitted since the last substitution, the sign of the signal has naturally alternated. Inserting violation pulse with the same sign as the previous pulse leaves the overall positive and negative pulse counts balanced.
  2. Even Count (B00V): If an even number of 1s has been transmitted, inserting only would result in two consecutive pulses of the same sign without an alternating balance, introducing DC drift. HDB3 therefore inserts a valid balancing pulse (opposite sign to preceding pulse) followed by two zeros and violation pulse (same sign as ). This guarantees that two opposite-polarity pulses are added, maintaining strict zero DC bias.
Answer:

HDB3 substitutes four consecutive zeros with 000V when the count of non-zero pulses since the last substitution is odd, and with B00V when the count is even. The B00V rule adds an initial balancing pulse of opposite polarity to cancel the violation pulse, preserving strict zero DC bias across the transmission link.

Question 6

A digital transmission link operates at . Compare Polar NRZ-L, Bipolar AMI, and Manchester encoding in terms of: (1) signaling baud rate , (2) minimum required Nyquist transmission bandwidth, (3) DC component characteristics, and (4) synchronization performance on long strings of zeros.

Calculating Baud Rate and Bandwidth:

  • Polar NRZ-L: Conveys (). Baud rate is . Minimum transmission bandwidth is .
  • Bipolar AMI: Conveys (). Baud rate is . Minimum transmission bandwidth is .
  • Manchester: Conveys (). Baud rate is . Minimum transmission bandwidth is (double the bandwidth of NRZ and AMI).

Comparing DC Component and Synchronization:

  • DC Component: Polar NRZ-L has a variable DC component depending on data statistics. Manchester has a guaranteed zero DC component. Bipolar AMI has a guaranteed zero DC component due to alternating pulse signs.
  • Synchronization on Long Zeros: Polar NRZ-L completely loses synchronization (constant voltage). Bipolar AMI completely loses synchronization (constant zero volts). Manchester maintains perfect synchronization due to guaranteed midpoint transitions.
Answer:

Polar NRZ-L: , , variable DC, loses sync on zeros. Bipolar AMI: , , zero DC, loses sync on zeros. Manchester: , , zero DC, perfect synchronization.

Past exam questions for Data Communication

← Digital data, analog signal: ASK, FSK, PSK, QPSK, QAMAccess introduction to multiplexing, application of multiplexing ·… →