Digital-to-Digital Conversion

 

📡 Digital-to-Digital Conversion

What is Digital-to-Digital Conversion?

Digital-to-digital conversion is the process of converting digital data into digital signals for transmission through a communication medium.

Computers store information as binary digits (0 and 1). Before transmitting these bits over a link, they must be represented using appropriate digital signal patterns.

For example, a computer wants to transmit the data:

1 0 1 1 0 0 1

The sender converts these bits into electrical or other digital signal levels. The receiver decodes the received signal to recover the original bits.


Digital-to-digital conversion is commonly discussed under three techniques:

  1. Line coding — always required to represent the bits as digital signals.

  2. Block coding — adds redundancy to help synchronization and error detection.

  3. Scrambling — modifies certain signal patterns to improve synchronization without increasing the number of transmitted bits.

Let's understand each technique.

1. Line Coding

Line coding is the process of converting a sequence of digital bits into a digital signal.

At the sender, an encoder converts bits into signal levels. At the receiver, a decoder reconstructs the original bits.

Different line-coding techniques use different voltage levels and transitions to represent 0 and 1.



Important terms

  • Bit rate (\(N\)): Number of bits transmitted per second, measured in bps.

  • Baud rate (\(S\)): Number of signal elements transmitted per second, measured in baud.

  • Bits per signal element (\(r\)): Number of bits represented by each signal element.

  • Signal levels (\(L\)): Number of distinct signal values used by the encoding scheme.

A useful relationship is:

\[ \text{Bit rate}=\text{Baud rate}\times r \]

For example, if each signal element represents 2 bits and the baud rate is 1000 baud, the bit rate is 2000 bps.

Types of line coding

Common line-coding schemes are grouped into three main categories.

1.1  Polar coding

Uses positive and negative voltage levels, sometimes with a zero level during transitions.

Examples: NRZ-L, NRZ-I, RZ, Manchester and Differential Manchester.

The main difference is how each scheme represents a bit and whether it uses transitions to help the receiver identify bit boundaries.

A. NRZ-L (Non-Return-to-Zero-Level)

Principle: The voltage level itself determines the bit value.

  • One voltage level represents 0.

  • The other voltage level represents 1.

  • The voltage remains constant throughout each bit interval; it does not return to zero between bits.

For illustration, we will use positive voltage for 0 and negative voltage for 1.



Advantages

  • Simple to implement.

  • Uses one signal element per bit.

Disadvantage

Long sequences of the same bit produce no transitions, making clock synchronization difficult. The average signal level can also become unbalanced.

B. NRZ-I (Non-Return-to-Zero-Invert)

Principle: The presence or absence of a voltage transition at the beginning of a bit interval determines the bit.

  • 1 → voltage transition (inversion).

  • 0 → no voltage transition.

Advantages

  • A long sequence of 1s produces regular transitions.

  • The receiver can decode based on changes rather than the absolute voltage level.

Disadvantage

A long sequence of 0s produces no transitions, which may cause synchronization problems.

Remember: NRZ-L looks at the voltage level; NRZ-I looks at whether the voltage changes.



C. RZ (Return-to-Zero)

Principle: The signal returns to zero voltage during every bit interval.

RZ uses three voltage levels:

  • Positive voltage (+V)

  • Negative voltage (−V)

  • Zero voltage (0)

For illustration, we use positive voltage followed by zero for 1, and negative voltage followed by zero for 0.

Advantages

  • Transitions within bit intervals help with synchronization.

  • The receiver can identify bit timing more easily than with a long, transition-free NRZ sequence.

Disadvantage

RZ requires more signal transitions and generally occupies greater bandwidth than NRZ.


D. Manchester Encoding

Principle: Every bit interval is divided into two halves, and the signal always changes voltage at the middle of the bit.

For this illustration, we use the convention:

  • 0 → high-to-low transition in the middle.

  • 1 → low-to-high transition in the middle.

Advantages

  • Every bit has a transition in the middle.

  • The receiver can use these transitions to synchronize its clock with the sender.

  • Long sequences of identical bits still have midpoint transitions.

Disadvantage

Manchester generally requires more bandwidth than NRZ because there is a transition in every bit interval.

Remember: The midpoint transition is the key feature of Manchester encoding.

E. Differential Manchester Encoding

Principle: There is always a transition in the middle of every bit, but the bit value is determined by whether a transition occurs at the beginning of the bit interval.

Accordingly:

  • 0 → a transition at the beginning.

  • 1 → no transition at the beginning.

  • Every bit → a transition in the middle.

Advantages

  • The midpoint transition provides synchronization.

  • Information is represented by transitions, rather than depending only on absolute voltage levels.

Disadvantage

It requires frequent signal transitions and generally needs more bandwidth than NRZ schemes.


Comparison of all five schemes

Feature

NRZ-L

NRZ-I

RZ

Manchester

Differential Manchester

