Octal To Gray Code

Convert numbers from octal (base 8) to Gray code.




NAN

Reverse Conversion

Gray Code to Octal

How This Converter Works

Converts octal input to Gray code by expanding each octal digit to three bits, removing leading zeroes, and encoding the binary value.

Formula or rule

Map each octal digit to a three-bit group; concatenate, strip leading zeroes (or use 0), then XOR adjacent binary bits.

Example

Input
55
Calculation
5→101 and 5→101, giving 101101₂; its reflected Gray encoding is 111011.
Result
111011