Examples of 4B/45 and 8B/6T Data Encoding
4B5B Example
In order to send information using 4B5B encoding, the data byte to be sent is first broken into two nibbles. If the byte is 0E, the first nibble is 0 and the
second nibble is E. Next each nibble is remapped according to the 4B5B table. Hex 0 is remapped to the 4B5B code 11110. Hex E is remapped to the 4B5B code
11100.
In 100BASE-FX and 100BASE-TX, the 4B5B replacement happens at the PCS sublayer of the Physical layer. Information is then further encoded for transmission using
NRZI in 100BASE-FX at the PMA sublayer, and MLT-3 in 100BASE-TX at the PMD sublayer.
| 4B5B Encoding Table |
| Data (Hex) |
(Binary) |
4B5B Code |
| 0 |
0000 |
11110 |
| 1 |
0001 |
01001 |
| 2 |
0010 |
10100 |
| ... |
... |
... |
| D |
1101 |
11011 |
| E |
1110 |
11100 |
| F |
1111 |
11101 |
8B/6T Example
In order to send information using 8B6T encoding, the value of the data byte is compared to the values in the 8B6T table. Every possible byte has a unique 6T
code, a set of 6 tri-state symbols. Unlike 4B5B, 8B6T completely prepares the data for transmission; no further encoding is required.
100BASE-T4 is currently the only technology which uses 8B6T encoding. It performs 8B6T encoding at the PCS sublayer of the Physical layer. 100BASE-T4 then
demultiplexes the 6T codes onto three wire pairs.
| 8B6T Encoding Table |
| Data (Hex) |
(Binary) |
8B6T Code |
| 00 |
0000 0000 |
+-00+- |
| 01 |
0000 0001 |
0+-+-0 |
| .... |
.... .... |
...... |
| 0E |
0000 1110 |
-+0-0+ |
| .... |
.... .... |
...... |
| FE |
1111 1110 |
-+0+00 |
| FF |
1111 1111 |
+0-+00 |
|