The 2B1Q code (2 Binary 1 Quaternary ) is a line code in communications technology. The 2B1Q code forms two binary values ​​( 2 bits) a quaternary ( tetravalent ) value and is specially used in ISDN for basic access to the local loop.

Through the application of the code, the required step speed decreases when the base connection of 160 to 80 kBaud ( at a sustained data transfer rate of 160 kbit / s ) and thus the frequency spectrum needed: it is shifted to lower frequencies, resulting in a lower attenuation result. This allows a higher transmission range can be achieved.

The allocation of the voltages to the bit code was chosen so that there is as little as possible bit errors in transmission errors (voltage fluctuation ). There is a Gray - code is used. For example, to transfer a 10 (voltage 2.5 V) and comes Any errors, so that the recipient receives only a low voltage ( approximately in the range of 0.833 V), so reads the recipient is a 11, so only a error of one bit. Had the bit sequences and the voltage was coded according to size, the receiver would read a 01, and thus equal to 2 wrong bits.

In HDSL operating at higher data rates because of the higher then line attenuation even with higher voltages than specified in the table (in the order then to 20 volts).