4B5B

Last updated

In telecommunications, 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 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.

Contents

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. [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 Fast Ethernet.

The 4B5B encoding is also used for USB Power Delivery (USB-PD) 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).

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. For example, a run of 4 bits such as 00002 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, 111102.

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

Data4B5B code
(Hex)(Binary)
0000011110
1000101001
2001010100
3001110101
4010001010
5010101011
6011001110
7011101111
Data4B5B code
(Hex)(Binary)
8100010010
9100110011
A101010110
B101110111
C110011010
D110111011
E111011100
F111111101
Symbol4B5B codeDescriptionFDDIFast EthernetUSB-PD
H00100HaltYesYesNo
I11111IdleYesYesNo
J11000Start #1YesYesYes
K10001Start #2YesYesYes
L00110Start #3NoNoYes
Q00000Quiet (loss of signal)YesYesNo
R00111ResetYesYesYes
S11001SetYesNoYes
T01101End (terminate)YesYesYes

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 character5b symbolsPurpose
JK11000 10001Sync, Start delimiter
I11111100BASE-X idle marker
T01101USB-PD end delimiter
TT01101 01101FDDI end delimiter
TS01101 11001Not used
IH11111 00100SAL
TR01101 00111100BASE-X end delimiter
SR11001 00111Not used
SS11001 11001Not used
H00100100BASE-X transmit error
JJJK11000 11000 11000 10001USB-PD Start Of Packet (SOP)
JJLL11000 11000 00110 00110USB-PD SOP′
JLJL11000 00110 11000 00110USB-PD SOP″
JSSL11000 11001 11001 00110USB-PD SOP′_Debug
JSLK11000 11001 00110 10001USB-PD SOP″_Debug
RRRS00111 00111 00111 11001USB-PD Hard Reset
RJRL00111 11000 00111 00110USB-PD Cable Reset

See also

Related Research Articles

In data transmission and telecommunication, bit stuffing is the insertion of non-information bits into data. Stuffed bits should not be confused with overhead bits.

Differential Manchester encoding (DM) is a line code in digital frequency modulation in which data and clock signals are combined to form a single two-level self-synchronizing data stream. Each data bit is encoded by a presence or absence of signal level transition in the middle of the bit period, followed by the mandatory level transition at the beginning. The code is insensitive to an inversion of polarity. In various specific applications, this method is also called by various other names, including biphase mark code (CC), F2F, Aiken biphase, and conditioned diphase.

<span class="mw-page-title-main">Line code</span> Pattern used within a communications system to represent digital data

In telecommunication, a line code is a pattern of voltage, current, or photons used to represent digital data transmitted down a communication channel or written to a storage medium. This repertoire of signals is usually called a constrained code in data storage systems. Some signals are more prone to error than others as the physics of the communication channel or storage medium constrains the repertoire of signals that can be used reliably.

<span class="mw-page-title-main">Non-return-to-zero</span> Telecommunication coding technique

In telecommunication, a non-return-to-zero (NRZ) line code is a binary code in which ones are represented by one significant condition, usually a positive voltage, while zeros are represented by some other significant condition, usually a negative voltage, with no other neutral or rest condition.

<span class="mw-page-title-main">S/PDIF</span> Standardized digital audio interface

S/PDIF is a type of digital audio interface used in consumer audio equipment to output audio over relatively short distances. The signal is transmitted over either a coaxial cable using RCA or BNC connectors, or a fibre-optic cable using TOSLINK connectors. S/PDIF interconnects components in home theaters and other digital high-fidelity systems.

<span class="mw-page-title-main">PSK31</span> Type of radioteletype mode

PSK31 or "Phase Shift Keying, 31 Baud", also BPSK31 and QPSK31, is a popular computer-sound card-generated radioteletype mode, used primarily by amateur radio operators to conduct real-time keyboard-to-keyboard chat, most often using frequencies in the high frequency amateur radio bands (near-shortwave). PSK31 is distinguished from other digital modes in that it is specifically tuned to have a data rate close to typing speed, and has an extremely narrow bandwidth, allowing many conversations in the same bandwidth as a single voice channel. This narrow bandwidth makes better use of the RF energy in a very narrow space thus allowing relatively low-power equipment to communicate globally using the same skywave propagation used by shortwave radio stations.

In telecommunications and electronics, a self-clocking signal is one that can be decoded without the need for a separate clock signal or other source of synchronization. This is usually done by including embedded synchronization information within the signal, and adding constraints on the coding of the data payload such that false synchronization can easily be detected.

