
ASCII is a character encoding based on the English alphabet. ASCII codes represent text in computers, communications equipment, and other devices that work with text. Most modern character encodings, which support many more characters, have a historical basis in ASCII.
ASCII is, strictly, a seven-bit code, meaning it uses the bit patterns representable with seven binary digits (a range of 0 to 127 decimal) to represent character information. At the time ASCII was introduced, many computers dealt with eight-bit groups (bytes or, more specifically, octets) as the smallest unit of information; the eighth bit was commonly used as a parity bit for error checking on communication lines or other device-specific functions. Machines which did not use parity typically set the eighth bit to zero.
The first 32 codes (numbers 0-31 decimal) are reserved for control characters: codes originally intended not to carry printable information, but rather to control devices (such as printers) that make use of ASCII, or to provide meta-information about data streams such as those stored on magnetic tape. For example, character 10 represents the "line feed" function (which causes a printer to advance its paper), and character 8 represents 'backspace'.
| Dec | Oct | Hex | Char | Comments |
|---|---|---|---|---|
| 0 | 000 | 00 | CTRL-@ | NUL (Null) when sent to a printer or a terminal, it does nothing (some terminals, however, incorrectly display it as space). |
| 1 | 001 | 01 | CTRL-A | SOH (Start of heading) |
| 2 | 002 | 02 | CTRL-B | STX (Start of text) |
| 3 | 003 | 03 | CTRL-C | ETX (End of text) |
| 4 | 004 | 04 | CTRL-D | EOT (End of transmission) An EOT is often used to initiate other functions, such as releasing circuits, disconnecting terminals, or placing receive terminals in a standby condition. |
| 5 | 005 | 05 | CTRL-E | ENQ (Enquiry) |
| 6 | 006 | 06 | CTRL-F | ACK (Acknowledge) For teleprinters, Acknowledge character (ACK) is a transmission control character transmitted by the receiving station as an affirmative response to the sending station. The ACK function is heavily used in the Automatic Repeat request (ARQ) function. The ACK frames are numbered in coordination with the frames that have been received, and then sent to the transmitter. This allows the transmitter to remain within the window size of the receiver's buffers, and to become aware of any missed frames. |
| 7 | 007 | 07 | CTRL-G | BEL (Bell) When sent to a printer or a terminal, nothing is printed, but an audible signal is emitted instead. Terminal emulator windows often flash briefly to show the user where the alert occurred. |
| 8 | 010 | 08 | CTRL-H | BS (Backspace) |
| 9 | 011 | 09 | CTRL-I | HT (Horizontal tab) |
| 10 | 012 | 0A | CTRL-J | LF (Linefeed) |
| 11 | 013 | 0B | CTRL-K | VT (Vertical tab) |
| 12 | 014 | 0C | CTRL-L | FF (Form feed) |
| 13 | 015 | 0D | CTRL-M | CR (Carriage return) |
| 14 | 016 | 0E | CTRL-N | SO (Shift out) |
| 15 | 017 | 0F | CTRL-O | SI (Shift in) |
| 16 | 020 | 10 | CTRL-P | DLE (Data link escape) |
| 17 | 021 | 11 | CTRL-Q | DC1 (Device Control, X-ON) |
| 18 | 022 | 12 | CTRL-R | DC2 (Device Control) |
| 19 | 023 | 13 | CTRL-S | DC3 (Device Control, X-OFF) |
| 20 | 024 | 14 | CTRL-T | DC4 (Device Control) |
| 21 | 025 | 15 | CTRL-U | NAK (Negative Acknowledge) |
| 22 | 026 | 16 | CTRL-V | SYN (Synchronous idle) |
| 23 | 027 | 17 | CTRL-W | ETB (End transmission blocks) |
| 24 | 030 | 18 | CTRL-X | CAN (Cancel) |
| 25 | 031 | 19 | CTRL-Y | EM (End of medium) |
| 26 | 032 | 1A | CTRL-Z | SUB (substitute) |
| 27 | 033 | 1B | CTRL-[ | ESC (Escape) |
| 28 | 034 | 1C | CTRL- | FS (File separator) |
| 29 | 035 | 1D | CTRL-] | GS (Group separator) |
| 30 | 036 | 1E | CTRL-^ | RS (Record separator) |
| 31 | 037 | 1F | CTRL-_ | US (Unit separator) |
| 32 | 040 | 20 | Space | |
| 33 | 041 | 21 | ! | Exclamation mark |
| 34 | 042 | 22 | " | Double quote |
| 35 | 043 | 23 | # | Hash |
| 36 | 044 | 24 | $ | Dollar |
| 37 | 045 | 25 | % | Percent |
| 38 | 046 | 26 | & | Ampersand |
| 39 | 047 | 27 | ' | Apostrophe |
| 40 | 050 | 28 | ( | Open Parenthesis |
| 41 | 051 | 29 | ) | Close Parenthesis |
| 42 | 052 | 2A | * | Asterisk |
| 43 | 053 | 2B | + | Plus |
| 44 | 054 | 2C | , | Comma |
| 45 | 055 | 2D | - | Minus (hyphen) |
| 46 | 056 | 2E | . | Dot (period) |
| 47 | 057 | 2F | / | Slash (forward-slash) |
| 48 | 060 | 30 | 0 | Digit |
| 49 | 061 | 31 | 1 | Digit |
| 50 | 062 | 32 | 2 | Digit |
| 51 | 063 | 33 | 3 | Digit |
52
|
064
|
34
|
4
|
Digit
|
|
| 53 | 065 | 35 | 5 | Digit |
| 54 | 066 | 36 | 6 | Digit |
| 55 | 067 | 37 | 7 | Digit |
| 56 | 070 | 38 | 8 | Digit |
| 57 | 071 | 39 | 9 | Digit |
| 58 | 072 | 3A | : | Colon |
| 59 | 073 | 3B | ; | Semicolon |
| 60 | 074 | 3C | < | Less than |
| 61 | 075 | 3D | = | Equals |
| 62 | 076 | 3E | > | Greater than |
| 63 | 077 | 3F | ? | Question mark |
| 64 | 100 | 40 | @ | At |
| 65 | 101 | 41 | A | Upper case alphabetic character |
| 66 | 102 | 42 | B | Upper case alphabetic character |
| 67 | 103 | 43 | C | Upper case alphabetic character |
| 68 | 104 | 44 | D | Upper case alphabetic character |
| 69 | 105 | 45 | E | Upper case alphabetic character |
| 70 | 106 | 46 | F | Upper case alphabetic character |
| 71 | 107 | 47 | G | Upper case alphabetic character |
| 72 | 110 | 48 | H | Upper case alphabetic character |
| 73 | 111 | 49 | I | Upper case alphabetic character |
| 74 | 112 | 4A | J | Upper case alphabetic character |
| 75 | 113 | 4B | K | Upper case alphabetic character |
| 76 | 114 | 4C | L | Upper case alphabetic character |
| 77 | 115 | 4D | M | Upper case alphabetic character |
| 78 | 116 | 4E | N | Upper case alphabetic character |
| 79 | 117 | 4F | O | Upper case alphabetic character |
| 80 | 120 | 50 | P | Upper case alphabetic character |
| 81 | 121 | 51 | Q | Upper case alphabetic character |
| 82 | 122 | 52 | R | Upper case alphabetic character |
| 83 | 123 | 53 | S | Upper case alphabetic character |
| 84 | 124 | 54 | T | Upper case alphabetic character |
| 85 | 125 | 55 | U | Upper case alphabetic character |
| 86 | 126 | 56 | V | Upper case alphabetic character |
| 87 | 127 | 57 | W | Upper case alphabetic character |
| 88 | 130 | 58 | X | Upper case alphabetic character |
| 89 | 131 | 59 | Y | Upper case alphabetic character |
| 90 | 132 | 5A | Z | Upper case alphabetic character |
| 91 | 133 | 5B | [ | Open square bracket |
| 92 | 134 | 5C | \ | Backslash |
| 93 | 135 | 5D | ] | Close square bracket |
| 94 | 136 | 5E | ^ | Caret |
| 95 | 137 | 5F | _ | Underscore |
| 96 | 140 | 60 | ` | Back quote |
| 97 | 141 | 61 | a | Lower case alphabetic character |
| 98 | 142 | 62 | b | Lower case alphabetic character |
| 99 | 143 | 63 | c | Lower case alphabetic character |
| 100 | 144 | 64 | d | Lower case alphabetic character |
| 101 | 145 | 65 | e | Lower case alphabetic character |
| 102 | 146 | 66 | f | Lower case alphabetic character |
| 103 | 147 | 67 | g | Lower case alphabetic character |
| 104 | 150 | 68 | h | Lower case alphabetic character |
| 105 | 151 | 69 | i | Lower case alphabetic character |
| 106 | 152 | 6A | j | Lower case alphabetic character |
| 107 | 153 | 6B | k | Lower case alphabetic character |
| 108 | 154 | 6C | l | Lower case alphabetic character |
| 109 | 155 | 6D | m | Lower case alphabetic character |
| 110 | 156 | 6E | n | Lower case alphabetic character |
| 111 | 157 | 6F | o | Lower case alphabetic character |
| 112 | 160 | 70 | p | Lower case alphabetic character |
| 113 | 161 | 71 | q | Lower case alphabetic character |
| 114 | 162 | 72 | r | Lower case alphabetic character |
| 115 | 163 | 73 | s | Lower case alphabetic character |
| 116 | 164 | 74 | t | Lower case alphabetic character |
| 117 | 165 | 75 | u | Lower case alphabetic character |
| 118 | 166 | 76 | v | Lower case alphabetic character |
| 119 | 167 | 77 | w | Lower case alphabetic character |
| 120 | 170 | 78 | x | Lower case alphabetic character |
| 121 | 171 | 79 | y | Lower case alphabetic character |
| 122 | 172 | 7A | z | Lower case alphabetic character |
| 123 | 173 | 7B | { | Open brace |
| 124 | 174 | 7C | | | Vertical bar |
| 125 | 175 | 7D | } | Close brace |
| 126 | 176 | 7E | ~ | Tilde |
| 127 | 177 | 7F | DEL (Delete) |