The original ASCII table makes most sense when viewed in 4 columns with 32 entries each
The first column contains so called control characters. They are not meant to be printed but are used to control transmission of data. Most of them lost their original meaning however. They don't really have a visual representation and are named using a two- or three-letter code. The few remaining meaningful characters are tab and the two line break characters.
The second column contains space, most punctuation characters and the decimal digits.
The digits are placed in the middle of the column on purpose.
This positioning is chosen that the rightmost 4 binary digits
and the rightmost hexadecimal digit equal the decimal digit.
This allows for a very simple conversion between the ASCII symbol and the integer it represents.
It also makes it easier to memorize digits. If you need the ASCII code for a digit,
you simply append it to a 3
to get the appropriate hexadecimal code of it,
or you append the binary representation of the number to 011
.
The third and fourth columns mainly contain the letters.
The letters are positioned in a way that with the change of a single bit you can change between uppercase and lowercase.
The positioning is chosen to match "nice" binary numbers, similar to the digits from column 2.
For letters you convert the letter to a 5 digit binary number
(a → 1 → 00001,b → 2 → 00010,...)
and append the 5 binary digits to 10
for uppercase and 11
for lowercase.
A special case is the last one, which again is a control character.
It's the DEL character.
The reason it is there dates back to punch cards and paper tape.
In cards and tapes you would set a 1 by punching a hole in the appropriate location.
If you make a mistake, you can simply punch all holes of a row,
and the computer would ignore it.
This allows you to convert every character into DEL and thus correct mistakes
without the need to physically cut and tape cards/tape.
hex | binary | char | hex | binary | char | hex | binary | char | hex | binary | char | |||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
00 | 0000000 | NUL | 20 | 0100000 | 40 | 1000000 | @ | 60 | 1100000 | ` | ||||
01 | 0000001 | SOH | 21 | 0100001 | ! | 41 | 1000001 | A | 61 | 1100001 | a | |||
02 | 0000010 | STX | 22 | 0100010 | " | 42 | 1000010 | B | 62 | 1100010 | b | |||
03 | 0000011 | ETX | 23 | 0100011 | # | 43 | 1000011 | C | 63 | 1100011 | c | |||
04 | 0000100 | EOT | 24 | 0100100 | $ | 44 | 1000100 | D | 64 | 1100100 | d | |||
05 | 0000101 | ENQ | 25 | 0100101 | % | 45 | 1000101 | E | 65 | 1100101 | e | |||
06 | 0000110 | ACK | 26 | 0100110 | & | 46 | 1000110 | F | 66 | 1100110 | f | |||
07 | 0000111 | BEL | 27 | 0100111 | ' | 47 | 1000111 | G | 67 | 1100111 | g | |||
08 | 0001000 | BS | 28 | 0101000 | ( | 48 | 1001000 | H | 68 | 1101000 | h | |||
09 | 0001001 | HT | 29 | 0101001 | ) | 49 | 1001001 | I | 69 | 1101001 | i | |||
0a | 0001010 | LF | 2a | 0101010 | * | 4a | 1001010 | J | 6a | 1101010 | j | |||
0b | 0001011 | VT | 2b | 0101011 | + | 4b | 1001011 | K | 6b | 1101011 | k | |||
0c | 0001100 | FF | 2c | 0101100 | , | 4c | 1001100 | L | 6c | 1101100 | l | |||
0d | 0001101 | CR | 2d | 0101101 | - | 4d | 1001101 | M | 6d | 1101101 | m | |||
0e | 0001110 | SO | 2e | 0101110 | . | 4e | 1001110 | N | 6e | 1101110 | n | |||
0f | 0001111 | SXI | 2f | 0101111 | / | 4f | 1001111 | O | 6f | 1101111 | o | |||
10 | 0010000 | DLE | 30 | 0110000 | 0 | 50 | 1010000 | P | 70 | 1110000 | p | |||
11 | 0010001 | DC1 | 31 | 0110001 | 1 | 51 | 1010001 | Q | 71 | 1110001 | q | |||
12 | 0010010 | DC2 | 32 | 0110010 | 2 | 52 | 1010010 | R | 72 | 1110010 | r | |||
13 | 0010011 | DC3 | 33 | 0110011 | 3 | 53 | 1010011 | S | 73 | 1110011 | s | |||
14 | 0010100 | DC4 | 34 | 0110100 | 4 | 54 | 1010100 | T | 74 | 1110100 | t | |||
15 | 0010101 | NAK | 35 | 0110101 | 5 | 55 | 1010101 | U | 75 | 1110101 | u | |||
16 | 0010110 | SYN | 36 | 0110110 | 6 | 56 | 1010110 | V | 76 | 1110110 | v | |||
17 | 0010111 | ETB | 37 | 0110111 | 7 | 57 | 1010111 | W | 77 | 1110111 | w | |||
18 | 0011000 | CAN | 38 | 0111000 | 8 | 58 | 1011000 | X | 78 | 1111000 | x | |||
19 | 0011001 | EM | 39 | 0111001 | 9 | 59 | 1011001 | Y | 79 | 1111001 | y | |||
1a | 0011010 | SUB | 3a | 0111010 | : | 5a | 1011010 | Z | 7a | 1111010 | z | |||
1b | 0011011 | ESC | 3b | 0111011 | ; | 5b | 1011011 | [ | 7b | 1111011 | { | |||
1c | 0011100 | FS | 3c | 0111100 | < | 5c | 1011100 | \ | 7c | 1111100 | | | |||
1d | 0011101 | GS | 3d | 0111101 | = | 5d | 1011101 | ] | 7d | 1111101 | } | |||
1e | 0011110 | RS | 3e | 0111110 | > | 5e | 1011110 | ^ | 7e | 1111110 | ~ | |||
1f | 0011111 | US | 3f | 0111111 | ? | 5f | 1011111 | _ | 7f | 1111111 | DEL |