T1 Line Coding

Line coding and framing are often confused as being one and the same - they are not. Line coding involves the manner in which bits are sent - as well as providing a means of synchronization.

Signaling - information that is sent with the actual data, to convey certain connection parameters


There are two predominant T1 systems used in America, which are defined by the type of line coding (or signaling), and the way they separate serial streams of bits into groups of 193 bits, or frames. 

Frames and the f-bits

All T1 systems  use every 193rd bit as a Framing bit, or f-bit.  The bit denotes the end of the frame, and is also used for signaling and control.  So with a T1, there are 192 bits of data sent, then an f-bit, 192 bits of data sent, then an f-bit, and so on.

The f-bits are overhead, and they reduce the T1 throughput from 1.544 Mbps to 1.536 Mbps.  Remember, all T1's transmit and receive at 1.544 Mbps, or 1544 Kbps - but 8 kbps is used for framing bits, leaving a throughput of 1536 Kbps.

The T1 Synchronization Problem

The f-bits, at 1 out of every 193 bits - are spaced too far apart to be used for synchronization.  Originally, it was thought that the 1's from the data itself could be used to synch from - however, a series of zero's in the data (not uncommon at all), or simply a period where the T1 is not used, would cause a loss of synch.  They had to devise a way to insert 1's into the stream.  This is done in two different ways - robbed-bit signaling, and clear-channel.

1's Density - As stated, a long succession of zero's cannot be tolerated because synch is lost.  Therefore, the DS-1 standard calls for a 1's density of 12.5%.  In other words, 1 of every 8 bits MUST be a 1. Note that 1/8 = 0.125 = 12.5%.  Both AMI and B8ZS meet this requirement !!

Out-of-Band vs In-Band signaling - out-of-band signaling, not used by T1's, requires a separate circuit or overlay network to handle the signaling.  An example of out-of-band signaling is the SS7 system used to place and control voice calls across the PSTN.  In-band signaling uses part of the actual transmitted data stream, and normally reduces the throughput.  This is why it is often called "robbed bit signaling".  

Out-of-band is not used by T1's.  Instead, they use the following two types of signaling - for both control and synch: 

1)  AMI with SF  -  AMI (Alternate Mark Inversion) signaling uses frames grouped into Super-Frames (12, 193-bit frames).  AMI with SF is old and outdated but still in use in some rural areas and small towns.  SF (SuperFrame) framing is also called D4 framing, because D4 channel banks used it.  AMI is used for voice circuits, and switched 56. AMI uses "In-Band signaling", in which the connection control info (signaling) shares the channel with the data stream.

2)  B8ZS with ESF  -  B8ZS signaling uses frames that are grouped into Extended Super-Frames (24, 193-bit frames).  B8ZS with ESF is now the predominant T-carrier system used across the U.S.  B8ZS, or "clear-channel", is used primarily for data circuits. If the data circuit is a private line (nailed up) - the path is permanent and no switching or call setup info is needed - so all 24 DS0s can be used for data.

T1 Line coding is used for clocking, or synchronization. The T1 system has no inherent clocking bits (using with synchronous), and no start and stop bits (used with asynchronous). Instead, the receiving end of a transmission uses the data itself to synch from. This saves on overhead, so that no bits are wasted on synchronization. 

AMI (Alternate Mark Inversion) for T1 circuits

A line code used for T-1 and E-1 lines that has a 12.5% ones density minimum (an average of at least one 1-bit for every eight bits), and the one conditions of the signal alternate between positive and negative polarity.  Successive "marks" are of alternately positive and negative polarity.  Binary values are sent by three voltage states. A logical "0" is represented by 0 volts, and a logical "1" is represented by either a positive voltage or a negative voltage so that each alternate "1" is represented by a voltage level that is the opposite of that which represented the previous "1". The result is a digital waveform that has zero DC voltage on the line.

A logical 0 is represented by no symbol, and a logical 1 by pulses of alternating polarity. The alternating coding prevents the build-up of a d.c. voltage level down the cable. This is considered an advantage since the cable may be used to carry a small d.c. current to power intermediate equipment such as line repeaters.

AMI coding was used extensively in first generation PCM networks, but suffers the drawback that a long run of 0's produces no transitions in the data stream (and therefore does not contain sufficient transitions to guarantee lock of a DPLL). Successful transmission therefore relies on the user not wishing to send long runs of 0's and this type of encoding is not therefore transparent to the sequence of bits being sent.

