Digital Communications

4B5B

4B5B (Four-Bit to Five-Bit) is a foundational digital line-coding scheme utilized in early fiber-optic (FDDI) and fast Ethernet (100BASE-TX) telecommunications networks. In digital RF and optical networking, if a computer transmits a massive string of continuous 'zeros' (0000000), the receiving clock loses synchronization and the link collapses. The 4B5B algorithm intercepts the data at the hardware level, mathematically mapping every 4-bit chunk of real payload data into a highly specific 5-bit code. This ensures that no matter what the user is downloading, the physical laser or copper wire will never experience more than three consecutive zeros, guaranteeing flawless clock recovery at the receiver.
Category: Digital Communications

Understanding 4B5B Encoding

In telecommunications, transmitting data is easy. Timing the data is incredibly difficult.

When your computer sends data down an Ethernet cable, it doesn't send a separate 'clock' wire to tell the receiving computer when to listen. The receiver must use a highly advanced microchip (Clock and Data Recovery, or CDR) to mathematically 'guess' the timing just by watching the '1s' and '0s' arrive.

The Catastrophe of Zeros

If the digital signal flashes '1 0 1 0 1 0', the receiver's clock easily locks onto the rhythm.

However, if the user downloads a file that accidentally contains a massive string of exactly fifty zeros ('00000000...'), the electrical voltage on the wire flatlines. The receiver's clock loses its rhythm, drifts out of sync, and the network connection violently crashes.

The solution is 4B5B encoding.

The 25% Overhead Tax

The 4B5B microchip physically prevents the flatline from ever happening.

  1. The chip grabs exactly 4 bits of raw payload data from the computer.
  2. It looks up that 4-bit chunk in a hard-coded mathematical dictionary and replaces it with a completely different 5-bit code.
  3. The Magic Rule: The dictionary is specifically engineered so that no 5-bit code ever contains more than three zeros in a row.

By forcing the signal to constantly transition between 1s and 0s, the receiver's clock never loses sync. The brutal trade-off is a massive 25% loss in physical speed. To transmit 100 Megabits of actual payload data (100BASE-TX Ethernet), the hardware must physically pulse the copper wire at 125 Megabits per second to accommodate the extra invisible parity bits.

Key Equations

4B5B:
4B5B (Four-Bit to Five-Bit) is a foundational digital line-coding scheme utilized in early fiber-optic (FDDI) and fast Ethernet (100BASE-TX) telecommunications networks. In digital RF and...

Key specifications:
25 % | 4 bits | 100 M | 125 M | 0 dB

Power: P(dBm) = 10log(PmW), 0dBm = 1mW

Comparison

Aspect4B5B SpecTypical RangeImpactDesign Note
Primary function4B5B (Four-Bit to Five-Bit) is a foundat...Application-dep.CriticalVerify in sim
Operating rangeIn digital RF and optical networking, if...Application-dep.CriticalVerify in sim
PerformanceThe 4B5B algorithm intercepts the data a...Application-dep.CriticalVerify in sim
IntegrationUnderstanding 4B5B Encoding In telecommu...Application-dep.CriticalVerify in sim
Trade-offTiming the data is incredibly difficult...Application-dep.CriticalVerify in sim
Common Questions

Frequently Asked Questions

Is 4B5B still used today?

Not for high-speed networks. The 25% physical speed penalty is mathematically devastating for Gigabit networks. When the industry moved to 1000BASE-T (Gigabit Ethernet), they abandoned 4B5B and adopted the vastly superior 8B/10B and 64B/66B encoding algorithms, which achieve the exact same clock synchronization but waste significantly less physical bandwidth.

Does 4B5B use NRZI?

Yes, they are almost always paired together. 4B5B scrambles the data to ensure there are no long strings of zeros. The NRZI (Non-Return-to-Zero Inverted) hardware then converts those bits into actual physical electrical voltage changes on the copper wire. The combination of the two guarantees the wire is constantly fluctuating, keeping the clock perfectly locked.

What happens to the 'extra' 5-bit codes?

A 4-bit chunk has exactly 16 possible combinations ($2^4$). A 5-bit chunk has 32 possible combinations ($2^5$). 4B5B only needs 16 codes for the data, leaving 16 extra codes completely unused. The engineers brilliantly repurposed these leftover codes as 'Control Characters.' The network uses these invisible codes to secretly tell the router when a data packet starts, when it ends, or to trigger a hardware error alarm.

RF Engineering Resources

Explore the Full Glossary

Browse thousands of RF engineering definitions, from fundamental concepts to advanced techniques.

View RF Glossary