Block Codes (mBnB)

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

Introduction to Redundant Codes (mBnB)

Redundant codes, often referred to as block codes or mBnB codes, are a special type of line code where a block of mm information bits is mapped to a block of nn code bits, where nn is always greater than mm. These codes are fundamental in high-speed data transmission, especially in fiber optic systems.

The primary goal of these codes is not data compression (as they add bits), but rather to imbue the data stream with desirable properties for reliable transmission. Fiber optic systems, being mostly synchronous and using unipolar signals (light ON/OFF), cannot tolerate long strings of zeros (no signal). Block codes solve this by ensuring good synchronization and eliminating harmful signal characteristics.

The Concept of Redundancy

Redundant codes work by adding extra bits to the original data. This added information isn't part of the user's message but allows the system to function more reliably. This comes at a cost, however, which can be precisely quantified.

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: Increased Baud Rate

Adding extra bits means that to send the same amount of user information per second, we must send symbols on the line faster. The of the coded signal (foutf_{\text{out}}) becomes higher than the bit rate of the original information (finf_{\text{in}}).

  • Output Frequency: 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}

This means that the output signal will require a wider channel bandwidth than the original binary data 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). While there are different mapping schemes, a common one used to guarantee DC balance is:

Information WordCoded Word
001
110

Analysis

This code guarantees that every code word has one '0' and one '1', which ensures perfect . 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\%. This doubles the required symbol rate on the transmission line.

Example 2: The 3b/4b Code

A more efficient example is the 3b/4b code, where a block of three information bits (m=3m=3) is mapped to a four-bit code word (n=4n=4). Since there are 23=82^3 = 8 possible input words, we only need to select 8 out of the 24=162^4 = 16 possible output words. The words are chosen to have good properties, such as a limited number of consecutive zeros or ones.

Analysis

The bit redundancy is rb=4−3=1r_b = 4-3 = 1 bit. However, the percentage redundancy is significantly lower: r%=(1/3)⋅100%r_{\%} = (1/3) \cdot 100\%. The output frequency (symbol rate) will be 4/34/3 times the input bit rate, making it much more spectrally efficient than the 1b/2b code.

Interactive Block Codes (mBnB)

Enter binary sequence (0s and 1s only)

Current Symbol: 1 → 10
+5V-5V0V110101001101
Encoded Output:
101001100110010110100110
Unipolar waveform for encoded output: 1 → +V, 0 → 0V

Redundancy

Bit redundancy:1
Percentage redundancy:100.00%

Rates

Input clock:1.25 Hz
Output clock:2.50 Hz
Output bit duration:400.00 ms
    Block Codes (mBnB) | Teleinf Edu