In computing, AMI (Alternate Mark Inversion) is a synchronous clock encoding technique which uses bipolar pulses to represent logical 1 values. It is therefore a three-level system. 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 in 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.

The HDB3 encoding scheme is one of many which have been developed to provide regular transitions irrespective of the pattern of data being carried.