Gray code is a unit distance binary code. In this code two consequtive numbers differs by only one bit. It is also known as mirror code. It is an unweighted code since each bit doesnot have any positional value where as the whole pattern represent a number.