AMI Code

Alternate Mark Inversion: a bipolar code that eliminates DC component.

Introduction to AMI

Alternate Mark Inversion (AMI) is a type of that uses three voltage levels: positive (+V), zero (0), and negative (-V). Its name perfectly describes how it works: "Mark" is an old telecommunications term for a logical '1', and these marks are alternately "inverted" in polarity. AMI was developed to solve some of the critical problems present in simpler codes like NRZ, particularly the issue of a DC component in the transmitted signal.

The Rules of AMI Coding

The encoding process for AMI follows two simple, strict rules:

  • Logical '0' (Space): A binary '0' is always represented by a zero voltage level (0V) for the entire bit duration.
  • Logical '1' (Mark): A binary '1' is represented by a non-zero voltage pulse (either +V or -V), but the polarity of this pulse must alternate for each subsequent '1'. If the last '1' was encoded as +V, the next '1' must be encoded as -V, and vice versa. The pulses typically have a 50% duty cycle, meaning they last for half the bit duration (T/2T/2), similar to RZ codes.

For example, for the binary sequence 10110011011001:
The encoded AMI signal would be: +V,0V,−V,+V,0V,0V,−V+V, 0V, -V, +V, 0V, 0V, -V.

Interactive AMI Encoding Example

Enter binary sequence (0s and 1s only)

Current Bit: 1
+5V-5V0V1011001
AMI: 1 alternates polarity (±V) for 0.5T; 0 → 0V

DC Component

AMI:0.00V

Spectral Information

Clock Frequency:1.00 Hz
Main Lobe Bandwidth:0 - 1.00 Hz

Advantages and Disadvantages of AMI

Advantages

  • No DC Component: This is the primary advantage of AMI. By ensuring that positive and negative pulses for the '1' bits will, on average, cancel each other out, the code has no significant . This makes it suitable for AC-coupled transmission lines.
  • Simple Error Detection: The strict rule of alternating polarity provides a simple, built-in error detection mechanism. If the receiver sees two consecutive pulses with the same polarity (e.g., +V followed by another +V), it immediately knows a transmission error has occurred. This is called a "bipolar violation".
  • Bandwidth Efficiency: The main lobe of the AMI spectrum is concentrated at half the bit rate (Rb/2R_b / 2) and occupies a bandwidth similar to NRZ, making it relatively efficient.

The Critical Disadvantage

  • Loss of Synchronization with Long Zero Strings: This is the main drawback of AMI. Since logical '0's are encoded as zero voltage, a long sequence of '0's results in a flat, unchanged signal on the line. With no signal transitions (edges), the receiver's clock recovery circuit has nothing to lock onto and can drift out of synchronization, leading to bit errors when a '1' finally appears.

The Solution: High-Density Bipolar Codes

To overcome AMI's fatal flaw with long zero strings, enhanced codes were developed. These are known as zero-suppression or stuffing codes, which maintain the DC-free nature of AMI while guaranteeing a sufficient density of pulses for synchronization.

  • HDB3 (High-Density Bipolar 3-zero): Used primarily in the European E1 PCM standard. This code allows a maximum of three consecutive zeros. When a fourth zero appears (00000000), it is replaced by a special sequence, either 000V000V or B00VB00V, where VV is a Bipolar Violation (a pulse with the same polarity as the previous one) and BB is a normal Bipolar pulse (alternating polarity). This intentional violation inserts a pulse, ensuring clock synchronization.
  • B8ZS (Bipolar with 8-Zero Substitution): Used in the North American T1 PCM standard. This code tackles the problem by substituting a sequence of eight consecutive zeros (0000000000000000) with the special violation pattern 000VB0VB000VB0VB.
    AMI Code | Teleinf Edu