Before discussing how you could memorize a table of ASCII characters and numeric values, I should say a little about why you might do so.
One reason is simply for the challenge. It’s more doable than it may sound.
It’s also useful information, though it’s debatable whether it’s worth memorizing. YMMV. There was a time early in my career when I spent a lot of time staring at a hex editor, and it definitely would have been useful to know then. I still need to look up ASCII values occasionally, though not as often.
One step in the process of memorizing the ASCII table is to associate an image with each ASCII character. This is useful by itself without learning the ASCII values of the characters. You could memorize strong passwords, for example, by linking together the images associated with each character.
I’ll only consider printable characters in this post.
ASCII landmarks
It’s very handy to know that the ASCII code for the number 0 is 48 and that the digits codes are in order. So the ASCII code for the digit d is d+48.
Wouldn’t it have been easier if the digits started at a location ending in zero? They do, in hexadecimal: digits start at 0x30.
Similarly, capital letters start at 65 (or 0x41). So the nth capital letter starts at n+64 (or n+0x40).
Lower case letters start at 97 (0x61), and so the nth lower case letter starts at n+96 (or n+0x60).
Incidentally, you’ll sometimes see software that sorts capital letters before lower case letters. The software is probably simply sorting by ASCII value.
In short, if you know the ASCII values of 0, A, and a then you can calculate the values of all digits and letters.
Memory pegs
You can create images for each ASCII character based on three things you may already know, and which are worth learning if you don’t.
Letters
One is the NATO phonetic alphabet: Alpha, Bravo, Charlie, Delta, …. If you know the NATO alphabet then you already have an image for each letter.
If you want to memorize a strong password, something like u\#mC_cNJ$o
, then you need to distinguish upper and lower case letters. One way to do this would be to memorize two variations on each NATO word, one large and one small. For example, you might split the word Charlie into Charlie Chaplin for capital C and Charlie Brown for lower case c. For another, you might split golf into golf cart for G and golf ball for g.
Digits
The most common way to memorize digits is to encode them as words using the Major system. Zero is associated with the S sound, one is associated with the T sound, two is associated with the N sound, etc. See the preceding link for details.
You should come up with your own pegs that work for you, but here’s an example where each peg is a spice.
- cilantro
- turmeric
- nutmeg
- mustard
- rosemary
- lemon
- chili powder
- cayenne pepper
- vanilla
- peppermint.
Your pegs don’t need to be thematically related but I thought it would be fun to create a list based on spices. Maybe the association with various tastes would make your mnemonics more memorable.
Symbols
As with letters and digits, we can appeal to prior art to come up with images. Hacker slang associates a word with each symbol: bang for !, rabbit ears for “, splat for *, etc.
You might start with hacker slang and modify it to suit your taste.
Code values
Using the landmarks mentioned above, you could calculate the ASCII codes for any letter or digit. But if you want to associate letters and digits with their ASCII values more quickly, you need to directly associate each symbol directly with its value. Even if you don’t do this with letters and digits, you have to do it with other symbols because there’s no way to calculate the ASCII value of * or %, for example.
The most common technique for memorizing a numbered list is to memorize a set of pegs for each digit, then associate each list item with its number.
Creating and memorizing pegs for the numbers 1 through 128 is a lot of work, but it’s reusable. If you go to the effort, you can use it for memorizing a lot more than the ASCII table. For example, you could use it to memorize chemical elements.
If your peg for 42 is rain, you can imagine water balloons raining down and splattering on your driveway. That links the number 42 with the symbol * whose hacker slang is splat.
For another example, 94 is the ASCII value of caret (^), sometimes called carrot in hacker slang. You could a bear (94) standing up and eating a carrot like Bugs Bunny.
Update: What if you’d like to memorize Unicode?
“Lower case letters start at 97 (0x61), and so the nth lower case letter starts at n+97 (or n+0x60)”
Do you not mean “lower case letter starts at n+96”?
Wonderful blog, incidentally.
Yes, thanks. I’m used to thinking about this in hex where it’s easier. :)
This was much easier when Model 33 ASR Teletypes with punched paper tape were a thibg. You could just look at the tape.