How bits are represented

Voltage level

Transition or no transition

Positive/negative pulse returning to zero

Direction of midpoint transition

Transition at beginning or no transition

Midpoint transition

No

No

Signal returns to zero

Always

Always

Synchronization

Difficult for long identical bits

Long sequences of 0s are problematic

Improved

Good

Good

Voltage levels

Two

Two

Three

Two

Two

Bandwidth

Generally low

Generally low

Higher than NRZ

Higher than NRZ

Higher than NRZ

Note: The positive and negative voltage assignments for binary 0 and 1 can vary by convention.

Quick memory trick

  • NRZ-L: Look at the voltage level.

  • NRZ-I: Look for an inversion.

  • RZ: Signal returns to zero.

  • Manchester: Transition at the middle of every bit.

  • Differential Manchester: Middle transition always; check the beginning to determine the bit.



1.2. Bipolar coding

Uses three voltage levels: positive, zero and negative.

There are two main types:

A. Alternate Mark Inversion (AMI)

  • Binary 0 → Zero voltage.

  • Binary 1 → Alternating positive and negative voltages.

The voltage polarity of consecutive 1s alternates between positive and negative.

B. Pseudoternary

Pseudoternary reverses the roles of 0 and 1.

  • Binary 1 → Zero voltage.

  • Binary 0 → Alternating positive and negative voltages.

The nonzero voltage levels alternate for consecutive 0s.




Quick comparison

Feature

AMI

    Pseudoternary

Bit represented by zero voltage

    0

    1

Bit represented by alternating ±V

    1

    0

Number of voltage levels

    Three

    Three

Remember: AMI alternates the voltage for 1s, while pseudoternary alternates the voltage for 0s. Both use positive, negative and zero voltage levels.

1.3. Multilevel coding

Uses multiple signal levels to represent groups of bits, potentially reducing the number of signal elements needed.

Examples: 2B1Q and 8B6T.

Multilevel coding is a line-coding technique that uses multiple signal levels to represent groups of bits in each signal element. Its main goal is to increase the number of bits transmitted per baud and potentially reduce the required bandwidth.

How does it work?

In ordinary binary signaling, one signal element typically represents one bit. Multilevel coding uses more signal levels to represent multiple bits in one signal element.

For example, a four-level signal can represent four different patterns of 2 bits:

Bit pattern

Signal level

00

+1

01

+3

10

−1

11

−3

Thus, one signal element carries 2 bits.

Naming convention: \(mBnL\)

  • \(m\) = number of input data bits.

  • \(B\) = binary data.

  • \(n\) = number of output signal elements.

  • \(L\) = number of signal levels.

We uses letters to represent the number of levels: B for 2 levels, T for 3 levels and Q for 4 levels.

Examples

2B1Q — Two Binary, One Quaternary

Two input bits are encoded as one signal element with four possible levels.

Example: 2 bits → 1 signal element. Each signal element carries 2 bits.

8B6T — Eight Binary, Six Ternary

Eight input bits are encoded as six signal elements, each using one of three levels: positive, zero or negative.

There are \(2^8=256\) possible input patterns and \(3^6=729\) possible output patterns. The extra patterns provide redundancy that can help with synchronization and error detection.



Advantages and limitation

  • Advantage: More bits can be transmitted per signal element, potentially reducing the baud rate needed for a given bit rate.

  • Limitation: The receiver must distinguish between multiple signal levels, which can make detection more difficult.

Remember: Multilevel coding represents groups of bits using multiple signal levels to improve transmission efficiency

Key advantage: More bits can be carried per signal element, potentially reducing the required baud rate and bandwidth. However, the receiver must distinguish between more signal levels.

Comparison of Line Coding Schemes

Technique

Signal levels

How bits are represented

Main advantage

Main limitation

NRZ-L

Two: +V, −V

Voltage level determines the bit

Simple; low bandwidth

Long sequences of identical bits cause synchronization problems

NRZ-I

Two: +V, −V

Transition represents 1; no transition represents 0

Handles long sequences of 1s better than NRZ-L

Long sequences of 0s can cause synchronization problems

RZ

Three: +V, 0, −V

Signal returns to zero during each bit

Helps identify bit timing

Requires more bandwidth

Manchester

Two: +V, −V

Direction of the middle transition represents the bit

Good synchronization

Requires more bandwidth than NRZ

Differential Manchester

Two: +V, −V

Beginning transition or no transition represents the bit; middle transition is always present

Good synchronization; uses transitions to represent data

Requires more bandwidth than NRZ

AMI

Three: +V, 0, −V

0 is zero voltage; 1s alternate between +V and −V

Alternating pulses help avoid a DC component

Long sequences of 0s cause synchronization problems

Pseudoternary

Three: +V, 0, −V

1 is zero voltage; 0s alternate between +V and −V

Alternating pulses help avoid a DC component

Long sequences of 1s cause synchronization problems

