ArticleslgStudy

science

Base32

Base32 is a science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Base32 rather than just read about it. In short: Base32 is binary-to-text encoding based on the base-32 numeral system. It uses an alphabet of 32 digits, each of which represents a different combination of 5 bits (25).

Key takeaways

  • Base32 belongs to science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Base32 to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Base32 from memory before moving on to harder problems.

Reference excerpt

Base32 is binary-to-text encoding based on the base-32 numeral system. It uses an alphabet of 32 digits, each of which represents a different combination of 5 bits (25). Since base32 is not very widely adopted, the question of notation i.e. which characters to use to represent the 32 digits is not as settled as in the case of more well-known numeral systems (such as hexadecimal) even though RFCs and unofficial and de facto standards exist. One way to represent Base32 numbers in human-readable form is using digits 0–9 followed by the twenty-two upper-case letters A–V. However, many other variations are used in different contexts. Historically, Baudot code could be considered a modified (stateful) base32 code. Base32 is often used to represent byte strings.

RFC 4648 encodings The October 2006 proposed Internet standard RFC 4648 documents base16, base32 and base64 encodings. It includes two schemes for base32, but recommends one over the other. It further recommends that regardless of precedent, only the alphabet it defines in its section 6 actually be called base32, and that the other similar alphabet in its section 7 instead be called base32hex. Agreement with those recommendations is not universal. Care needs to be taken when using systems that are called base32, as those systems could be base32 per RFC 4648 §6, or per §7 (possibly disregarding that RFC's deprecation of the simpler name for the latter), or they could be yet another encoding variant, see further below.

Base 32 Encoding per §6 The most widely used base32 alphabet is defined in RFC 4648 §6 and the earlier RFC 3548 (2003). The scheme was originally designed in 2000 by John Myers for SASL/GSSAPI. It uses an alphabet of A–Z, followed by 2–7. The digits 0 and 1 are skipped due to their similarity with the letters O and I (thus "2" has a decimal value of 26). In some circumstances padding is not required or used (the padding can be inferred from the length of the string modulo 8). RFC 4648 states that padding must be used unless the specification of the standard (referring to the RFC) explicitly states otherwise. Excluding padding is useful when using Base32 encoded data in URL tokens or file names where the padding character could pose a problem.

This is an example of a Base32 representation using the previously described 32-character set (IPFS CIDv1 in Base32 upper-case encoding): BAFYBEICZSSCDSBS7FFQZ55ASQDF3SMV6KLCW3GOFSZVWLYARCI47BGF354

Base 32 Encoding with Extended Hex Alphabet per §7 "Extended hex" base 32 or base32hex, another scheme for base 32 per RFC 4648 §7, extends hexadecimal in a more natural way: Its lower half is identical with hexadecimal, and beyond that, base32hex simply continues the alphabet through to the letter V. This scheme was first proposed by Christian Lanctot, a programmer working at Sage software, in a letter to Dr. Dobb's magazine in March 1999 as part of a suggested solution for the Y2K bug. Lanctot referred to it as "Double Hex". The same alphabet was described in 2000 in RFC 2938 under the name "Base-32". RFC 4648, while acknowledging existing use of this version in NSEC3, refers to it as base32hex and discourages referring to it as only "base32". Since this notation uses digits 0–9 followed by consecutive letters of the alphabet, it matches the digits used by the JavaScript parseInt() function and the Python int() constructor when a base larger than 10 (such as 16 or 32) is specified. It also retains hexadecimal's property of preserving bitwise sort order of the represented data, unlike RFC 4648's §6 base32, or base64. Unlike many other base 32 notation systems, base32hex digits beyond 9 are contiguous. However, its set of digits includes characters that may visually conflict. With many fonts it is possible to visually distinguish between similar looking characters like (0, O) and (1, I), but in other fonts this may be difficult and thus they may be unsuitable for rendering base32 character sequences. This is especially true in a notation system that is only expressing numbers, when the context English usually provides is not present. The choice of font is controlled by neither notation nor encoding, yet base32hex makes no attempt to compensate for the shortcomings of affected fonts.

Alternative encoding schemes Changing the Base32 alphabet, all alternative standards have similar combinations of alphanumeric symbols.

z-base-32 z-base-32 is a Base32 encoding designed by Zooko Wilcox-O'Hearn to be easier for human use and more compact. It includes 1, 8 and 9 but excludes l, v, 0 and 2. It also permutes the alphabet so that the easier characters are the ones that occur more frequently. It compactly encodes bitstrings whose length in bits is not a multiple of 8 and omits trailing padding characters. z-base-32 was used in the Mnet open source project, and is currently used in Phil Zimmermann's ZRTP protocol, and in the Tahoe-LAFS open source project.

Crockford's Base32 Another alternative design for Base32 is created by Douglas Crockford, who proposes using additional characters for a mod-37 checksum. It excludes the letters I, L, and O to avoid confusion with digits. It also excludes the letter U to reduce the likelihood of accidental obscenity. Libraries to encode binary data in Crockford's Base32 are available in a variety of languages.

Electrologica An earlier form of base 32 notation was used by programmers working on the Electrologica X1 to represent machine addresses. The "digits" were represented as decimal numbers from 0 to 31. For example, 12-16 would represent the machine address 400 (= 12 × 32 + 16).

Geohash In the Geohash algorithm, a modified base32 representation is used to represent latitude and longitude values in one (bit-interlaced) positive integer. This representation uses all decimal digits (0–9) and almost all of the lower case alphabet, except letters "a", "i", "l", "o", as shown by the following character map:

Turing's encoding In approximately 1950, Alan Turing wrote software requirements for the Manchester Mark I computing system.

A transcription of Turing's manual for the Mark I is available on archive.org. The University of Manchester's archive site commemorating 60 years of computing has a table of the base 32 encoding that Turing used. The table and the accompanying explanation also appear in the manual. Another account of this period in Turing's life appears on his biography page under Early computers and the Turing test.

… excerpt ends here. Continue reading the full article.

Worked examples

Example 1 — a first encounter with Base32

Start with the simplest possible case. Write down what Base32 claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Base32 before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Base32 ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Base32

In research
Base32 appears in science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Base32 in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Base32 is common in secondary-school and first-year university syllabi. It links to neighbouring topics Binary-to-text encoding formats, Power-of-two numeral systems, so understanding it makes those chapters shorter.
In everyday life
Look for Base32 outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Base32” →

How to study Base32 in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Base32 means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Base32 out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Base32 in simple terms?

Base32 is binary-to-text encoding based on the base-32 numeral system. It uses an alphabet of 32 digits, each of which represents a different combination of 5 bits (25).

Why does Base32 matter?

Because it connects several science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Base32?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Base32.

Tags

  • Binary-to-text encoding formats
  • Power-of-two numeral systems

Keep exploring