ASCII starts with 32 non-printable characters called control characters. Typically you may input these on a terminal by pressing the Control/Ctrl key in combination with a corresponding key.
For example, ANSI art authors may be familiar with entering ANSI escape seqences, so called because they start with the ESC
charater, which would be entered by pressing Ctrl
& [
.
ASCII is encoded in 7 bits, meaning we can easily show all the ASCII characters in a 4 column table. The first two bits increment on each new column. The remaining 5 bits make up the remainder of the binary representation of the ASCII character.
The following table clearly shows the correlation between the control characters and the Ctrl
key input combinations:
00 | 01 | 10 | 11 | |
---|---|---|---|---|
NUL | Spc | @ | ` | 00000 |
SOH | ! | A | a | 00001 |
STX | " | B | b | 00010 |
ETX | # | C | c | 00011 |
EOT | $ | D | d | 00100 |
ENQ | % | E | e | 00101 |
ACK | & | F | f | 00110 |
BEL | ' | G | g | 00111 |
BS | ( | H | h | 01000 |
TAB | ) | I | i | 01001 |
LF | * | J | j | 01010 |
VT | + | K | k | 01011 |
FF | L | l | 01100 | |
CR | - | M | m | 01101 |
SO | . | N | n | 01110 |
SI | / | O | o | 01111 |
DLE | 0 | P | p | 10000 |
DC1 | 1 | Q | q | 10001 |
DC2 | 2 | R | r | 10010 |
DC3 | 3 | S | s | 10011 |
DC4 | 4 | T | t | 10100 |
NAK | 5 | U | u | 10101 |
SYN | 6 | V | v | 10110 |
ETB | 7 | W | w | 10111 |
CAN | 8 | X | x | 11000 |
EM | 9 | Y | y | 11001 |
SUB | : | Z | z | 11010 |
ESC | ; | [ | { | 11011 |
FS | < | \ | | | 11100 |
GS | = | ] | } | 11101 |
RS | > | ~ | 11110 | |
US | ? | _ | DEL | 11111 |
Sources: