This document details the process and provided routines for converting Gray code to normal binary on a PDP-7 computer system, which is equipped with special IOT instructions for Gray binary input. The Gray code is characterized as a nonweighted, monostrophic, and reflected numbering system. The conversion method involves comparing adjacent bits in the Gray word: if they are equal, the corresponding normal bit is set to 0; if different, it is set to 1.
Two types of subroutines are offered: a size-oriented routine and a speed-oriented routine. The size-oriented routine is more compact (14 locations) but slower (averaging 210 µsec for an 18-bit word), designed for situations where memory footprint is a priority. The speed-oriented routine is faster (averaging 101.5 µsec for an 18-bit word) but requires more storage (3+3I locations), intended for known bit counts where execution speed is paramount. The document includes usage instructions, timing and storage specifications, an example conversion, assembly listings for both routines, a flow chart for the size-oriented routine, definitions of computer terms, and a comparative table of Gray, Normal Binary, and Decimal number systems.
Site structure and layout ©2025 Majenko Technologies