◄ WORLD V · SONNY 5DART 483 · a helldive at the net

THE THUMB permutation inward — a 16-bit encoding of a 32-bit machine

Most of this batch widens; Thumb narrows. ARM’s Thumb instruction set (1994) encodes the most common 32-bit operations in just 16 bits each, halving code size for memory- and bus-constrained systems — the same machine, a denser encoding. It is a permutation inward: not a wider word, but a compressed one, decoded back to full 32-bit operations at runtime. Thumb-2 later mixed 16- and 32-bit encodings freely. It is the reminder that the word-size lineage runs both ways — sometimes the win is fewer bits, not more.

THE TECHNIQUE 16-bit encoding of common 32-bit ops — half the code size

The demo shows the encoding widths — a Thumb instruction is 16 bits, an ARM instruction 32, a 2× density: live demo


HISTORY & CREDIT ARM Thumb · 1994

“Progress means wider.” — Thumb went narrower, halving code size by encoding the same ops in 16 bits. cited

the encoding · common 32-bit ARM ops encoded in 16 bits — half the bytes.
the decode · expanded to full 32-bit operations at runtime — same machine, denser code.
1994 / 2003 · ARM Thumb; Thumb-2 later mixed 16- and 32-bit freely.

A machine’s own instructions folded into half the bits — the lineage running inward for once. density

RECOMMEND FOR I-13 the halved encoding, on the compiler

On the canonical compiler, a Thumb instruction is 16 bits to ARM’s 32 — exactly half:

$ i13 run ln_thumb.i13 # encoding widths RUN OK · 16 step(s) · peak stack 3 · call depth 0 arm_bits = 32 thumb_bits = 16 halved = 1 density_2x = 1
Recommend as a NULL — a code-density encoding. Thumb is a compressed encoding of the same operations (B44) that saves space (B40) — a representation choice, not a new invariant. NULL — the batch’s inward step: the word-size lineage narrows as well as widens, and the win is sometimes fewer bits.