ByteToDecimal is a game designed to help students practice converting eight-bit (one byte) binary numbers to decimal values. Written in Python 3.1, it is a simple console application which runs in a DOS window.
- Generates random eight-bit (one byte) binary numbers
- User can set the number of bits which should be set to a value of "1" (from 1 to 8)
- Displays correct answer after user enters his/her answer
- Percentage of correct answers is displayed
- Percentage statistics can be reset
When prompted for the decimal equivalent of the binary value, enter one of the following:
- the equivalent decimal value
- 'n' to generate a new byte
- 'o' to change the number of ones in the binary value and generate a new binary value
- 'c' to reset the statistics
- 'q' to quit
The button below will open the ByteToDecimal source code in a new browser window. From there, it can be saved to your computer.
The source code can be run directly if Python 3 is installed on your computer, but the file extension will need to be changed from ".txt" to ".py". Python can be downloaded from www.python.org.