BinaryCon Binary Converter

Binary → Gray Code

Result

Binary → Gray Code

Convert binary numbers to Gray code representation.

Example: 1010

Definition: Converts a binary string to its corresponding Gray code representation.

Conversion

Binary → Gray: G = B XOR (B >> 1) where B is the binary value.
Example: B=1011 → G = 1011 XOR 0101 = 1110