RF Wireless World

Browse articles, tutorials, tools, and vendors.

What is 4B/5B Encoding : Advantages and Disadvantages

4B/5B encoding is a data transmission scheme that converts every 4-bit data group into a 5-bit code to improve synchronization and reduce transmission errors. Advantages include reliable clock recovery and fewer long zero sequences, while disadvantages include bandwidth overhead and additional encoding complexity in communication systems.

There are various techniques available to represent digital data using digital signals, broadly categorized into:

  • Line coding
  • Block coding
  • Scrambling

4B/5B encoding falls under the block coding category. Another common technique is 8B/10B encoding. Block coding, in general, takes a block of “m bits” as input and produces a block of “n bits” as output, hence the naming convention mB/nB encoding.

4B/5B Encoding Procedure

Block coding consists of three primary steps: division, substitution, and combination. Let’s break down 4B/5B encoding to understand this process:

This encoding method produces more output bits than input bits.

  • Step 1: The input bit sequence is initially divided into groups of 4 bits.
  • Step 2: Each 4-bit group is then substituted with a 5-bit group, according to a predefined table (see below).
  • Step 3: Finally, these 5-bit groups are combined to form the output stream.

4B/5B encoding and decoding

The 4B/5B encoding technique is often used in conjunction with NRZ-I line coding. NRZ-I offers a better signal rate, about (1/2) of biphase, but it can suffer from synchronization problems. By incorporating 4B/5B before the NRZ-I encoder, as illustrated above, this synchronization issue is largely resolved.

The 4B/5B encoder ensures the NRZ-I encoder doesn’t receive long streams of zeros (‘0s’), which can cause synchronization loss. At the receiver end, the stream is first processed through an NRZ-I decoder, and then the redundant bits added by the 4B/5B encoder are removed using a 4B/5B decoder to recover the original data.

4B/5B encoding table

The table above illustrates the corresponding input and encoded output pairs. Out of the 32 possible combinations supported by 5 bits, only 16 are used for the 16 input groups. The remaining unused groups are reserved for control purposes, while some are simply not used at all.

The receiver is designed to detect these unused bit groups and treat them as potential errors in data transmission.

Advantages of 4B/5B Encoding

Here are the key benefits of 4B/5B encoding:

  1. It resolves the synchronization problems often encountered with NRZ-I.
  2. It offers a lower signal rate compared to Biphase encoding schemes.

Disadvantages of 4B/5B Encoding

Here are the drawbacks of 4B/5B encoding:

  1. It increases the signal rate compared to NRZ-I because the addition of redundant bits results in a 20% increase in baud rate.
  2. It does not eliminate DC components that may be present in NRZ-I signal waveforms. If DC components are unacceptable, Biphase or Bipolar encoding should be considered instead of 4B/5B.

Summary

4B/5B encoding improves synchronization and transmission reliability by converting 4-bit data into 5-bit symbols. Advantages include better clock recovery, while disadvantages include increased bandwidth usage.