Professional-grade Gray Code ↔ Binary conversion tool with step-by-step visualization for engineers and students.
🚀 Live Demo | 📖 Documentation | 🐛 Report Bug
Gray Code Converter Pro solves critical problems in digital systems:
-
🛡️ Error Detection: Minimize transmission errors in industrial sensors and communication protocols
-
⚡ Hardware Optimization: Reduce glitches in rotary encoders, ADCs, and digital circuits
-
📚 Educational Tool: Learn binary-Gray code conversion with detailed XOR operation breakdowns
-
💼 Professional Grade: Export-ready results for documentation and verification
-
✅ Bidirectional Conversion: Gray Code → Binary & Binary → Gray Code
-
✅ Real-time Validation: Instant input verification and error handling
-
✅ Step-by-Step Visualization: See every XOR operation in the conversion process
-
✅ Export Capabilities: Download conversion results with complete steps
-
✅ Copy to Clipboard: Quick one-click result copying
-
🎨 Modern UI: Clean, professional interface with light theme
-
📱 Responsive Design: Works seamlessly on desktop, tablet, and mobile
-
⚡ Instant Results: No page refreshes or delays
-
🔍 Educational Focus: Perfect for learning and teaching
-
Node.js 16+ installed
-
npm or yarn package manager
# Clone the repository
git clone https://github.com/yourusername/gray-code-converter.git
# Navigate to project directory
cd gray-code-converter
# Install dependencies
npm install
# Start development server
npm run dev
Visit http://localhost:5173 to see the app running.
npm run build
npm run preview
-
Rotary Encoders: Position tracking in motors and robotics
-
Sensor Networks: Error-resistant data transmission
-
ADC/DAC Interfaces: Glitch-free analog-digital conversion
-
FPGA Development: Hardware design verification
-
Computer Architecture: Understanding number system conversions
-
Digital Logic Design: Circuit design and optimization
-
Embedded Systems Courses: Practical encoding applications
-
Research Projects: Quick verification tool for experiments
-
Frontend: React 18.2.0
-
Build Tool: Vite 5.0.0
-
Styling: Tailwind CSS (CDN)
-
Icons: Lucide React
-
Deployment: Vercel / Netlify
1. MSB (Most Significant Bit) remains the same
2. For each subsequent bit:
Binary[i] = Binary[i-1] XOR Gray[i]
1. MSB remains the same
2. For each subsequent bit:
Gray[i] = Binary[i-1] XOR Binary[i]
Example:
Gray Code: 1011
↓ Step-by-step conversion
Binary: 1101
Step 1: B[0] = G[0] = 1
Step 2: B[1] = B[0] XOR G[1] = 1 XOR 0 = 1
Step 3: B[2] = B[1] XOR G[2] = 1 XOR 1 = 0
Step 4: B[3] = B[2] XOR G[3] = 0 XOR 1 = 1
gray-code-converter/
├── public/
├── src/
│ ├── App.jsx # Main React component
│ └── main.jsx # Application entry point
├── index.html # HTML template
├── vite.config.js # Vite configuration
├── package.json # Dependencies and scripts
└── README.md # This file
Contributions are welcome! Here's how you can help:
-
Fork the repository
-
Create a feature branch (
git checkout -b feature/AmazingFeature) -
Commit your changes (
git commit -m 'Add some AmazingFeature') -
Push to the branch (
git push origin feature/AmazingFeature) -
Open a Pull Request
-
Add batch conversion for multiple values
-
Implement API endpoint for programmatic access
-
Add comparison table between Binary, Gray, and other codes
-
Create browser extension version
-
Add dark mode toggle
This project is licensed under the MIT License.
Adil Mahajan (DYD-23-01)
Computer Systems: Architecture & Circuits
Minor Project - Understanding Computer Systems
-
Built as part of the "Understanding Computer Systems: Architecture & Circuits" course
-
Inspired by real-world applications in embedded systems and digital design
-
Special thanks to educators and the open-source community
Current Version: 1.0.0
Last Updated: November 2025
-
Multi-language support (Hindi, Spanish, etc.)
-
Binary Coded Decimal (BCD) conversion
-
Excess-3 code conversion
-
API documentation and REST endpoints
-
Performance metrics and benchmarking
-
Integration with popular IDEs
Gray code is crucial in digital systems because:
-
Single Bit Changes: Only one bit changes between consecutive values
-
Error Reduction: Minimizes errors in mechanical/optical encoders
-
Glitch Prevention: Eliminates hazards in asynchronous circuits
-
Karnaugh Maps: Simplifies Boolean logic minimization
-
Genetic Algorithms: Used in optimization problems
⭐ Star this repository if you find it helpful!
Made with ❤️ by Adil Mahajan
---
Copyright (c) 2025 Adil Mahajan
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.