A Gray code is a cyclic ordering of binary strings so that two successive values differ in only one bit (a Hamming distance of 1).

A Gray code, also know as a reflected binary code, is a cyclic ordering of the integers {0, ..., $2^n$-1} so that two successive values differ in only one bit (i.e. a Hamming distance of 1). Used by Baudot in the 19th century, and still used in 21st century in Air Traffic Control radars to minimize Mode C altitude errors. Patented in 1947 by Frank Gray.