4B5B
From Wikipedia, the free encyclopedia
In telecommunication, 4B5B is a form of data communications line code. 4B5B works by mapping groups of four bits onto groups of 5 bits. This is done as the transitions provide clocking information for the signal. For example, a run of 4 bits such as 0000 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 one transition 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. To counter this effect, 4B/5B modules are normally paired with a previous stage that scramble the data in such way that the total bandwidth required for transmission is notably reduced. 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 is used in the following standards:
- 100BASE-TX standard defined by IEEE 802.3u in 1995.
- AES10-2003 MADI[1] (Multichannel Audio Digital Interface)
[edit] An example of mapping can be the following:
Name | 4b | 5b | Description |
---|---|---|---|
0 | 0000 | 11110 | hex data 0 |
1 | 0001 | 01001 | hex data 1 |
2 | 0010 | 10100 | hex data 2 |
3 | 0011 | 10101 | hex data 3 |
4 | 0100 | 01010 | hex data 4 |
5 | 0101 | 01011 | hex data 5 |
6 | 0110 | 01110 | hex data 6 |
7 | 0111 | 01111 | hex data 7 |
8 | 1000 | 10010 | hex data 8 |
9 | 1001 | 10011 | hex data 9 |
A | 1010 | 10110 | hex data A |
B | 1011 | 10111 | hex data B |
C | 1100 | 11010 | hex data C |
D | 1101 | 11011 | hex data D |
E | 1110 | 11100 | hex data E |
F | 1111 | 11101 | hex data F |
I | -NONE- | 11111 | Idle |
J | -NONE- | 11000 | SSD #1 |
K | -NONE- | 10001 | SSD #2 |
T | -NONE- | 01101 | ESD #1 |
R | -NONE- | 00111 | ESD #2 |
H | -NONE- | 00100 | Halt |
SSD= Start of Stream Delimiter (100BASE-TX Ethernet)
ESD= End of Stream Delimiter (100BASE-TX Ethernet)
[edit] The following character sets are sometimes referred to as command characters:
Control Character | 5b symbols | Purpose |
---|---|---|
JK | 11000 10001 | Sync, SSD |
II | 11111 11111 | Not Used |
TT | 01101 01101 | Not Used |
TS | 01101 11001 | Not Used |
IH | 11111 00100 | SAL |
TR | 01101 00111 | ESD |
SR | 11001 00111 | Not Used |
SS | 11001 11001 | Not Used |
HH | 00100 00100 | HDLC0 |
HI | 00100 11111 | HDLC1 |
HQ | 00100 00000 | HDLC2 |
RR | 00111 00111 | HDLC3 |
RS | 00111 11001 | HDLC4 |
QH | 00000 00100 | HDLC5 |
QI | 00000 11111 | HDLC6 |
00000 00000 | HDLC7 |
(HDLC = High-Level Data Link Control)