๐ Gray Code Converter
Bidirectional binary-to-Gray code conversion with decimal input and batch processing
โ๏ธ Conversion Mode
Enter a binary string containing only 0s and 1s
Gray Code Result
๐ About Gray Code
- Gray code is a reflected binary code where adjacent numbers differ by only one bit
- Binary โ Gray: MSB unchanged, each subsequent bit = current bit XOR previous bit (
G[i] = B[i] XOR B[i-1]) - Gray โ Binary: MSB unchanged, each subsequent bit = Gray bit XOR previous binary result (
B[i] = G[i] XOR B[i-1]) - Gray code is used in rotary encoders, Karnaugh maps, error detection, and analog-to-digital conversion
- Example: Binary
1011โ Gray code1110