|This article does not cite any sources. (March 2009) (Learn how and when to remove this template message)|
In telecommunication, 4B5B is a form of data communications Block Coding. 4B5B maps groups of 4 bits onto groups of 5 bits, with a minimum density of 1 bits in the output. When NRZI-encoded, the 1 bits provide necessary clock transitions for the receiver. For example, a run of 4 bits such as 00002 contains no transitions and that causes clocking problems for the receiver. 4B/5B solves this problem by assigning each block of 4 consecutive bits an equivalent word of 5 bits. These 5 bit words are pre-determined in a dictionary and they are chosen to ensure that there will be at least two transitions per block of bits.
A collateral effect of the code is that more bits are needed to send the same information than with 4 bits. An alternate to using 4B5B coding is to use a scrambler. Depending on the standard or specification of interest, there may be several 4b5b characters left unused. The presence of any of the "unused" characters in the data stream can be used as an indication that there is a fault somewhere in the link. Therefore, the unused characters can actually be used to detect errors in the data stream.
4B5B was popularized by fiber distributed data interface (FDDI) in the mid-1980s, and was later adopted by
- 100BASE-TX standard defined by IEEE 802.3u in 1995 and
- AES10-2003 Multichannel Audio Digital Interface (MADI) .
The name 4B5B is generally taken to mean the FDDI version. Other 4-to-5-bit codes have been used for magnetic recording and are known as group code recording (GCR).
The 4B5B encoding is also used for USB Power Delivery communication on CC pin, over BMC protocol.
4B5B encoding table
The following character sets are sometimes referred to as command characters.
|Control character||5b symbols||Purpose|
|JK||11000 10001||Sync, Start delimiter|
|II||11111 11111||Not used|
|TT||01101 01101||FDDI end delimiter|
|TS||01101 11001||Not used|
|TR||01101 00111||100BASE-TX end delimiter|
|SR||11001 00111||Not used|
|SS||11001 11001||Not used|
(HDLC = High-Level Data Link Control)