encoding · level 5

Binary, Octal, Base32 & Base58

One bit at a time.

150–200 XP

Binary, Octal, Base32 & Base58

Every encoding we've seen so far represents bytes in a different base. Let's finish the tour.

Analogy

Picture a carpenter with several rulers in their toolbox: inches, centimetres, "hands" for measuring horses, and "cubits" for measuring medieval stonework. The beam they're measuring is one fixed length; what changes is the ruler they read it against. Each base — binary, octal, hex, base32, base58 — is just a different ruler applied to the same underlying bytes, chosen because it's the most convenient for whatever the carpenter is building (wallet addresses to write by hand, file permissions on Unix, one-tap codes for a phone keypad).

Binary (base 2)

One bit per digit. A byte is 8 bits. This is how everything is actually stored.

Octal (base 8)

Three bits per digit. Still shows up in Unix file permissions: chmod 755 uses octal.

Base32 (RFC 4648)

Five bits per character. Used by TOTP (Google Authenticator) because base32 strings are case-insensitive and easier to type on a phone than Base64.

Base58 (Bitcoin)

Alphabet is Base64 minus characters that look similar: no 0, no O, no I, no l. Also drops + and /. Perfect for writing down wallet addresses by hand.

Hard mode

Finish the main challenge, then try Hard Mode with Base58 instead of binary.