The decimal-to-binary game introduces people that are not too familiar with IT and how computers work in a playful way to the binary numeral system. The idea to implement this game in JavaScript came up during a visit to the Museum of Technology in Berlin. It can be played there as well.

Give it a try!

Your browser must allow JavaScript to run the game.

This is how it works

The goal of the game is to reach the target number (in decimal) by flipping the bits on or off. The plus and minus button exists only to aid you and decreases or increases the target number by 1. The state of the bits would be changed accordingly. If the target number has been reached, a new one is generated automatically.

Technical details


The game has been implemented with React and Redux. The state container Redux has been used here. By doing so the complete state of the application is stored at a central place and is decoupled from the UI as much as possible.

Building process and auxillary tools

To play the game in older browsers, Babel has been used to convert ECMAScript 6 to ECMAScript 5. In addition to that, Hot Module Replacement is used so that changes to the code are reloaded automatically and applied in the browser directly. Building and packaging is done by using webpack. The source code is available on Github under the AGPL license.