4B5B
   HOME

TheInfoList



OR:

In
telecommunications Telecommunication, often used in its plural form or abbreviated as telecom, is the transmission of information over a distance using electronic means, typically through cables, radio waves, or other communication technologies. These means of ...
, 4B5B is a form of data communications
line code In telecommunications, a line code is a pattern of voltage, current, or photons used to represent digital data transmission (telecommunications), transmitted down a communication channel or written to a storage medium. This repertoire of signal ...
. 4B5B maps groups of 4 bits of data onto groups of 5 bits for transmission. These 5-bit words are predetermined 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.


Applications

4B5B was popularized by Fiber Distributed Data Interface (FDDI) in the mid-1980s. It was adopted for digital audio transmission by MADI in 1989. and by
Fast Ethernet In computer networking, Fast Ethernet Ethernet physical layer, physical layers carry traffic at the nominal rate of . The Classic Ethernet, prior Ethernet speed was . Of the Fast Ethernet physical layers, 100BASE-TX is by far the most common. ...
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 Run-length limited (RLL) is a line coding technique that is used to send arbitrary data over a communications channel with bandwidth limits. RLL codes are defined by four main parameters: ''m'', ''n'', ''d'', ''k''. The first two, ''m''/''n'', ...
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 Fast Ethernet. The 4B5B encoding is also used for
USB Power Delivery The initial versions of the USB standard specified connectors that were easy to use and that would have high life spans; revisions of the standard added smaller connectors useful for compact portable devices. Higher-speed development of the USB ...
(USB-PD) communication, where it is sent over the
USB-C USB-C, or USB Type-C, is a 24-pin reversible Electrical connector, connector (not a Communication protocol, protocol) that supersedes previous USB hardware#Connectors, USB connectors (also supersedes Mini DisplayPort and Lightning (connector) ...
CC pin (further encoded using
biphase mark code Biphase or Bi-phase may refer to: * Biphase modulation, or binary phase-shift keying * Differential Manchester encoding, also known as Aiken biphase or biphase mark code * Harvard biphase, used to encode data onto magnetic tape * Mu-Tron Bi-Pha ...
) or the USB-A/B power lines (further encoded using
frequency-shift keying Frequency-shift keying (FSK) is a frequency modulation scheme in which digital information is encoded on a carrier signal by periodically shifting the frequency of the carrier between several discrete frequencies. The technology is used fo ...
).


Clocking

4B5B codes are designed to produce at least two transitions per 5 bits of output code regardless of input data. The transitions provide necessary transitions for the receiver to perform
clock recovery Clock recovery is a process in serial communication used to extract timing information from a stream of serial data being sent in order to accurately determine payload sequence without separate clock information. It is widely used in data communi ...
. For example, a run of 4 bits such as 0000 using NRZI encoding contains no transitions and that may cause clocking problems for the receiver. 4B5B solves this problem by assigning the 4-bit block a 5-bit code, in this case, 11110. There are eight 5-bit codes that have 3 consecutive 0s: 00000, 00001, 00010, 01000, 10000, 00011, 10001, 11000. This leaves 24 codes available.


Encoding table

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.


See also

* GCR 4B-5B encoding


References


External links


Simulator - 4B/5B Encoder line written in Matlab

CodSim 2.0: Open source simulator for Digital Data Communications Model at the University of Malaga written in HTML
{{DEFAULTSORT:4b5b Telecommunications standards Line codes