Calculator Hub

Technology & Computing

Gray Code to Binary Converter Calculator

Convert a value into its Gray code representation and its binary equivalent for a given bit width.

Your inputs

Change any value to update the result instantly.

Technology & Computing

Gray code

00001111

Binary value

10

Decimal value

10

Bit width

8 bits

Gray code changes only one bit between consecutive values, which reduces glitches in rotary encoders and counters.

Formula and working

Gray = value XOR (value >> 1); Binary is the direct base-2 representation of value

  1. 1

    Collect the inputs

    Decimal value = 10; Bit width = 8

  2. 2

    Apply the formula

    Gray = value XOR (value >> 1); Binary is the direct base-2 representation of value

  3. 3

    Result

    Gray code = 00001111

Frequently asked questions

Important limitation

This is an educational estimate based only on the values and formula shown. Verify current rates, rules, units, and professional standards before relying on the result. It is not personalized financial or investment advice.

Report a mistake or request an improvement

Tell us if a formula, unit, explanation, or result needs attention. Your message will include this calculator’s name and page.

Related calculators

Back to Calculator Hub