BroHelp.me

Decimal To Gray Code

Encode a non-negative decimal integer as reflected binary Gray code. Spaces and underscores are ignored; other characters are rejected.



NAN

How This Converter Works

Converts a non-negative decimal integer to reflected binary Gray code; spaces and underscores are ignored, but signs and other characters are rejected.

Formula or rule

Remove whitespace and underscores; require decimal digits only, convert to binary, then XOR the binary integer with itself shifted right by one.

Example

Input
10
Calculation
10₁₀ = 1010₂; leading bit 1 followed by adjacent XOR bits 1,1,1.
Result
1111
© BroHelp.me 2026 - 2026 is provided without warranty of any kind.