• EasyStackTools189+ Free Tools
  • EVM Tools
    • Number Base Converter
    • BCD Converter
    • Gray Code Converter
    • Binary Calculator
    • Roman Numeral Converter
    • Numbers to Words
    • Words to Numbers
    • Scientific Notation Converter
    • Prime Number Generator
    • Fibonacci Number Generator
    • Pi Digit Generator
    • Euler Digit Generator
    • Round Numbers
    • Random Fraction Generator
  1. Home
  2. Math Tools
  3. Gray Code Converter

Gray Code Converter

Convert between Gray code and binary, octal, decimal, and hexadecimal.

Read the guide

Guide and examples

The Gray Code Converter converts between Gray code (reflected binary) and binary, octal, decimal, and hexadecimal. Gray code changes by only one bit between consecutive values, which is useful in encoders and error detection.

What is Gray Code?

Gray code is a binary encoding where successive values differ by exactly one bit. The tool converts between Gray and binary, and between Gray and octal, decimal, or hex (via binary).

Key Features

  • Convert from binary, octal, decimal, or hex to Gray code.
  • Convert from Gray code to binary, octal, decimal, or hex.
  • Client-side only; no server upload.

How to Use

  1. Open the Gray Code Converter tool.
  2. Select "From" (e.g. Decimal) and "To" (e.g. Gray code or Decimal).
  3. Enter the value.
  4. Read and copy the result.

Use Cases

  • Encoders — Interpret or generate Gray code from rotary encoders.
  • K-maps — Move between Gray and decimal when simplifying logic.
  • Education — Demonstrate reflected binary and single-bit changes.

Frequently Asked Questions

What is Gray code?

Gray code is a binary encoding where successive values differ by only one bit. It is used in encoders and error correction.

What input does it accept?

Enter a number in binary (0 and 1), octal, decimal, or hexadecimal. Gray input must be a binary string (0 and 1).

Are negative numbers supported?

Conversion from decimal/octal/hex supports non-negative integers only. Negative Gray is not standard.

Is data processed on a server?

No. All conversion runs in your browser.

When is Gray code used?

Common in rotary encoders, Karnaugh maps, and anywhere single-bit changes between consecutive values are desired.

Why is my Gray conversion wrong?

Ensure input uses only 0 and 1 for Gray. For other bases, use valid digits (e.g. 0-7 for octal).

Conclusion

Use the Gray Code Converter for Gray ↔ binary, decimal, octal, and hex. See also Number Base Converter and Binary Calculator.

Frequently Asked Questions

Gray code is a binary encoding where successive values differ by only one bit. It is used in encoders and error correction.

Related Tools

  • Number Base Converter

    Convert numbers between binary, octal, decimal, and hexadecimal. Supports any base from 2 to 36.

  • BCD Converter

    Convert between BCD (Binary-Coded Decimal), decimal, octal, and hexadecimal.

  • Binary Calculator

    Add and multiply binary numbers; compute bitwise AND, OR, XOR, NAND, NOR, XNOR, NOT; invert, reverse, rotate, and shift binary strings.

  • Roman Numeral Converter

    Convert between Roman numerals and decimal numbers. Supports standard subtractive notation (IV, IX, XL, etc.).