HDB3 (European E-carrier)
Used in all levels of the European E-carrier system, the high density bipolar of order 3 (HDB3) code replaces any instance of 4 consecutive 0 bits with one of the patterns "000V" or "B00V". The choice is made to ensure that consecutive violations are of differing polarity, i.e. separated by an odd number of normal + or - marks.
Number of +/- bits since last V |
Pattern | Polarity of last Pulse |
Coded |
---|---|---|---|
odd | 000V | + | 000+ |
− | 000− | ||
even | B00V | + | −00− |
− | +00+ |
These rules are applied on the code as it is being built from the original string. Everytime there are 4 consecutive zeros in the code they will be replaced by either 000−, 000+, +00+ or −00−. To determine which pattern to use, you have to count the number of pluses (+) and the number of minuses (−) since the last violation bit V that you used and subtract one from the other. If the result is an odd number then 000− or 000+ is used. If the result is an even number then +00+ or −00− is used. To determine which polarity to use you must look at the pulse preceding the four zeros. If 000V form must be used then V simply copies the polarity of last pulse, if B00V form must be used then B and V chosen will have the opposite polarity of the last pulse.
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 ")
Example 3 of HDB3 encoding
The pattern of bits
" 1 0 1 0 0 0 0 1 0 0 0 0 1 1 0 0 0 0 1 1 1 0 0 0 0 1 1 1 1 0 0 0 0 1 0 1 0 0 0 0"
encoded in HDB3 is "+ 0 − 0 0 0 V + 0 0 0 V − + B 0 0 V + − + 0 0 0 V − + − + B 0 0 V + 0 − B 0 0 V " which is:
" + 0 − 0 0 0 − + 0 0 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 0 + − + − 0 0 0 0 + 0 − 0 0 0 0 ")
Read more about this topic: Modified AMI Code