A number, eight small lights

Pocket Binary Lantern

See how eight on-or-off positions can hold any whole number from 0 to 255.

Use digits 0–9, from 0 to 255. Leading zeros and surrounding whitespace are OK. No signs, fractions or spaces between digits.

42in decimal

Weights, left to right: largest (most significant bit) to smallest.

  1. 1280OFF
  2. 640OFF
  3. 321ON
  4. 160OFF
  5. 81ON
  6. 40OFF
  7. 21ON
  8. 10OFF

32 + 8 + 2 = 42

Each lit lamp is a 1 and contributes the weight above it. Each unlit lamp is a 0 and contributes nothing. Add the lit weights to get the decimal number. The eight digits, read left to right, are its binary representation.

Lamps are a visual metaphor, not an electronics simulation. Nothing is sent or saved.