4B5B
In telecommunication, 4B5B is a form of data communications line code. 4B5B works by mapping groups of four onto groups of 5 bits. Since there are 32 possible combinations of 5 bits and only 16 combinations of 4 bits the 16 groups of 5 bits with the most transitions in are used in order to provide as many transitions as possible. This is done as the transitions provide clocking information for the signal. Despite this 4B5B does not guarantee at least one transition for each bit period, however there are enough transistions to allow the clock signal to be recovered. The use of only 16 of the possible 32 groups of 5 bits means that 4B5B allows some errors to be detected as the error may change the group of 5 bits into one of the 16 unused and thus invalid combinations. Unfortunately the use of 5 bits to represent 4 bits does mean that the bandwidth needed to transmitted the data is increased by 25%. 4B5B is used in 100BASE-TX standard defined by IEEE 802.3u in 1995.
An example of mapping can be the following:
| 4bits-Block | Coding |
|---|
| 0000 | 11110 |
| 0001 | 01001 |
| 0010 | 10100 |
| 0011 | 10101 |
| 0100 | 01010 |
| 0101 | 01011 |
| 0110 | 01110 |
| 0111 | 01111 |
| 1000 | 10010 |
| 1001 | 10011 |
| 1010 | 10110 |
| 1011 | 10111 |
| 1100 | 11010 |
| 1101 | 11011 |
| 1110 | 11100 |
| 1111 | 11101 |