2B1Q

Four levels

Two bits are represented by one signal element

Two bits per signal element

Receiver must distinguish four levels

8B6T

Three levels

Eight bits are encoded into six signal elements

Redundancy can help synchronization and error detection

Requires multilevel encoding and decoding

Difference Between Polar, Bipolar and Multilevel Coding

Feature

Polar Coding

Bipolar Coding

Multilevel Coding

Voltage levels

Positive and negative

Positive, negative and zero

Uses multiple signal levels

How bits are represented

Uses positive/negative voltage levels or transitions

One bit uses zero voltage; the other alternates between positive and negative

Encodes groups of bits using multiple signal levels

Examples

NRZ-L, NRZ-I, Manchester

AMI, Pseudoternary

2B1Q, 8B6T

Main advantage

Simple encoding

Helps reduce the DC component

Can transmit more bits per signal element

Limitation

Synchronization may be difficult with long sequences of identical bits

Long sequences without pulses can cause synchronization problems

More signal levels can make receiver detection more complex

Brief description

  • Polar coding: Uses positive and negative voltage levels to represent binary data. For example, NRZ-L represents 0 and 1 using different voltage levels.

  • Bipolar coding: Uses three voltage levels: positive, negative and zero. In AMI, 0 is represented by zero voltage, while consecutive 1s alternate between positive and negative voltages.

  • Multilevel coding: Uses multiple signal levels to encode groups of bits. For example, 2B1Q encodes 2 bits into 1 signal element using four possible signal levels.

Remember: Polar uses positive and negative levels; bipolar uses positive, negative and zero; multilevel coding aims to represent more bits per signal element using multiple signal levels.


2. Block Coding

Line coding determines how bits are represented by signals. Block coding adds extra bits to the original data to improve synchronization and provide some error-detection capability.

It converts a block of \(m\) bits into a block of \(n\) bits, where \(n>m\).

The three basic steps are:

  1. Division: Divide the original bit stream into groups of \(m\) bits.

  2. Substitution: Replace each group with a corresponding \(n\)-bit code.

  3. Combination: Join the resulting groups into a new bit stream.

Example: 4B/5B coding

In 4B/5B coding, every 4-bit group is replaced by a 5-bit group.

Original data

1101

4 bits

4B/5B encoder

Replace each 4-bit group with its assigned 5-bit code

Encoded output

Code of 5 bits

The exact code depends on the mapping table.

The added bit is redundancy. In the example, 4B/5B is used with NRZ-I to prevent more than three consecutive zeros in the encoded stream. This helps the receiver maintain synchronization.



8B/10B coding follows a similar principle, replacing each 8-bit data group with a 10-bit code. It provides better built-in error detection and synchronization capability than 4B/5B.The 8B/10B block coding is actually a combination of 5B/6B and 3B/4B encoding, as shown in Figure 7.25.



3. Scrambling

Scrambling modifies certain bit patterns during encoding to prevent long sequences of zero-level signals. Unlike block coding, it does not increase the number of bits transmitted.

Scrambling is useful with bipolar AMI coding, because long sequences of zeros produce no voltage transitions and can make synchronization difficult.

The following are the two common scrambling techniques:

  • B8ZS (Bipolar with 8-Zero Substitution): Replaces eight consecutive zeros with a special pattern containing bipolar violations. It is commonly used in North America.

  • HDB3 (High-Density Bipolar 3-Zero): Replaces four consecutive zeros with a pattern selected according to the number of nonzero pulses since the previous substitution. It is commonly used outside North America.

Both techniques introduce controlled transitions to help maintain synchronization without increasing the bit rate.

Comparison of the Three Techniques

Feature

Line coding

Block coding

Scrambling

Main purpose

Represent bits as digital signals

Add redundancy for synchronization and error detection

Prevent long sequences without transitions

Changes the signal representation?

Yes

Works with the bit stream before line coding

Yes, modifies selected signal patterns

Increases the number of bits?

Not necessarily

Yes

No

Examples

NRZ-L, NRZ-I, Manchester, AMI

4B/5B, 8B/10B

B8ZS, HDB3

Quick Summary

Line coding

Converts digital data into digital signals. Examples: NRZ-L, NRZ-I, Manchester and AMI.

Block coding

Adds redundant bits to improve synchronization and error detection. Examples: 4B/5B and 8B/10B.

Scrambling

Replaces selected patterns to improve synchronization without adding bits. Examples: B8ZS and HDB3.

Note: Digital-to-digital conversion has three techniques—line coding, block coding and scrambling. Line coding is always required, while block coding and scrambling may or may not be used, depending on the system requirements.

Comments

Popular posts from this blog

Computer Networks PCCST501 Semester 5 KTU CS 2024 Scheme - Dr Binu V P

Model Question Paper Computer Networks PCCST501 KTU 2024 Scheme and Answer Key

Introduction to Computer Networks