Binary to Gray Code Converter

 
Binary
Decimal  =  10
Gray Code  =  1111
CALCULATE
CALCULATE

Binary - Gray Code converter, truth table & example conversion to perform binary to gray code or gray code to binary conversion in digital electronics & communications. Select the radio button to perform the appropriate conversion. Both the conversions can be done by using the below EX-OR gate logic.
EX-OR gate truth table

BinaryGray CodeDecimal
000100011
001000112
001100103
010001104
010101115
011001016
011101007
100011008
100111019
1010111110
1011111011
1100101012
1101101113
1110100114
1111100015
100001100016
100011100117
100101101118
100111101019
101001111020
101011111121
101101110122
101111110023
110001010024
110011010125
110101011126
110111011027
111001001028
111011001129
111101000130

Binary to Gray Code Conversion

This conversion method strongly follows the EX-OR gate operation between binary bits . The below steps & solved example may useful to know how to perform binary to gray code conversion.

1. To convert binary to gray code, bring down the most siginificant digit of the given binary number, because, the first digit or most siginificant digit of the gray code number is same as the binary number.
2. To obtain the successive gray coded bits to produce the equivalent gray coded number for the given binary, add the first bit or the most siginificant digit of binary to the second one and write down the result next to the first bit of gray code, add the second binary bit to third one and write down the result next to the second bit of gray code, follow this operation until the last binary bit and write down the results based on EX-OR logic to produce the equivalent gray coded binary.

Solved Example :
The below solved example may useful to understand how to perform binary to gray code conversion.

Problem
Find the equivalent gray code for the binary 111012.

Solution :
binary to gray code conversion solved example

Gray Code to Binary Conversion

This conversion method also follows the EX-OR gate operation between gray & binary bits. The below steps & solved example may useful to know how to perform gray code to binary conversion.

1. To convert gray code to binary, bring down the most siginificant digit of the given gray code number, because, the first digit or the most siginificant digit of the gray code number is same as the binary number.
2. To obtain the successive second binary bit, perform the EX-OR operation between the first bit or most siginificant digit of binary to the second bit of the given gray code.
3. To obtain the successive third binary bit, perform the EX-OR operation between the second bit or most siginificant digit of binary to the third MSD (most significant digit) of gray code and so on for the next successive binary bits conversion to find the equivalent.

Solved Example :
The below solved example may useful to understand how to perform gray code to binary conversion.

Problem
Find the equivalent binary number for the gray code 1010.

Solution :
gray code to binary conversion solved example
In digital electronics & communications, the conversion between different number systems play vital role to perform various operations. The above solved examples for binary to gray code and gray code to binary conversions may useful to understand how to perform such calculations, however, when it comes to online, this binary - gray code converter may useful to perform such conversions as easy & quick as possible.