B8ZS (Bipolar Eight Zero Substitution) for T1 circuits 

B8ZS, also called "Clear Channel" - an improvement over AMI coding, is used with ESF framing in T1 carrier systems. Both B8ZS and AMI alternate the polarity of consecutive 1s. But with AMI coding, the signalling is in-band, and "robs" a 1 bit from each byte for signaling - which limits each channel to 56 kbps. Out-of-band signaling frees up all 8 bits of each byte to carry data, allowing each channel 64 kbps. However, you need 1s to synchronize off of (see "ones density requirement") - and if the data has a continuous series of 0s, the synch can be lost. B8ZS replaces any byte containing all 0s, with a specific eight bit pattern containing two deliberate bipolar violations (BPVs) - the receiving end recognizes this pattern and replaces it with the original eight 0s.. B8ZS satisfies T1 Carrier regenerator ones density requirement: that fifteen consecutive zeros cannot be sent and that an average of at least one out of eight bits contains a one. Although converting to B8ZS does not require modification of T1 repeaters, virtually every other piece of carrier equipment must be upgraded; PBX T1 boards, M13 multiplexers, CSUs, and even test equipment. Fortunately, most equipment manufactured within the last few years can be optioned for B8ZS. B8ZS and ESF are deployed (together) as two of the three steps toward clear channel capability (64 kbps data rate). The third step is out-of-band signaling (via ISDN or SS7). T1 bandwidth is increased with B8ZS from 1.344 Mbps (AMI) to 1.536 Mbps, a 14% increase in throughput.

The HDB3 code is a bipolar signaling technique (i.e. relies on the transmission of both positive and negative pulses). It is based on Alternate Mark Inversion (AMI), but extends this by inserting violation codes whenever there is a run of 4 or more 0's. This and similar (more complex) codes have replaced AMI in modern distribution networks.

NOTE:  DS3 lines use B3ZS coding, not B8ZS.  They also use C-bit parity for synchronization (see the T3 section).

E1 Line Coding



HDB3 Encoding for E1 Circuits

In Europe, the E1 is used instead of T1.  An E1 circuit has 32 channels vs 24 channels for T1.  The encoding rules follow those for AMI, except that a sequence of four consecutive 0's are encoding using a special "violation" bit. This bit has the same polarity as the last 1-bit which was sent using the AMI encoding rule. The purpose of this is to prevent long runs of 0's in the data stream which may otherwise prevent a DPLL from tracking the centre of each bit. Such a code is sometimes called a "run length limited" code, since it limits the runs of 0's which would otherwise be produced by AMI.

By introducing violations, extra "edges" are introduced, enabling a DPLL to provide reliable reconstruction of the clock signal at the receiver. This encoding rule is said to make HDB3 transparent to the sequence of bits being transmitted (i.e. whatever data is sent, the DPLL will be able to reconstruct the data and extract the bits at the receiver).

One refinement is necessary, to prevent a dc voltage being introduced by excessive runs of zeros. This refinement is to encode any pattern of more than four bits as B00V, where B is a balancing pulse. The value of B is assigned as + or - , so as to make alternate "V"s of opposite polarity.

The receiver removes all Violation pulses, but in addition a violation preceded by two zeros and a pulse is treated as the "BOOV" pattern and both the viloation and balancing pulse are removed from the receieved bit stream. This restores the original bit stream.


 Transmitted Data  HDB3 Encoded Pattern
 0 0
 1 Alternate Mark Inversion (AMI)
 0000  000V (three 0's and a violation)
 0000 0000  B00V B00V

Summary of HDB3 encoding rules


Example 1 of HDB3 encoding

The pattern of bits

" 1 0 0 0 0 1 1 0 "

encoded in HDB3 is

" + 0 0 0 V - + 0 "

(the corresponding encoding using AMI is " + 0 0 0 0 - + ").

Example 2 of HDB3 encoding

The pattern of bits

" 1 0 1 0 0 0 0 0 1 1 0 0 0 0 1 1 0 0 0 0 0 0 "

encoded in HDB3 is " + 0 - 0 0 0 V 0 + - B 0 0 V - + B 0 0 V 0 0 " which is:

" + 0 - 0 0 0 - 0 + - + 0 0 + - + - 0 0 - 0 0 "

(the corresponding encoding using AMI is " + 0 - 0 0 0 0 0 + - 0 0 0 0- + 0 0 0 0 0 0 ").