Skip to content

Allain-afk/BINARY

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Binary Light Bulb Game

Preview

Features

  • Interactive Light Bulbs: Click or tap to toggle virtual light bulbs representing binary digits
  • Real-time Conversions: See instant conversions between binary, decimal, octal, and hexadecimal
  • Detailed Explanations: Each number system includes a detailed explanation panel showing the conversion process
  • Customizable Bits: Add more binary digits as needed for larger numbers
  • Responsive Design: Works seamlessly across desktop and mobile devices
  • Keyboard Navigation: Full keyboard accessibility for all interactions
  • Randomize Function: Generate random binary numbers to test understanding
  • Manual Input: Enter specific values in any number format to see the corresponding representation

Educational Purpose

This game serves as a hands-on learning tool for:

  • Understanding binary number representation
  • Learning conversion techniques between number systems
  • Visualizing the relationship between bits and their decimal values
  • Exploring place value in different number bases
  • Understanding the fundamentals of computer number systems

Technical Implementation

The Binary Light Bulb Game is built using:

  • Pure HTML5, CSS3, and JavaScript
  • CSS animations for interactive feedback
  • Responsive design for all device sizes
  • Accessible markup with ARIA attributes
  • Optimized mobile experience

How to Use

  1. Toggle Bulbs: Click or tap on a light bulb to turn it on (1) or off (0)
  2. Add More Bits: Click the "Add Bulb" button to add more binary digits
  3. Reset: Use the reset button to start over with all bulbs turned off
  4. Randomize: Generate a random binary number to test your understanding
  5. Direct Input: Type a value in any of the number system inputs to see its representation

Installation

No installation required! The game runs directly in the browser.

To run locally:

  1. Clone this repository:
    git clone https://github.com/yourusername/binary-light-bulb-game.git
    
  2. Open index.html in your browser

Browser Compatibility

The Binary Light Bulb Game works on all modern browsers:

  • Chrome (recommended)
  • Firefox
  • Safari
  • Edge

Future Enhancements

  • Additional number systems (binary-coded decimal, etc.)
  • Challenge mode with timed exercises
  • Save and share functionality
  • Advanced operations (addition, subtraction, etc.)

License

MIT License - Feel free to use and modify as needed.

Author

Created as an educational tool for computer science and mathematics students.


Feel free to contribute, report issues, or suggest improvements!

About

Light Bulb Binary Game is an interactive game where new Computer Science students get to learn how counting in binary works.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages