Bit Flipper

A speed game for binary: a decimal or hex number appears, and you flip the bits (by click or with the keyboard) until they make that number. Ten numbers per run, as fast as you can. Play 8-bit or 16-bit, in decimal or hexadecimal, and beat your best time. Good practice for reading binary, hex and bit masks.

About this tool

What is Bit Flipper?

Bit Flipper is a quick game for anyone who works with binary numbers. A target number is shown in decimal (such as 173) or hexadecimal (such as 0xAD). Below it is a row of bits that are all 0. Flip the bits so that the binary number equals the target. As soon as it matches, the next number appears. Solve ten numbers as fast as you can.

How to play

  1. Choose a mode: 8-bit decimal, 8-bit hex, 16-bit decimal or 16-bit hex.
  2. Press Start. The timer starts with the first number.
  3. Click a bit to flip it between 0 and 1, or press its key: 1–8 for the first row and Q–I for the second row (16-bit modes).
  4. When the bits match the target, the next number appears automatically. The current value is not shown, so you have to work it out yourself.
  5. After ten numbers your time is shown. The best time for each mode is saved.

Strategy

Decimal: subtract powers of two

Learn the place values by heart: 128 64 32 16 8 4 2 1 (and for 16 bits, 32768 16384 8192 4096 2048 1024 512 256). Go from the largest bit to the smallest. If the place value fits into what is left, flip that bit on and subtract it.

Example: 173 → 173 − 128 = 45 → 45 − 32 = 13 → 13 − 8 = 5 → 5 − 4 = 1 → 1 − 1 = 0, so 173 = 128 + 32 + 8 + 4 + 1 = 10101101.

Decimal shortcuts

  • Odd or even: an odd number always has the last bit on.
  • Close to 255 (or 127, 63, …): start from all ones and flip off the difference. 250 = 255 − 5 = 11111111 with 4 and 1 off = 11111010.
  • Multiples of 16: the last four bits are 0. 16 × 11 = 176 → 1011 followed by 0000.

16-bit decimal: split into two bytes

Divide by 256: the quotient is the first row (high byte), and the remainder is the second row (low byte). Learning the multiples of 256 makes this quick: 256, 512, 768, 1024, 1280, 1536, 1792, 2048, …

Example: 1000 = 3 × 256 + 232 → first row 3 = 00000011, second row 232 = 128 + 64 + 32 + 8 = 11101000.

Hexadecimal: one digit is four bits

Every hex digit maps to exactly four bits, so convert one digit at a time with the weights 8 4 2 1: 0xAD → A = 8 + 2 = 1010, D = 8 + 4 + 1 = 1101 → 1010 1101. The bits are grouped in fours on the screen for this reason.

HexBinaryHexBinary
0000081000
1000191001
20010A1010
30011B1011
40100C1100
50101D1101
60110E1110
70111F1111

Playing fast

  • Use the keyboard: keep your fingers on 1–8, and for 16 bits use Q–I on the row right below it.
  • Work out all the bits first, then type them in one go.
  • A mistake costs little: press the same key again to flip the bit back. Use Skip only if you are really stuck, because it adds 10 seconds.

FAQ

Can I give up on a number?

Press Skip to move on. A skipped number adds a 10-second penalty to your time.

Is this useful outside the game?

Yes. Reading bit masks, file permissions (chmod 755), IPv4 subnet masks and color codes all get easier once binary and hex feel natural. To convert numbers exactly, use the Base Number Converter.

Where can I see my past games?

Open Records & history below the game. It shows your best result for each mode and your last 10 games with the date and time. They are saved in this browser only.