homechevron_rightProfessionalchevron_rightComputers

# Gray code converters

These online calculators convert to and from binary reflected Gray code, and can produce table for an n-bit Gray code

This page combines several calculators related to Gray code. You can read a short recap of what is the Gray code right below the calculators.

First, there is a converter from decimal (to be precise, non-negative integer number) to Gray code (to be precise, binary reflected Gray code): #### Decimal to Gray code

Gray Code

Second, these is a converter from binary reflected Gray code to decimal, and the result is displayed in decimal and binary formats: #### Gray code to Decimal

Decimal

Binary

And finally, there is a table generator, which can generate a table for an n-bit Gray code: ### Gray code

The Gray code, named after Frank Gray, is an ordering of the binary numeral system, such that two successive values differ in only one bit. That is, the Gray code rolls over the range it represents with only one bit/switch change. I wrote 'switch', because originally it was designed to prevent spurious output from electromechanical switches in sequential systems. For example, change from 3 to 4 in normal binary ordering requires three switch changes (from 011 to 100), while in Gray code we always need only one (from 010 to 110).

The Gray code is also known as the reflected binary code.