8x8 Maze Logo

L26, L27, L80

In the same way we use digits to build numbers, we can use letters to build (really big) numbers if we assign each letter a numeric value. For instance, A=0, B=1, C=2, and so on. This scheme equates each letter with its index in the alphabet, but other schemes are possible.

Because there are only ten digits, we build numbers in base 10. Since there are (in our first scheme) 26 letter-digits, we build our letter-numbers in base 26! We call this L26 — ‘L’ for letter, ‘26’ for the base.

In L26, any string of alphabetic characters is considered a number. Words are numbers!

L26 doesn't include spaces, so a sentence cannot be interpreted as a number. We can get around that by simply adding a space-digit. It can act like a zero and have the initial zero value. Now we have an L27 scheme!

But L26 and L27 provide the same number for “DOG”, “Dog”, and “dog” — they are case-blind! Also, no punctuation or the actual digits. If we want to treat general strings as numbers, we need a larger base!

It takes 52 letter-digits for both upper and lower case. Including the digits 0-9 makes it 62, and the space-digit brings the total to 63. If we just include the period, we end up with a base 64 (which is nice and binary).

But going to base 80 lets us add quite a few punctuation symbols, but isn't as huge as going full ASCII with 128 distinct digits. L80 seems like a nice compromise between a fairly full character set and reasonable hugeness.

The Code

Blog Posts