BroHelp.me

Binary To Gray Code

Convert numbers from binary (base 2) to gray code value.




NAN

Reverse Conversion

Gray Code to Binary

How This Converter Works

Encodes a binary word as reflected binary Gray code, preserving its width.

Formula or rule

The first Gray bit equals the first binary bit; each later Gray bit is the XOR of adjacent binary bits, equivalent to n XOR (n shifted right by 1).

Example

Input
101101
Calculation
Copy 1; adjacent XORs are 1⊕0=1, 0⊕1=1, 1⊕1=0, 1⊕0=1, 0⊕1=1.
Result
111011
© BroHelp.me 2026 - 2026 is provided without warranty of any kind.