# 8b10b code

The 8b10b code (also 8b / 10b code ) is a line code in telecommunications technology developed in 1983 by Albert Xavier Widmer and Peter Franaszek . 8 information bits are coded by 10 line bits . Complete DC voltage equalization is guaranteed, and the clock rate and the data word limits can also be easily recovered. The bit rate increases by 25 percent. A similarly structured code is the 16b18b code (also Albert Xavier Widmer) with only 12.5 percent overhead.

Other, significantly more efficient codes are the 64b66b code with 3 percent overhead , which maps 64 bits to 66 bits, and the 128b130b code with only 1.5 percent overhead. However, these codes only guarantee properties (such as freedom from DC voltage, repetition rate of the same level, data word limit recognition) only on a statistical average.

## properties

The 8b10b code uses a ten-bit long code word to transmit one octet . The following properties are met:

### DC voltage equalization

The number of ones per code word differs by a maximum of two from the number of zeros. This gives three types of codewords:

• 252 neutrals (neutral disparity): same number of "1" and "0", so five times "1" and five times "0"
• 210 positive (positive disparity): six times "1" and four times "0"
• 210 negative (negative disparity): four times "1" and six times "0"

In a data stream, “1” and “0” occur with the same probability. If a “1” is now transmitted as a positive voltage + U and a “0” as a negative voltage −U, the coded signal (at a given data rate) has a lower limit frequency, i.e. In other words, the voltage is averaged out over a longer bit sequence so that the signal does not contain any DC voltage component. This DC voltage equalization allows, for example, a capacitive or inductive coupling of transmitter and receiver.

### Maximum number of identical line bits in a row

In the case of pure data transmission , the design of the coding limits the maximum number (maximum run length) of consecutive identical line bits ( symbols ) to five; H. A level change occurs after five clock cycles at the latest.

There are three control words (they do not represent user data), in which there is intentionally no level change (called commas) for six clock cycles at a certain point within the ten line bits per data word. This enables easy recovery of the data word boundaries. The clock recovery itself has very low requirements due to the frequent level changes.

### Disparity

In addition to the data word to be coded (D.00.0 to D31.7 for regular data words 0… 255, Kxx.y for twelve other possible control words), the 8b10b encoder also has the previous disparity as input variable. The ten line bits and the following disparity, which is required for coding the following data word, are calculated from this.

forward-
gone
disparity
Disparity of the code word
(following disparity)
−1 ± 0 +1
−1 No
×
Yes
→ (−1)
Yes
↗ (+1)
+1 Yes
↘ (−1)
Yes
→ (+1)
No
×

It is ensured that the disparity can only assume the values ​​−1 and +1.

In the simplest case, coding can be done using a read-only memory 1024 × 11 bits: 10 bits (eight data bits, data word / control word switchover, previous parity) → 11 bits (ten channel bits, subsequent parity). However, the code is structured in such a way that the coding can be broken down into two significantly smaller tables (128 × 7 bit and 32 × 5 bit) and a little additional logic.

### K words

In addition to 256 possible data words, twelve possible control words can be transmitted. These control words are called K words. They are necessary for control functions in higher-level protocol layers. Three of these K-words have a bit pattern that cannot arise across code word boundaries. This means that the last bits of a code word together with the first bit of a subsequent code word can never result in the bit pattern of one of these three special K-words. This is used in serial data streams to recognize the beginning and the end of a code word. These three special K-words are also called comma words.

### Error detection

Since not all of the 1024 combinations that can be represented with ten bits are used and strict selection rules must also be observed, individual bit errors can be detected with a certain probability (approx. 75 percent). However, valid incorrect data words can also arise. Additional checksums or forward error correction are therefore required for secure transmissions.

## Applications

The 8b10b code may find a. Use in the following transmission standards:

The high times of the 8b10b code were the years 2007 to 2013. In new developments, these have given way to the scambling codes (64b66b to 512b514b) and their successors (integrated error correction, multi-level coding ).