Reverse the bits of a number and you get its bit-reversal permutation index — 000101 becomes 101000. This is not idle: the Fast Fourier Transform leaves its outputs in exactly this scrambled order, and undoing it is a bit-reversal. The simplest form peels the low bit and shifts it onto an accumulator; the fast forms swap bit-groups in a butterfly (like the-round-up cascade in reverse). It is a small involution — reverse twice and you are home — and it is the reindexing at the seam of nearly every FFT implementation.
The demo reverses the low 6 bits of 5 (000101) to get 40 (101000), peeling one bit per step onto an accumulator: live demo
“Bit reversal is a curiosity.” — it is the exact index permutation the FFT produces and must undo; every radix-2 transform depends on it. cited
The bits read back to front — a self-inverse permutation, and the hinge of every radix-2 FFT. resource / self-inverse
On the canonical compiler, reversing the low 6 bits of 5 (000101) yields 40 (101000):