Next Generation SONET/SDH

Chapter 3.5 - 8B/10B Block Coding Overview

3.5   8B/10B BLOCK CODING OVERVIEW

When 8-bit data are generated in a serial string, there is no assurance that the string
will not contain a long sequence of zeros or ones. In fact, it is desirable that there be
a balance of zeros and ones in the bit sequence. There are several methods to remove
the imbalance of zeros or ones. One successful method is to regard the 8-bit
octets as a block and convert it to a 10-bit block. In the following, we demonstrate a
simpler coding case—the 3B/4B.

3.5.1   Example: 3B/4B Block Coding


This coding is easily demonstrated if one considers 3-bit codes to be converted to 4-
bit codes. 3-bit codes provide eight combinations: 000, 001, 010, 011, 100, 101,
110, and 111. Similarly, 4-bit codes provide 16 combinations. Thus, one can pick
codes out of the 16 with a balanced density of ones and zeros, such as 0011, 0101,
0110, 1001, 1010, 1100. Including the 0000 and the 1111 as two extreme cases,
then a one-to-one association between the eight 3-bit codes and the eight selected 4-
bit codes can be made. However, this association is not unique, unless an algorithmic
methodology is developed. Such a methodology is as follows:

  1. Count the number of ones in the 3-bit code.
    If odd, then add a “1” to the right of the least significant bit (LSB)
    If even, then add a “0” to the right of the LSB

With this method, a 010 becomes 0101, and so on:

 

In this simple example, one still has the presence of the two unbalanced codes: 0000
and 1111. To eliminate them, one has to develop complex rules that must also consider
the previous states. Then, based on such rules, 0000 and 1111 are replaced by
one of the balanced codes. A very simple rule would be to accept a mild imbalance
and replace 0000 and 1111 by the lesser unbalanced codes 0010 and 1101, respectively.
Since the probability of occurrence is the same (1/8) for each code and since
the two together provide a balanced density of ones and zeros, over the long run, the
balance of ones and zeros is maintained. In this case, some of the eight unused 4-bit
codes—0000, 0001, 0100, 0111, 1000, 1011, 1110, 1111—can be utilized as special
characters. Such characters could be used as idlers to fill interpacket time, or as
characters with special significance (in- or out-of-band signaling).

Having demonstrated the simple case of 3B/4B, we provide a brief overview of
the 8B/10B block coding, which is used in several data protocols.

The initial 8-bit octets represent 28 binary combinations. Clearly, among them
are combinations with very few ones, such as 0000 0001 and 0100 000, and combinations
with many ones, such as 1111 1111 and 1011 1111. This means that if 8-bit
codes were to be transmitted as they were generated, then there is no warranty of a
balanced density of ones and zeros to maintain a DC average value. The DC value
is required to keep the receiving clock running within the expected accuracy and jitter
tolerance. For example, consider a possible string of 8-bit characters:

 1000 0000 0000 0000 0000 0000 0000 0001 . . .

Clearly, this string has too many zeros. Such 8-bit binary codes would appear in
delimiters, in control characters and in data, thus creating ambiguity at the receiver.
If one considers 10-bit characters, then there are 210 (1024) binary combinations.
Now, from them one may select a subset of only 28 (256) binary codes, each
having a balanced number of ones and zeros. Then, according to a prescribed al-
gorithm, each 8-bit data is replaced by a uniquely corresponding 10-bit code.
Thus, the constructed string of 10-bit characters will always maintain the desired
density of ones. Moreover, some of the remaining 10-bit codes can be used as delimiters
and special control characters so that they will never appear in the overhead
or data field of a packet (unless there are errored bits). This describes, in a
nutshell, the 8B/10B coding and its benefits. On the negative side, the conversion
from 8-bit to 10-bit implies that 25% more bits are introduced and, therefore, the
bit rate on the transmission medium must be accordingly increased. This represents
a 25% bandwidth overhead. Similarly, the selected subset of 10-bit words
and their one-to-one association with 8-bit octets is not unique. Therefore, for
compatibility and interoperability purposes, the 8B/10B conversion process is defined
by standards.

The 8-bit codes spanning from 0x00 to 0xFF (a total of 256) are coded as D0.0 to
D31.7. For example, binary codes from 0x00 to 0x1F are coded as D0.0 to D31.0,
those from 0x20 to 0x3F are coded as D0.1 to D31.1, and so on.

However, the conversion of each 8-bit binary code to a specific 10-bit code
(known as abcdei fghj) depends on the number of ones in the abcdei and fghj subblocks
of the previous states and it is determined according to complex rules. Based
on block-coding theory (based on which these rules are generated), there are 12 special
code groups, of which only six are employed in GbE. The full description of the
8B/10B conversion is beyond our purposes and the interested reader may consult
the GbE standards.

 

UNLIMITED FREE
ACCESS
TO THE WORLD'S BEST IDEAS

SUBMIT
Already a GlobalSpec user? Log in.

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.

Customize Your GlobalSpec Experience

Category: Fiber Optic Couplers
Finish!
Privacy Policy

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.