In computer science, group coded recording or group code recording (GCR) refers to several distinct but related encoding methods for representing data on magnetic media. The first, used in 6250 bpi magnetic tape since 1973, is an error-correcting code combined with a run-length limited (RLL) encoding scheme, belonging into the group of modulation codes. The others are similar encoding methods used in mainframe hard disks or microcomputer floppy disks until the late 1980s. GCR is a modified form of a NRZI code, but necessarily with a higher transition density.

Run-length limited or RLL coding 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, refer to the rate of the code, while the remaining two specify the minimal d and maximal k number of zeroes between consecutive ones. This is used in both telecommunication and storage systems that move a medium past a fixed recording head.

<span class="mw-page-title-main">HDMI</span> Proprietary interface for transmitting digital audio and video data

High-Definition Multimedia Interface (HDMI) is a proprietary audio/video interface for transmitting uncompressed video data and compressed or uncompressed digital audio data from an HDMI-compliant source device, such as a display controller, to a compatible computer monitor, video projector, digital television, or digital audio device. HDMI is a digital replacement for analog video standards.

In telecommunications, 8b/10b is a line code that maps 8-bit words to 10-bit symbols to achieve DC balance and bounded disparity, and at the same time provide enough state changes to allow reasonable clock recovery. This means that the difference between the counts of ones and zeros in a string of at least 20 bits is no more than two, and that there are not more than five ones or zeros in a row. This helps to reduce the demand for the lower bandwidth limit of the channel necessary to transfer the signal.

<span class="mw-page-title-main">Transition-minimized differential signaling</span> Digital serial communication standard

Transition-minimized differential signaling (TMDS) is a technology for transmitting high-speed serial data used by the DVI and HDMI video interfaces, as well as by other digital communication interfaces.

<span class="mw-page-title-main">Bipolar encoding</span>

In telecommunication, bipolar encoding is a type of return-to-zero (RZ) line code, where two nonzero values are used, so that the three values are +, −, and zero. Such a signal is called a duobinary signal. Standard bipolar encodings are designed to be DC-balanced, spending equal amounts of time in the + and − states.

In a digitally modulated signal or a line code, symbol rate, modulation rate or baud rate is the number of symbol changes, waveform changes, or signaling events across the transmission medium per unit of time. The symbol rate is measured in baud (Bd) or symbols per second. In the case of a line code, the symbol rate is the pulse rate in pulses per second. Each symbol can represent or convey one or several bits of data. The symbol rate is related to the gross bit rate, expressed in bits per second.

A Serializer/Deserializer (SerDes) is a pair of functional blocks commonly used in high speed communications to compensate for limited input/output. These blocks convert data between serial data and parallel interfaces in each direction. The term "SerDes" generically refers to interfaces used in various technologies and applications. The primary use of a SerDes is to provide data transmission over a single line or a differential pair in order to minimize the number of I/O pins and interconnects.

In serial communication of digital data, clock recovery is the process of extracting timing information from a serial data stream itself, allowing the timing of the data in the stream to be accurately determined without separate clock information. It is widely used in data communications; the similar concept used in analog systems like color television is known as carrier recovery.

<span class="mw-page-title-main">MADI</span> Multichannel digital audio interface

Multichannel Audio Digital Interface (MADI) standardized as AES10 by the Audio Engineering Society (AES) defines the data format and electrical characteristics of an interface that carries multiple channels of digital audio. The AES first documented the MADI standard in AES10-1991 and updated it in AES10-2003 and AES10-2008. The MADI standard includes a bit-level description and has features in common with the two-channel AES3 interface.

In data networking and transmission, 64b/66b is a line code that transforms 64-bit data to 66-bit line code to provide enough state changes to allow reasonable clock recovery and alignment of the data stream at the receiver. It was defined by the IEEE 802.3 working group as part of the IEEE 802.3ae-2002 amendment which introduced 10 Gbit/s Ethernet. At the time 64b/66b was deployed, it allowed 10 Gb Ethernet to be transmitted with the same lasers used by SONET OC-192, rather than requiring the 12.5 Gbit/s lasers that were not expected to be available for several years.

In computer networks, a syncword, sync character, sync sequence or preamble is used to synchronize a data transmission by indicating the end of header information and the start of data. The syncword is a known sequence of data used to identify the start of a frame, and is also called reference signal or midamble in wireless communications.

The ADAT Lightpipe, officially the ADAT Optical Interface, is a standard for the transfer of digital audio between equipment. It was originally developed by Alesis but has since become widely accepted, with many third party hardware manufacturers including Lightpipe interfaces on their equipment. The protocol has become so popular that the term ADAT is now often used to refer to the transfer standard rather than to the Alesis Digital Audio Tape itself.

References

  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.