base-52 number system conversion

1.5k Views Asked by At

I'm trying to understand number systems. Consider a base-52 number system consisted of following symbols as digits:

abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ

synonymous to 0123456789 digits in the base-10 number system.

how would we convert 100 from base-10 to base-52 ?

3

There are 3 best solutions below

0
On BEST ANSWER

Just as the decimal number $100$ denotes $1 \cdot 10^2 + 0 \cdot 10^1 + 0 \cdot 10^0$, we can express $100$ in base $52$ by writing it as a linear combination of powers of $52$ (all of whose coefficients are between $0$ and $52 - 1 = 51$). Dividing by $52$, we see that $100 = 1 \cdot 52^1 + 48 \cdot 52^0$, so the base $52$-representation has the $48$th symbol (counting $a$ as the $0$th), namely $\texttt{W}$, in the rightmost place, and the $1$st symbol, namely $\texttt{b}$, in the second-rightmost place. Thus, using subscripts to denote bases for emphasis, we have $$\boxed{100_{10} = {\texttt{bW}}_{52}} .$$

0
On

An answer using example: To convert 141548 to base 52.

Divide by 52 and write remainder in terms of the given digits:

$$\begin{array}{rlc} 141548\div 52 &= 2722\ rem\ 4& 4\to e\\ 2722 \div 52 &= 52\ rem\ 18&18\to s\\ 52\div 52&=1\ rem\ 0&0\to a\\ 1\div 52&=0\ rem\ 1&1\to b \end{array}$$ Hence the number is written as "base".

This says that $141548=b\times 52^3+a\times 52^2+s\times 52+e=((b52+a)52+s)52+e$.

3
On

Here's the third recommendation of counting in base-52:

0, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, a0, aa, ab, ac, ad, ae, af, ag, ah, ai, aj, ak, al, am, an, ao, ap, aq, ar, as, at, au, av, aw, ax, ay, az, aA, aB, aC, aD, aE, aF, aG, aH, aI, aJ, aK, aL, aM, aN, aO, aP, aQ, aR, aS, aT, aU, aV, aW, aX, aY, b0, ba, ...

(The zero's do need a font that puts a diagonal line through them. The zero's flag the group counts and the zero's allow for a sensible addition operation.)

Then

(52 + 48) base-10 = (a0 + V) base-52 = aV base-52

And for instance

(54 + 25) base-10 = (52 + 27) base-10 = (a0 + A) base-52 = aA base-52 .