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):

PLANETCALC, Decimal to 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:

PLANETCALC, Gray code to Decimal

Gray code to Decimal

Decimal
 
Binary
 

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

PLANETCALC, n-bit Gray code table generator

n-bit Gray code table generator

The file is very large. Browser slowdown may occur during loading and creation.

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.

URL copied to clipboard
Creative Commons Attribution/Share-Alike License 3.0 (Unported) PLANETCALC, Gray code converters

Comments