Skip to main content

HDB3 (HD3S) line coding

Short answer

HDB3 replaces four consecutive zeros with 000V (if pulses since last substitution are odd) or B00V (if even). V is a violation with same polarity as prior pulse, B is normal alternating pulse. For data 1010000000011 with prior pulse negative, the two four-zero groups are encoded as +00+ and -00-, yielding +0-+00+-00-+-.

Explain High Density 3-zero substitution (HDB3 / HD3S) line coding with example.

HDB3 (High Density Bipolar 3-zeros), also called HD3S, is a scrambling technique on bipolar AMI used in Europe and Japan (E1 lines). It limits the string of zeros to three, so the receiver keeps its clock.

Rule

AMI coding is used as normal. Each group of four consecutive zeros is replaced by 000V or B00V:

  • V is a violation pulse with the same polarity as the previous pulse.
  • B is a normal alternating pulse (opposite to the previous pulse, so V then has the same polarity as B).

Choose the substitution from the number of 1s (pulses) since the last substitution:

Pulses since last substitutionSubstitutionReason
Odd000VV has the correct polarity to keep the DC level zero
EvenB00VB balances the DC level

The violation pulses alternate in polarity, so the DC component is zero.

Example

Data: 1 0 1 0 0 0 0 0 0 0 0 1 1 (the pulse before the data is taken as negative, so the first 1 is +).

Data : 1 0 1 0 0 0 0 0 0 0 0 1 1
HDB3 : + 0 - + 0 0 + - 0 0 - + -

Working:

  • The two 1s give + and - (two 1s so far, an even count).
  • First 0000: even count, so B00V. B is opposite to the last pulse (-), so B = +, and V = + (same as B): + 0 0 +.
  • Second 0000: no 1s since the last substitution (count 0, even), so B00V again. B is opposite to the last pulse (+), so B = -, V = -: - 0 0 -.
  • The last two 1s follow the last pulse (-): + then -.

Each V has the same polarity as the pulse before it, so the receiver recognises the violation and restores the four zeros.

✓ Answer checked by Claude Sonnet 5.5

All Data Communication chapter 5 questions →