Skip to content

Binary Decoder Game

Decode five four-bit binary values into decimal before a second mistake ends the run.

Privacy: your files never leave your device. All processing happens locally in your browser.

How to use

  1. 1.Read the four binary digits using place values 8, 4, 2, and 1 from left to right.
  2. 2.Type the decimal result, use Backspace if needed, and press Enter to submit.
  3. 3.Decode 0001, 0011, 0110, 1010, and 1111 before a second mistake to score 1,000.

About Binary Decoder Game

Binary Decoder Game is a five-round base-two practice challenge. Each round shows four binary digits and asks for the corresponding decimal value from 0 through 15. Type the answer, press Enter, and decode all five codes before making two mistakes.

Binary is a positional number system with radix two. Reading from left to right, each new bit doubles the accumulated value and adds either zero or one. For example, 1010 becomes ten: start at zero, process 1 to get one, process 0 to get two, process 1 to get five, and process the final 0 to get ten.

The conversion contract is externally checkable. NIST IR 8354 describes binary digits, base two, and four-bit groupings. MDN independently documents radix-two parsing and confirms that a digit such as 2 is invalid in a binary numeral. The pure decoder accepts only a nonempty string of zeros and ones, then performs the positional accumulation directly.

Eight external golden cases cover 0, 1, 10, 11, 100, 1010, 1111, and 10000. Their decimal results are 0, 1, 2, 3, 4, 10, 15, and 16. Invalid strings such as 102 and the empty string return an invalid numeric result rather than silently decoding a prefix.

The five product rounds are fixed: 0001 equals 1, 0011 equals 3, 0110 equals 6, 1010 equals 10, and 1111 equals 15. Fixed challenges make the complete path and final score reproducible. The game does not claim to be a random test, adaptive assessment, or standardized examination.

Type decimal digits with the keyboard. Answers can contain at most two digits because every challenge fits in the disclosed 0-to-15 range. Backspace or Delete removes the last digit, and Enter submits. Mouse and touch users can use the ten digit buttons and Submit decimal button. There is no pointer-only interaction.

Each correct answer awards 200 points and advances immediately. The clean key 1, 3, 6, 10, 15 finishes all five rounds at exactly 1,000 points. A wrong answer clears the entry but leaves the same code visible. The first mistake is recoverable; a second wrong submission creates a terminal deadlock and disables further progress until Restart.

The isolated test checks all eight external conversions, invalid-digit rejection, five unique round codes, the full five-round completion simulation, the exact 1,000 score, a reachable two-error deadlock, terminal-state freezing, two-digit input, maximum-length protection, deletion, and rejection of nondigit input. The external expected values are declared independently of the decoder function.

The interface uses semantic text and buttons styled with site CSS variables. The binary code is rendered as large monospaced text, and the decimal entry has an accessible label. No canvas, timer, audio, download, account, network request, hardware permission, or server computation is involved; everything runs locally in the browser.

Restart returns to 0001 with an empty answer, zero points, and zero mistakes. A completed best score stays only in localStorage. Double-press Escape for the shared simulated spreadsheet boss screen and repeat the gesture to resume the current code. For adjacent number play, try Number Sequence Quiz, Number Fill-In, Magic Square, or Math Maze.

Methodology & sources

decodeBinary validates a nonempty all-bit string and folds left with value = value×2 + bit. Five immutable four-bit rounds map to 1, 3, 6, 10, and 15. Input accepts at most two decimal digits. Correct submissions add 200 and advance; two wrong submissions deadlock; five correct submissions complete at 1,000.

Frequently asked questions

What decimal range can appear?
The fixed four-bit challenges range from 0001 to 1111, so their answers are between 1 and 15.
How does 1010 become 10?
Its set places are 8 and 2, and 8 + 2 equals 10.
What happens after one wrong answer?
The entry clears and the same code remains available. The run ends only after the second mistake.
Are the codes random?
No. Five fixed codes keep the winning route, failure path, and score reproducible.

Mini Games guides

View all