Coding

Block Codes (mB/nB)

Redundant codes like 1b/2b or 3b/4b used in fiber optics to ensure DC balance and synchronization.

Introduction to Redundant Codes (mB/nB)

mB/nB codes are block line codes: a block of mm information bits is mapped to a block of nn code bits, where nn is greater than mm. The broader term block code also covers error-correcting codes. The mB/nB line-code mappings shape signals in high-speed transmission systems, including fiber-optic links.

These codes add bits, so they are not used for data compression. Their purpose is to give the stream transmission properties such as bounded runs of identical bits, DC balance, and synchronization. In fiber-optic links, a suitable code table limits long runs of zeros, which would produce no signal changes after subsequent line coding.

The Concept of Redundancy

Redundant codes add bits to the user data. These bits carry no new user information. Together with the mapping rules, they shape the signal used for transmission. The increase in bit count creates an overhead that can be calculated.

Measuring Redundancy

  • Bit Redundancy (rbr_b): This is the number of extra bits added for each mm-bit block of information.

    rb=n−m[bits]r_b = n - m \quad [\text{bits}]

  • Percentage Redundancy (r%r_{\%}): This expresses the overhead as a percentage of the original data size.

    r%=n−mm⋅100%r_{\%} = \frac{n - m}{m} \cdot 100\%

The Cost of Redundancy: Higher Symbol Rate

Adding bits means that the same amount of user information per second requires a higher symbol rate. With one bit per symbol, the of the coded signal (foutf_{\text{out}}) becomes higher than the bit rate of the original information (finf_{\text{in}}).

  • Output Bit Rate: fout=fin⋅nmf_{\text{out}} = f_{\text{in}} \cdot \frac{n}{m}
  • Output Bit Duration: Consequently, the duration of each code bit on the line (toutt_{\text{out}}) is shorter: tout=tin⋅mnt_{\text{out}} = t_{\text{in}} \cdot \frac{m}{n}

With the same pulse shape, the output signal typically occupies a wider channel bandwidth than the original binary stream.

Example 1: The 1b/2b Code

The 1b/2b code is a simple example where one information bit (m=1m=1) is encoded into a two-bit code word (n=2n=2). Several mappings are possible. The one shown provides DC balance:

Information WordCoded Word
001
110

Analysis

This code guarantees that every code word has one '0' and one '1', which ensures within each word. The redundancy is rb=2−1=1r_b = 2-1 = 1 bit, resulting in a percentage redundancy of r%=(1/1)⋅100%r_{\%} = (1/1) \cdot 100\%. With one bit per symbol, the line symbol rate doubles.

Example 2: The 3b/4b Code

The 3b/4b code has lower overhead. A block of three information bits (m=3m=3) is mapped to a four-bit code word (n=4n=4). There are 23=82^3 = 8 possible input words, so the table selects 8 of the 24=162^4 = 16 output words. The selection can limit consecutive zeros or ones.

Analysis

The bit redundancy is rb=4−3=1r_b = 4-3 = 1 bit. The percentage redundancy is r%=(1/3)⋅100%r_{\%} = (1/3) \cdot 100\%. The output bit rate is 4/34/3 times the input bit rate. With one bit per symbol, the symbol rate has the same ratio. The overhead is lower than for the 1b/2b code.

Related articles