4B3T


4B3T, which stands for 4 Binary 3 Ternary, is a line encoding scheme used for ISDN PRI interface. 4B3T represents four binary bits using three pulses.

Description

It uses three states:
This means we have 24 = 16 input combinations to represent, using 33 = 27 output combinations. 000 is not used to avoid long periods without a transition. 4B3T uses a paired disparity code to achieve an overall zero DC bias: six triplets are used which have no DC component, and the remaining 20 are grouped into 10 pairs with differing disparity. When transmitting, the DC bias is tracked and a combination chosen that has a DC component of the opposite sign to the running total.
This mapping from 4 bits to three ternary states is given in a table known as Modified Monitoring State 43.
A competing encoding technique, used for the ISDN basic rate interface where 4B3T is not used, is 2B1Q.
The sync sequence used is the 11-symbol Barker code, +++−−−+−−+− or its reverse, −+−−+−−−+++.

Encoding table

Each 4-bit input group is encoded as a 3-symbol group from the following table.
Encoding requires keeping track of the accumulated DC offset, the number of + pulses minus the number of − pulses in all preceding groups. The starting value is arbitrary; here we use the values 1 through 4, although −1.5, −0.5, +0.5 and +1.5 is another possibility.
This code forces a transition after at most five consecutive identical non-zero symbols, or four consecutive zero symbols.

Decoding table

Decoding is simpler, as the decoder does not need to keep track of the encoder state, although doing so allows greater error detection. The 000 triplet is not a legal encoded sequence, but is typically decoded as binary 0000.
TernaryBinaryHexTernaryBinaryHexTernaryBinaryHex
0 0 0N/A− 0 001015+ − −1010A
+ 0 +00000− + +01106+ 0 −1011B
0 − 000000− − +01106+ + +1100C
0 − +00011− 0 +01117− + −1100C
+ − 000102+ 0 0100080 + 01101D
0 0 +001130 − −10008− 0 −1101D
− − 000113+ − +100190 + −1110E
− + 001004− − −10019+ + 01111F
0 + +01015+ + −1010A0 0 −1111F