Dictionary of Electronics
"A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M",
"N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"

## Gray Code Definition

Gray Code. A positional binary number notation in which any two numbers whose difference is one is represented by expressions that are the same except in one place and differ by only one unit in that place. A code composed of a number of bits assigned in such a way that only one bit changes at each increment, or decrement. A binary code in which consecutive decimal numbers are represented by binary expressions that differ in the state of one, and only one, one bit.

The table below provides the conversion between Binary [Base 2], Decimal [Base 10], Hexa-decimal [Base 16], Octal [Base 8], BCD Code, and Gray Code. Gray Code Conversion Table

Circuit to convert Gray Code to Binary coded decimal [BCD]. Using standard glue logic ICs; note the circuit works regardless of the particular logic family used, as long as those families will communicate with each other. Manufacturers of Standard Logic

Gray Code Circuit Gray Code Converter Schematic

IC circuit used to convert 4-bit Gray code to Binary using Exclusive OR [XOR] gates.
The schematic shows a 4-bit converter circuit, but more XOR gates may be added to produce a converter of any number of bits. A 7486 Quadruple 2-Input Exclusive-OR Gate [74xx86] could be used to implement the Gray code circuit above. There are no Gray code specific converter ICs.

A Binary to Gray Code converter can also be made using the same 7486 XOR gates. Instead of feeding the input of the XOR gate from the output of the lower one use its input line. For example XOR-3 has an input tied to output line 2sup3 of XOR-4, tie that input line to Gsup3 instead. So XOR gate 3 would have an input G2 and G3.

This next page shows a Excess-3 Gray Code to Decimal Converter, also refer to the BCD to Decimal Converter or decoder. The circuit can either be made with the chips shown or with the IC that contains the circuit.

What is a Gray Code. How to convert Gray Code. Define Gray Code.