# ASCII Table [[ASCII]] characters based on the [[1967]] standard. See also: [[Codepage-1252]], [[ANSI Table]] ## Control Characters | Name | Abbr | Escape | Caret | Binary | Dec | Oct | Hex | Glyph | | ---------------------------- | ---- | ------ | ----- | -------- | --- | --- | --- | ----- | | Null | NUL | `\0` | `^@` | 000 0000 | 0 | 000 | 00 | ␀ | | Start of Heading | SOH | | `^A` | 000 0001 | 1 | 001 | 01 | ␁ | | Start of Text | STX | | `^B` | 000 0010 | 2 | 002 | 02 | ␂ | | End of Text | ETX | | `^C` | 000 0011 | 3 | 003 | 03 | ␃ | | End of Transmission | EOT | | `^D` | 000 0100 | 4 | 004 | 04 | ␄ | | Enquiry | ENQ | | `^E` | 000 0101 | 5 | 005 | 05 | ␅ | | Acknowledgement | ACK | | `^F` | 000 0110 | 6 | 006 | 06 | ␆ | | Bell | BEL | `\a` | `^G` | 000 0111 | 7 | 007 | 07 | ␇ | | Backspace | BS | `\b` | `^H` | 000 1000 | 8 | 010 | 08 | ␈ | | Horizontal Tab | HT | `\t` | `^I` | 000 1001 | 9 | 011 | 09 | ␉ | | Line Feed | LF | `\n` | `^J` | 000 1010 | 10 | 012 | 0a | ␊ | | Vertical Tab | VT | `\v` | `^K` | 000 1011 | 11 | 013 | 0b | ␋ | | Form Feed | FF | `\f` | `^L` | 000 1100 | 12 | 014 | 0c | ␌ | | Carriage Return | CR | `\r` | `^M` | 000 1101 | 13 | 015 | 0d | ␍ | | Shift Out | SO | | `^N` | 000 1110 | 14 | 016 | 0e | ␎ | | Shift In | SI | | `^O` | 000 1111 | 15 | 017 | 0f | ␏ | | Data Link Escape | DLE | | `^P` | 001 0000 | 16 | 020 | 10 | ␐ | | Device Control 1 | DC1 | | `^Q` | 001 0001 | 17 | 021 | 11 | ␑ | | Device Control 2 | DC2 | | `^R` | 001 0010 | 18 | 022 | 12 | ␒ | | Device Control 3 | DC3 | | `^S` | 001 0011 | 19 | 023 | 13 | ␓ | | Device Control 4 | DC4 | | `^T` | 001 0100 | 20 | 024 | 14 | ␔ | | Negative<br>Acknowledgement | NAK | | `^U` | 001 0101 | 21 | 025 | 15 | ␕ | | Synchronous Idle | SYN | | `^V` | 001 0110 | 22 | 026 | 16 | ␖ | | End of<br>Transmission Block | ETB | | `^W` | 001 0111 | 23 | 027 | 17 | ␗ | | Cancel | CAN | | `^X` | 001 1000 | 24 | 030 | 18 | ␘ | | End of Medium | EM | | `^Y` | 001 1001 | 25 | 031 | 19 | ␙ | | Substitute | SUB | | `^Z` | 001 1010 | 26 | 032 | 1a | ␚ | | Escape | ESC | `\e` | `^[` | 001 1011 | 27 | 033 | 1b | ␛ | | File Separator | FS | | `^\` | 001 1100 | 28 | 034 | 1c | ␜ | | Group Separator | GS | | `^]` | 001 1101 | 29 | 035 | 1d | ␝ | | Record Separator | RS | | `^^` | 001 1110 | 30 | 036 | 1e | ␞ | | Unit Separator | US | | `^_` | 001 1111 | 31 | 037 | 1f | ␟ | ### ESC Escape Code As for `ESC`, the `\e` is not part of the [[C]] standard but is recognized by most compilers, interpreters, and similar parsers. Where `\e` is not recognized, a [[Hexadecimal]] (like `\x1b`) or [[Octal]] notation (like `\033`) must be used instead. See [[ANSI - Control Codes#Alternative Encodings for Escape]] for more. ### EOT as EOF on POSIX The `EOT` character is used by Unix-style terminal drivers and some programs to indicate the end of the file or user input. The user can invoke these by pressing **control-d** (the [[#Caret Notation]] for `EOT`). ### SUB as EOF on DOS The `SUB` character is used by [[CP-M]]'s file system to indicate the end of a file. Some [[DOS]] and [[Windows]] programs inherited this quirk from [[QDOS]]. [[MS-DOS]] programs like [[COMMAND.COM]] and [[EDLIN]] treat the user pressing **control-z** (the [[#Caret Notation]] for `SUB`) as an end of file signal. ### Delete As originally envisioned, the `DEL` character was the perfect mirror to the `SPC` character. It just moved the type head for the teletype back one character. But as a non-printable character that may behave differently in each situation, it is often considered a control character. It also forms the upper bound of the 7-bit ASCII range. | Name | Abbr | Escape | Binary | Octal | Decimal | Hex | Glyph | | ------ | ---- | ------ | -------- | ----- | ------- | --- | ----- | | Delete | DEL | `\d` | 111 1111 | 177 | 127 | 7F | ␡ | ### Caret Notation Caret Notation refers to a way of representing, and in some cases inputting, non-printable characters into a terminal or program. Typically the initial `^` indicates holding the control key while pressing the key associated with the second symbol. This works, for example, in [[Vim]]/[[NeoVim]] in insert mode after first pressing **control-V**. In the standard scheme the value `1` is paired with letter `A`. So to insert a `BEL` character, you would press **control-G**. Many [[Terminal Emulator|Terminal Emulators]] will sound a tone or flash when that character is sent to it. ## Printable Characters Some of the names specified in the [[1967]] standards document are no longer in common use. Modern names are included in parentheses. | Name | Binary | Octal | Decimal | Hex | Glyph | | ------------------------------ | -------- | ----- | ------- | --- | ----- | | Space (SPC) | 010 0000 | 040 | 32 | 20 | | | Exclamation Point | 010 0001 | 041 | 33 | 21 | ! | | Quotation Marks (Double Quote) | 010 0010 | 042 | 34 | 22 | \" | | Number Sign | 010 0011 | 043 | 35 | 23 | # | | Dollar Sign | 010 0100 | 044 | 36 | 24 | $ | | Percent | 010 0101 | 045 | 37 | 25 | % | | Ampersand | 010 0110 | 046 | 38 | 26 | & | | Apostrophe (Single Quote) | 010 0111 | 047 | 39 | 27 | ' | | Opening Parentheses | 010 1000 | 050 | 40 | 28 | ( | | Closing Parentheses | 010 1001 | 051 | 41 | 29 | ) | | Asterisk | 010 1010 | 052 | 42 | 2a | \* | | Plus | 010 1011 | 053 | 43 | 2b | + | | Comma | 010 1100 | 054 | 44 | 2c | , | | Hyphen (Dash) | 010 1101 | 055 | 45 | 2d | - | | Period | 010 1110 | 056 | 46 | 2e | . | | Slant (Forward Slash) | 010 1111 | 057 | 47 | 2f | / | | Zero | 011 0000 | 060 | 48 | 30 | 0 | | One | 011 0001 | 061 | 49 | 31 | 1 | | Two | 011 0010 | 062 | 50 | 32 | 2 | | Three | 011 0011 | 063 | 51 | 33 | 3 | | Four | 011 0100 | 064 | 52 | 34 | 4 | | Five | 011 0101 | 065 | 53 | 35 | 5 | | Six | 011 0110 | 066 | 54 | 36 | 6 | | Seven | 011 0111 | 067 | 55 | 37 | 7 | | Eight | 011 1000 | 070 | 56 | 38 | 8 | | Nine | 011 1001 | 071 | 57 | 39 | 9 | | Colon | 011 1010 | 072 | 58 | 3a | : | | Semicolon | 011 1011 | 073 | 59 | 3b | ; | | Less Than | 011 1100 | 074 | 60 | 3c | < | | Equals | 011 1101 | 075 | 61 | 3d | = | | Greater Than | 011 1110 | 076 | 62 | 3e | > | | Question Mark | 011 1111 | 077 | 63 | 3f | ? | | Commercial At (At Sign) | 100 0000 | 100 | 64 | 40 | @ | | | 100 0001 | 101 | 65 | 41 | A | | | 100 0010 | 102 | 66 | 42 | B | | | 100 0011 | 103 | 67 | 43 | C | | | 100 0100 | 104 | 68 | 44 | D | | | 100 0101 | 105 | 69 | 45 | E | | | 100 0110 | 106 | 70 | 46 | F | | | 100 0111 | 107 | 71 | 47 | G | | | 100 1000 | 110 | 72 | 48 | H | | | 100 1001 | 111 | 73 | 49 | I | | | 100 1010 | 112 | 74 | 4a | J | | | 100 1011 | 113 | 75 | 4b | K | | | 100 1100 | 114 | 76 | 4c | L | | | 100 1101 | 115 | 77 | 4d | M | | | 100 1110 | 116 | 78 | 4e | N | | | 100 1111 | 117 | 79 | 4f | O | | | 101 0000 | 120 | 80 | 50 | P | | | 101 0001 | 121 | 81 | 51 | Q | | | 101 0010 | 122 | 82 | 52 | R | | | 101 0011 | 123 | 83 | 53 | S | | | 101 0100 | 124 | 84 | 54 | T | | | 101 0101 | 125 | 85 | 55 | U | | | 101 0110 | 126 | 86 | 56 | V | | | 101 0111 | 127 | 87 | 57 | W | | | 101 1000 | 130 | 88 | 58 | X | | | 101 1001 | 131 | 89 | 59 | Y | | | 101 1010 | 132 | 90 | 5a | Z | | Opening Bracket | 101 1011 | 133 | 91 | 5b | \[ | | Reverse Slant (Backslash) | 101 1100 | 134 | 92 | 5c | \\ | | Closing Bracket | 101 1101 | 135 | 93 | 5d | ] | | Circumflex (Caret) | 101 1110 | 136 | 94 | 5e | ^ | | Underline (Underscore) | 101 1111 | 137 | 95 | 5f | \_ | | Grave Accent (Backtick) | 110 0000 | 140 | 96 | 60 | ` | | | 110 0001 | 141 | 97 | 61 | a | | | 110 0010 | 142 | 98 | 62 | b | | | 110 0011 | 143 | 99 | 63 | c | | | 110 0100 | 144 | 100 | 64 | d | | | 110 0101 | 145 | 101 | 65 | e | | | 110 0110 | 146 | 102 | 66 | f | | | 110 0111 | 147 | 103 | 67 | g | | | 110 1000 | 150 | 104 | 68 | h | | | 110 1001 | 151 | 105 | 69 | i | | | 110 1010 | 152 | 106 | 6a | j | | | 110 1011 | 153 | 107 | 6b | k | | | 110 1100 | 154 | 108 | 6c | l | | | 110 1101 | 155 | 109 | 6d | m | | | 110 1110 | 156 | 110 | 6e | n | | | 110 1111 | 157 | 111 | 6f | o | | | 111 0000 | 160 | 112 | 70 | p | | | 111 0001 | 161 | 113 | 71 | q | | | 111 0010 | 162 | 114 | 72 | r | | | 111 0011 | 163 | 115 | 73 | s | | | 111 0100 | 164 | 116 | 74 | t | | | 111 0101 | 165 | 117 | 75 | u | | | 111 0110 | 166 | 118 | 76 | v | | | 111 0111 | 167 | 119 | 77 | w | | | 111 1000 | 170 | 120 | 78 | x | | | 111 1001 | 171 | 121 | 79 | y | | | 111 1010 | 172 | 122 | 7a | z | | Opening Brace | 111 1011 | 173 | 123 | 7b | { | | Vertical Line (Pipe) | 111 1100 | 174 | 124 | 7c | \| | | Closing Brace | 111 1101 | 175 | 125 | 7d | } | | Overline (Tilde) | 111 1110 | 176 | 126 | 7e | ~ | The official symbol for the space character according the 1967 standard is `SP`, but most modern sources use `SPC`. # References - [[ASCII Table From Unicon]] - [[ASCII Code - The extended ASCII table]] - https://www.sensitiveresearch.com/Archive/CharCodeHist/Files/CODES%20standards%20documents%20ASCII%20Sean%20Leonard%20Oct%202015/ASCII%2068,%20X3.4-1967.pdf - https://www.computerhope.com/edlin.htm - https://en.wikipedia.org/wiki/ASCII - https://en.wikipedia.org/wiki/Control_character - https://en.wikipedia.org/wiki/C0_and_C1_control_codes - https://en.wikipedia.org/wiki/End-of-file - https://en.wikipedia.org/wiki/End-of-Transmission_character - https://en.wikipedia.org/wiki/Caret_notation