**Binary and Gray Code Conversion**

This below worksheet help you to understand how to perform Binary to Grey code and Grey to Binary code conversion. The grey code is a type of distance code also known as cyclic codes. In unit distance code the bit patterns for two consecutive numbers will differ in one bit position.

Lets Consider The Binary number B_{1} B_{2} B_{3} B_{4} ... B_{n} and the Gray code is G_{1} G_{2} G_{3} G_{4} ... G_{n}

- Most significant bit (B
_{1}) is same as the most significant bit in Gray Code (B_{1}= G_{1}) - To find next bit perform Ex-OR (Exclusive OR) between the Current binary bit and previous bit.

G_{n}= B_{n}(Ex-OR) B_{n-1} - Look the below Image for Binary to Gray code Conversion

Follow the below steps to convert Gray Code to Binary

- Most significant bit (G
_{1}) is same as the most significant bit in Binary Code (G_{1}= B_{1}) - The next number can be obtain by taking Exclusive OR operation between the previous binary bit, and the current gray code bit and write down the value. Repeat the Above Step until you find B

Look at the below example for Converting Binary to Gray Code.

When you try this calculation on your own, use this

Math Calculators

- Standard Deviation Calculator
- Probability Calculator
- Frequency Converter
- Square Calculator
- Circle Calculator
- Cylinder Calculator
- Midpoint Calculator
- Slope Intercept Form Calculator
- Radical Equation Calculator
- Quadratic Equation Calculator
- Percentage Calculator
- Log Calculator
- Fraction to Decimal calculator
- Radical Calculator
- LCM Calculator