On the topic of rendering numbers on computers, don't forget systems used for compression.
Simple and popular is the Golomb-Rice code. I'll illustrate it by encoding 53 using the Golomb-Rice code with parameter 8 = 2
3.
53 = 6*8 + 5.
53 = 1111110 101
This is 6 written in unary (with a 0 appended as delimiter) followed by the remainder 5 in 3 bits of binary. Using the Golomb-Rice code with parameter 16, the rendered token ends with 4 bits of binary:
53 = 3*16 + 5.
53 = 1110 0101
The Golomb-Rice provides optimal compaction when the non-negative integers to be encoded follow an exponential distribution of known parameter.
Related to that code is the Elias gamma code, useful for a certain power-law distribution, or for an exponential of unknown parameter. This code is used to encode
positive integers, zero disallowed. An elegant way to implement (or define by example) the Elias gamma code is that the first 1 bit will always be in the middle of the code word. Here are the first several integers encoded with that code
1 = 1
2 = 010
3 = 011
4 = 00100
5 = 00101
6 = 00110
7 = 00111
8 = 0001000
9 = 0001001
Ordinary binary! except for the leading zeros.
The Golomb-Rice code above used the following unary encoding of the non-negative integers:
0 = 0
1 = 10
2 = 110
3 = 1110
4 = 11110
Variants are possible, e.g.
0 = 1
1 = 00
2 = 010
3 = 0110
4 = 01110
This variant can be used for robustness in the presence of errors. Note that in this encoding every code word is a palindrome. Thus the decoding is the same in either direction.
This same idea adapts to the Elias gamma code also! Simply interleave the significand bits into the palindromic bits.