An altitude encoder enables an ATC transponder to report the altitude of the airplane to the controller, in addition to its identity and position. Several forms of altitude encoders have been designed. This paper describes a digital altitude encoder with only one moving part, almost zero friction, proper accuracy, and all solid-state components. In this encoder, frequency is the sensing parameter. Also covered are the Gray code and the Gillham code.