To install click the Add extension button. That's it.

The source code for the WIKI 2 extension is being checked by specialists of the Mozilla Foundation, Google, and Apple. You could also do it yourself at any point in time.

Kelly Slayton
Congratulations on this excellent venture… what a great idea!
Alexander Grigorievskiy
I use WIKI 2 every day and almost forgot how the original Wikipedia looks like.
Live Statistics
English Articles
Improved in 24 Hours
Added in 24 Hours
Show all languages
What we do. Every page goes through several hundred of perfecting techniques; in live mode. Quite the same Wikipedia. Just better.

From Wikipedia, the free encyclopedia

In telecommunication, 4B5B is a form of data communications line code. 4B5B maps groups of 4 bits of data onto groups of 5 bits for transmission. These 5-bit words are pre-determined in a dictionary and they are chosen to ensure that there will be sufficient transitions in the line state to produce a self-clocking signal. A collateral effect of the code is that 25% more bits are needed to send the same information.

An alternative to using 4B5B coding is to use a scrambler. Some systems use scramblers in conjunction with 4B5B coding to assure DC balance and improve electromagnetic compatibility.

Depending on the standard or specification of interest, there may be several 5-bit output codes left unused. The presence of any of the unused codes in the data stream can be used as an indication that there is a fault somewhere in the link. Therefore, the unused codes can be used to detect errors in the data stream.


4B5B was popularized by fiber distributed data interface (FDDI) in the mid-1980s. It was adopted for digital audio transmission by MADI in 1989.[1] and by Fast Ethernet in 1995.

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 coded recording (GCR), but those are (0,2) run-length limited codes, with at most two consecutive zeros. 4B5B allows up to three consecutive zeros (a (0,3) RLL code), providing a greater variety of control codes.

On optical fiber, the 4B5B output is NRZI-encoded. FDDI over copper (CDDI) uses MLT-3 encoding instead, as does 100BASE-TX.

The 4B5B encoding is also used for USB Power Delivery communication,[2] where it is sent over the USB-C CC pin (further encoded using biphase mark code) or the USB-A/B power lines (further encoded using frequency-shift keying).


4B5B codes are designed to produce at least two transitions per 5 bits of output code regardless of input data. When NRZI-encoded, the transitions 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. 4B5B solves this problem by assigning the 4-bit block a 5-bit code, in this case, 111102.

Encoding table

Data 4B5B code
(Hex) (Binary)
0 0000 11110
1 0001 01001
2 0010 10100
3 0011 10101
4 0100 01010
5 0101 01011
6 0110 01110
7 0111 01111
Data 4B5B code
(Hex) (Binary)
8 1000 10010
9 1001 10011
A 1010 10110
B 1011 10111
C 1100 11010
D 1101 11011
E 1110 11100
F 1111 11101
Symbol 4B5B code Description
H 00100 Halt
I 11111 Idle
J 11000 Start #1
K 10001 Start #2
L 00110 Start #3
Q 00000 Quiet (loss of signal)
R 00111 Reset
S 11001 Set
T 01101 End (terminate)

Three consecutive zero bits only appear in normal data when a code ending with two 0 bits (2, E) is followed by a code beginning with a 0 bit (1, 4, 5, 6, 7), so will always appear separated by multiples of the 5-bit encoded symbol length (and never separated by a single symbol). Violations of this property are used for special synchronization codes.

Command characters

The following codes are sometimes referred to as command characters. They are commonly used in pairs, although USB-PD uses 4-symbol sequences to begin its packets.

Control character 5b symbols Purpose
JK 11000 10001 Sync, Start delimiter
I 11111 100BASE-X idle marker
T 01101 USB-PD end delimiter
TT 01101 01101 FDDI end delimiter
TS 01101 11001 Not used
IH 11111 00100 SAL
TR 01101 00111 100BASE-X end delimiter
SR 11001 00111 Not used
SS 11001 11001 Not used
H 00100 100BASE-X transmit error
JJJK 11000 11000 11000 10001 USB-PD Start Of Packet (SOP)
JJLL 11000 11000 00110 00110 USB-PD SOP′
JLJL 11000 00110 11000 00110 USB-PD SOP″
JSSL 11000 11001 11001 00110 USB-PD SOP′_Debug
JSLK 11000 11001 00110 10001 USB-PD SOP″_Debug
RRRS 00111 00111 00111 10001 USB-PD Hard Reset
RJRL 00111 11000 00111 00110 USB-PD Cable Reset


  1. ^ AES10-2008 (r2019): AES Recommended Practice for Digital Audio Engineering - Serial Multichannel Audio Digital Interface (MADI), Audio Engineering Society
  2. ^ "5.3 Symbol Encoding". Universal Serial Bus Power Delivery Specification. Revision 2.0 Version 1.3. USB Implementers Forum. 12 January 2017. p. 105. 4b5b line code Shall be used. This encodes 4-bit data to 5-bit symbols for transmission and decodes 5-bit symbols to 4-bit data for consumption by the receiver.

External links

This page was last edited on 17 February 2021, at 14:33
Basis of this page is in Wikipedia. Text is available under the CC BY-SA 3.0 Unported License. Non-text media are available under their specified licenses. Wikipedia® is a registered trademark of the Wikimedia Foundation, Inc. WIKI 2 is an independent company and has no affiliation with Wikimedia Foundation.