Gray code, also known as reflected binary code, is a binary numeral system where two successive values differ in only one bit. This minimizes errors during state transitions.
How do you convert binary to Gray code?▼
The most significant bit (MSB) stays the same. Each subsequent bit is the XOR of the current binary bit and the previous binary bit. Formula: Gᵢ = Bᵢ XOR Bᵢ₋₁
How do you convert Gray code to binary?▼
The MSB stays the same. Each subsequent bit is the XOR of the current Gray bit and the previous binary bit. Formula: Bᵢ = Gᵢ XOR Bᵢ₋₁
What is Gray code used for?▼
Gray code is used in rotary encoders, digital communications, error correction, Karnaugh maps, position sensors, and anywhere minimal state change is important.
Free online calculators and tools covering mathematics, unit conversion, text processing, and daily life. Accurate, fast, mobile-friendly, and completely free to use.