Difference between revisions of "ASCII"
m (Avoid redir) |
(Created by a predecessor to ANSI) |
||
(9 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
− | '''ASCII''' (an acronym for '''American Standard Code for Information Interchange''') is an encoding for various glyphs (written forms such as letters, numbers, etc) into 7-[[bit]] numeric form. | + | '''ASCII''' (an acronym for '''American Standard Code for Information Interchange''') is an encoding for various glyphs (written forms such as letters, numbers, etc) into 7-[[bit]] numeric form. It was created by a predecessor to [[American National Standards Institute|ANSI]]. |
− | + | Originally based on the English alphabet, the supported set for ASCII includes not only numbers, letters (upper- and lower-case) but also punctuation, and other special-purpose characters (from then-common ones like '@', '#', etc, to others that ASCII has made popular - '^', '|', etc). It also includes non-printing characters used for control of printing [[terminal]]s - tab, line feed, carriage return, etc. | |
− | [[ | + | ASCII was developed in the early 1960s from telegraph code. Its first commercial use, in 1963, was as a teleprinter code promoted by Bell data services for the TWX network. Later, it was adopted for use by terminals, [[line printer]]s, etc, as well as by [[secondary storage]] and [[file]]s. |
− | ASCII | + | ASCII soon superseded an earlier wide-spread encoding, [[SIXBIT]], which allowed 6 characters to be carried in the then-common 36-bit [[word]]s common on many computers (but only supported upper-case characters). [[International Business Machines|IBM]] had its own competing encoding standard at the time, [[Extended Binary Coded Decimal Interchange Code|EBCDIC]], which ASCII has also gradually superseded. |
− | {{ | + | ASCII was eventually used by [[personal computer]]s such as the [[Apple II]], and the [[IBM PC]]. IBM extended the character set with a separate set of glyphs used for line drawing; the first of many often-incompatible extensions to ASCII for various national, etc, usages. It has now been superseded for the [[World Wide Web|WWW]] by [[Unicode]], specifically [[UTF-8]], which is however backwards compatible with ASCII. |
+ | |||
+ | ==ASCII table== | ||
+ | |||
+ | Here is a table of the ASCII characters. The 'Character' column gives either i) the character itself (if only a single character is there), or ii) its name (if two or more characters are shown). The 'Input' column shows what to type on most [[keyboard]]s to generate that character. | ||
+ | |||
+ | {| class="wikitable" | ||
+ | ! Decimal !! Octal !! Hex !! Character !! Input !! Description | ||
+ | |- | ||
+ | | 000 || 000 || 00 || NUL || ^@ || Null character | ||
+ | |- | ||
+ | | 001 || 001 || 01 || SOH || ^A || Start of Heading | ||
+ | |- | ||
+ | | 002 || 002 || 02 || STX || ^B || Start of Text | ||
+ | |- | ||
+ | | 003 || 003 || 03 || ETX || ^C || End of Text | ||
+ | |- | ||
+ | | 004 || 004 || 04 || EOT || ^D || End of Transmission | ||
+ | |- | ||
+ | | 005 || 005 || 05 || ENQ || ^E || Enquiry | ||
+ | |- | ||
+ | | 006 || 006 || 06 || ACK || ^F || Acknowledge | ||
+ | |- | ||
+ | | 007 || 007 || 07 || BEL || ^G || Bell | ||
+ | |- | ||
+ | | 008 || 010 || 08 || BS || ^H || Backspace | ||
+ | |- | ||
+ | | 009 || 011 || 09 || HT || ^I || Horizontal Tab | ||
+ | |- | ||
+ | | 010 || 012 || 0A || LF || ^J || Line Feed | ||
+ | |- | ||
+ | | 011 || 013 || 0B || VT || ^K || Vertical Tab | ||
+ | |- | ||
+ | | 012 || 014 || 0C || FF || ^L || Form Feed | ||
+ | |- | ||
+ | | 013 || 015 || 0D || CR || ^M || Carriage Return | ||
+ | |- | ||
+ | | 014 || 016 || 0E || SO || ^N || Shift Out | ||
+ | |- | ||
+ | | 015 || 017 || 0F || SI || ^O || Shift In | ||
+ | |- | ||
+ | | 016 || 020 || 10 || DLE || ^P || Data Link Escape | ||
+ | |- | ||
+ | | 017 || 021 || 11 || DC1 || ^Q || Device Control One | ||
+ | |- | ||
+ | | 018 || 022 || 12 || DC2 || ^R || Device Control Two | ||
+ | |- | ||
+ | | 019 || 023 || 13 || DC3 || ^S || Device Control Three | ||
+ | |- | ||
+ | | 020 || 024 || 14 || DC4 || ^T || Device Control Four | ||
+ | |- | ||
+ | | 021 || 025 || 15 || NAK || ^U || Negative Acknowledge | ||
+ | |- | ||
+ | | 022 || 026 || 16 || SYN || ^V || Synchronous Idle | ||
+ | |- | ||
+ | | 023 || 027 || 17 || ETB || ^W || End of Transmission Block | ||
+ | |- | ||
+ | | 024 || 030 || 18 || CAN || ^X || Cancel | ||
+ | |- | ||
+ | | 025 || 031 || 19 || EM || ^Y || End of medium | ||
+ | |- | ||
+ | | 026 || 032 || 1A || SUB || ^Z || Substitute | ||
+ | |- | ||
+ | | 027 || 033 || 1B || ESC || ^[ || Escape | ||
+ | |- | ||
+ | | 028 || 034 || 1C || FS || ^\ || File Separator | ||
+ | |- | ||
+ | | 029 || 035 || 1D || GS || ^] || Group Separator | ||
+ | |- | ||
+ | | 030 || 036 || 1E || RS || ^^ || Record Separator | ||
+ | |- | ||
+ | | 031 || 037 || 1F || US || ^_ || Unit Separator | ||
+ | |- | ||
+ | | 032 || 040 || 20 || SP || || Space | ||
+ | |- | ||
+ | | 033 || 041 || 21 || ! | ||
+ | |- | ||
+ | | 034 || 042 || 22 || " | ||
+ | |- | ||
+ | | 035 || 043 || 23 || # | ||
+ | |- | ||
+ | | 036 || 044 || 24 || $ | ||
+ | |- | ||
+ | | 037 || 045 || 25 || % | ||
+ | |- | ||
+ | | 038 || 046 || 26 || & | ||
+ | |- | ||
+ | | 039 || 047 || 27 || ' | ||
+ | |- | ||
+ | | 040 || 050 || 28 || ( | ||
+ | |- | ||
+ | | 041 || 051 || 29 || ) | ||
+ | |- | ||
+ | | 042 || 052 || 2A || * | ||
+ | |- | ||
+ | | 043 || 053 || 2B || + | ||
+ | |- | ||
+ | | 044 || 054 || 2C || , | ||
+ | |- | ||
+ | | 045 || 055 || 2D || - | ||
+ | |- | ||
+ | | 046 || 056 || 2E || . | ||
+ | |- | ||
+ | | 047 || 057 || 2F || / | ||
+ | |- | ||
+ | | 048 || 060 || 30 || 0 | ||
+ | |- | ||
+ | | 049 || 061 || 31 || 1 | ||
+ | |- | ||
+ | | 050 || 062 || 32 || 2 | ||
+ | |- | ||
+ | | 051 || 063 || 33 || 3 | ||
+ | |- | ||
+ | | 052 || 064 || 34 || 4 | ||
+ | |- | ||
+ | | 053 || 065 || 35 || 5 | ||
+ | |- | ||
+ | | 054 || 066 || 36 || 6 | ||
+ | |- | ||
+ | | 055 || 067 || 37 || 7 | ||
+ | |- | ||
+ | | 056 || 070 || 38 || 8 | ||
+ | |- | ||
+ | | 057 || 071 || 39 || 9 | ||
+ | |- | ||
+ | | 058 || 072 || 3A || : | ||
+ | |- | ||
+ | | 059 || 073 || 3B || ; | ||
+ | |- | ||
+ | | 060 || 074 || 3C || < | ||
+ | |- | ||
+ | | 061 || 075 || 3D || = | ||
+ | |- | ||
+ | | 062 || 076 || 3E || > | ||
+ | |- | ||
+ | | 063 || 077 || 3F || ? | ||
+ | |- | ||
+ | | 064 || 100 || 40 || @ | ||
+ | |- | ||
+ | | 065 || 101 || 41 || A | ||
+ | |- | ||
+ | | 066 || 102 || 42 || B | ||
+ | |- | ||
+ | | 067 || 103 || 43 || C | ||
+ | |- | ||
+ | | 068 || 104 || 44 || D | ||
+ | |- | ||
+ | | 069 || 105 || 45 || E | ||
+ | |- | ||
+ | | 070 || 106 || 46 || F | ||
+ | |- | ||
+ | | 071 || 107 || 47 || G | ||
+ | |- | ||
+ | | 072 || 110 || 48 || H | ||
+ | |- | ||
+ | | 073 || 111 || 49 || I | ||
+ | |- | ||
+ | | 074 || 112 || 4A || J | ||
+ | |- | ||
+ | | 075 || 113 || 4B || K | ||
+ | |- | ||
+ | | 076 || 114 || 4C || L | ||
+ | |- | ||
+ | | 077 || 115 || 4D || M | ||
+ | |- | ||
+ | | 078 || 116 || 4E || N | ||
+ | |- | ||
+ | | 079 || 117 || 4F || O | ||
+ | |- | ||
+ | | 080 || 120 || 50 || P | ||
+ | |- | ||
+ | | 081 || 121 || 51 || Q | ||
+ | |- | ||
+ | | 082 || 122 || 52 || R | ||
+ | |- | ||
+ | | 083 || 123 || 53 || S | ||
+ | |- | ||
+ | | 084 || 124 || 54 || T | ||
+ | |- | ||
+ | | 085 || 125 || 55 || U | ||
+ | |- | ||
+ | | 086 || 126 || 56 || V | ||
+ | |- | ||
+ | | 087 || 127 || 57 || W | ||
+ | |- | ||
+ | | 088 || 130 || 58 || X | ||
+ | |- | ||
+ | | 089 || 131 || 59 || Y | ||
+ | |- | ||
+ | | 090 || 132 || 5A || Z | ||
+ | |- | ||
+ | | 091 || 133 || 5B || [ | ||
+ | |- | ||
+ | | 092 || 134 || 5C || \ | ||
+ | |- | ||
+ | | 093 || 135 || 5D || ] | ||
+ | |- | ||
+ | | 094 || 136 || 5E || ^ | ||
+ | |- | ||
+ | | 095 || 137 || 5F || _ | ||
+ | |- | ||
+ | | 096 || 140 || 60 || ` | ||
+ | |- | ||
+ | | 097 || 141 || 61 || a | ||
+ | |- | ||
+ | | 098 || 142 || 62 || b | ||
+ | |- | ||
+ | | 099 || 143 || 63 || c | ||
+ | |- | ||
+ | | 100 || 144 || 64 || d | ||
+ | |- | ||
+ | | 101 || 145 || 65 || e | ||
+ | |- | ||
+ | | 102 || 146 || 66 || f | ||
+ | |- | ||
+ | | 103 || 147 || 67 || g | ||
+ | |- | ||
+ | | 104 || 150 || 68 || h | ||
+ | |- | ||
+ | | 105 || 151 || 69 || i | ||
+ | |- | ||
+ | | 106 || 152 || 6A || j | ||
+ | |- | ||
+ | | 107 || 153 || 6B || k | ||
+ | |- | ||
+ | | 108 || 154 || 6C || l | ||
+ | |- | ||
+ | | 109 || 155 || 6D || m | ||
+ | |- | ||
+ | | 110 || 156 || 6E || n | ||
+ | |- | ||
+ | | 111 || 157 || 6F || o | ||
+ | |- | ||
+ | | 112 || 160 || 70 || p | ||
+ | |- | ||
+ | | 113 || 161 || 71 || q | ||
+ | |- | ||
+ | | 114 || 162 || 72 || r | ||
+ | |- | ||
+ | | 115 || 163 || 73 || s | ||
+ | |- | ||
+ | | 116 || 164 || 74 || t | ||
+ | |- | ||
+ | | 117 || 165 || 75 || u | ||
+ | |- | ||
+ | | 118 || 166 || 76 || v | ||
+ | |- | ||
+ | | 119 || 167 || 77 || w | ||
+ | |- | ||
+ | | 120 || 170 || 78 || x | ||
+ | |- | ||
+ | | 121 || 171 || 79 || y | ||
+ | |- | ||
+ | | 122 || 172 || 7A || z | ||
+ | |- | ||
+ | | 123 || 173 || 7B || { | ||
+ | |- | ||
+ | | 124 || 174 || 7C || <nowiki>|</nowiki> | ||
+ | |- | ||
+ | | 125 || 175 || 7D || } | ||
+ | |- | ||
+ | | 126 || 176 || 7E || ~ | ||
+ | |- | ||
+ | | 127 || 177 || 7F || DEL || || Delete | ||
+ | |} | ||
+ | |||
+ | ==See also== | ||
+ | |||
+ | * [[Caret notation]] | ||
+ | |||
+ | [[Category: Coding Systems]] | ||
+ | [[Category: Standards]] |
Latest revision as of 07:39, 9 April 2024
ASCII (an acronym for American Standard Code for Information Interchange) is an encoding for various glyphs (written forms such as letters, numbers, etc) into 7-bit numeric form. It was created by a predecessor to ANSI.
Originally based on the English alphabet, the supported set for ASCII includes not only numbers, letters (upper- and lower-case) but also punctuation, and other special-purpose characters (from then-common ones like '@', '#', etc, to others that ASCII has made popular - '^', '|', etc). It also includes non-printing characters used for control of printing terminals - tab, line feed, carriage return, etc.
ASCII was developed in the early 1960s from telegraph code. Its first commercial use, in 1963, was as a teleprinter code promoted by Bell data services for the TWX network. Later, it was adopted for use by terminals, line printers, etc, as well as by secondary storage and files.
ASCII soon superseded an earlier wide-spread encoding, SIXBIT, which allowed 6 characters to be carried in the then-common 36-bit words common on many computers (but only supported upper-case characters). IBM had its own competing encoding standard at the time, EBCDIC, which ASCII has also gradually superseded.
ASCII was eventually used by personal computers such as the Apple II, and the IBM PC. IBM extended the character set with a separate set of glyphs used for line drawing; the first of many often-incompatible extensions to ASCII for various national, etc, usages. It has now been superseded for the WWW by Unicode, specifically UTF-8, which is however backwards compatible with ASCII.
ASCII table
Here is a table of the ASCII characters. The 'Character' column gives either i) the character itself (if only a single character is there), or ii) its name (if two or more characters are shown). The 'Input' column shows what to type on most keyboards to generate that character.
Decimal | Octal | Hex | Character | Input | Description |
---|---|---|---|---|---|
000 | 000 | 00 | NUL | ^@ | Null character |
001 | 001 | 01 | SOH | ^A | Start of Heading |
002 | 002 | 02 | STX | ^B | Start of Text |
003 | 003 | 03 | ETX | ^C | End of Text |
004 | 004 | 04 | EOT | ^D | End of Transmission |
005 | 005 | 05 | ENQ | ^E | Enquiry |
006 | 006 | 06 | ACK | ^F | Acknowledge |
007 | 007 | 07 | BEL | ^G | Bell |
008 | 010 | 08 | BS | ^H | Backspace |
009 | 011 | 09 | HT | ^I | Horizontal Tab |
010 | 012 | 0A | LF | ^J | Line Feed |
011 | 013 | 0B | VT | ^K | Vertical Tab |
012 | 014 | 0C | FF | ^L | Form Feed |
013 | 015 | 0D | CR | ^M | Carriage Return |
014 | 016 | 0E | SO | ^N | Shift Out |
015 | 017 | 0F | SI | ^O | Shift In |
016 | 020 | 10 | DLE | ^P | Data Link Escape |
017 | 021 | 11 | DC1 | ^Q | Device Control One |
018 | 022 | 12 | DC2 | ^R | Device Control Two |
019 | 023 | 13 | DC3 | ^S | Device Control Three |
020 | 024 | 14 | DC4 | ^T | Device Control Four |
021 | 025 | 15 | NAK | ^U | Negative Acknowledge |
022 | 026 | 16 | SYN | ^V | Synchronous Idle |
023 | 027 | 17 | ETB | ^W | End of Transmission Block |
024 | 030 | 18 | CAN | ^X | Cancel |
025 | 031 | 19 | EM | ^Y | End of medium |
026 | 032 | 1A | SUB | ^Z | Substitute |
027 | 033 | 1B | ESC | ^[ | Escape |
028 | 034 | 1C | FS | ^\ | File Separator |
029 | 035 | 1D | GS | ^] | Group Separator |
030 | 036 | 1E | RS | ^^ | Record Separator |
031 | 037 | 1F | US | ^_ | Unit Separator |
032 | 040 | 20 | SP | Space | |
033 | 041 | 21 | ! | ||
034 | 042 | 22 | " | ||
035 | 043 | 23 | # | ||
036 | 044 | 24 | $ | ||
037 | 045 | 25 | % | ||
038 | 046 | 26 | & | ||
039 | 047 | 27 | ' | ||
040 | 050 | 28 | ( | ||
041 | 051 | 29 | ) | ||
042 | 052 | 2A | * | ||
043 | 053 | 2B | + | ||
044 | 054 | 2C | , | ||
045 | 055 | 2D | - | ||
046 | 056 | 2E | . | ||
047 | 057 | 2F | / | ||
048 | 060 | 30 | 0 | ||
049 | 061 | 31 | 1 | ||
050 | 062 | 32 | 2 | ||
051 | 063 | 33 | 3 | ||
052 | 064 | 34 | 4 | ||
053 | 065 | 35 | 5 | ||
054 | 066 | 36 | 6 | ||
055 | 067 | 37 | 7 | ||
056 | 070 | 38 | 8 | ||
057 | 071 | 39 | 9 | ||
058 | 072 | 3A | : | ||
059 | 073 | 3B | ; | ||
060 | 074 | 3C | < | ||
061 | 075 | 3D | = | ||
062 | 076 | 3E | > | ||
063 | 077 | 3F | ? | ||
064 | 100 | 40 | @ | ||
065 | 101 | 41 | A | ||
066 | 102 | 42 | B | ||
067 | 103 | 43 | C | ||
068 | 104 | 44 | D | ||
069 | 105 | 45 | E | ||
070 | 106 | 46 | F | ||
071 | 107 | 47 | G | ||
072 | 110 | 48 | H | ||
073 | 111 | 49 | I | ||
074 | 112 | 4A | J | ||
075 | 113 | 4B | K | ||
076 | 114 | 4C | L | ||
077 | 115 | 4D | M | ||
078 | 116 | 4E | N | ||
079 | 117 | 4F | O | ||
080 | 120 | 50 | P | ||
081 | 121 | 51 | Q | ||
082 | 122 | 52 | R | ||
083 | 123 | 53 | S | ||
084 | 124 | 54 | T | ||
085 | 125 | 55 | U | ||
086 | 126 | 56 | V | ||
087 | 127 | 57 | W | ||
088 | 130 | 58 | X | ||
089 | 131 | 59 | Y | ||
090 | 132 | 5A | Z | ||
091 | 133 | 5B | [ | ||
092 | 134 | 5C | \ | ||
093 | 135 | 5D | ] | ||
094 | 136 | 5E | ^ | ||
095 | 137 | 5F | _ | ||
096 | 140 | 60 | ` | ||
097 | 141 | 61 | a | ||
098 | 142 | 62 | b | ||
099 | 143 | 63 | c | ||
100 | 144 | 64 | d | ||
101 | 145 | 65 | e | ||
102 | 146 | 66 | f | ||
103 | 147 | 67 | g | ||
104 | 150 | 68 | h | ||
105 | 151 | 69 | i | ||
106 | 152 | 6A | j | ||
107 | 153 | 6B | k | ||
108 | 154 | 6C | l | ||
109 | 155 | 6D | m | ||
110 | 156 | 6E | n | ||
111 | 157 | 6F | o | ||
112 | 160 | 70 | p | ||
113 | 161 | 71 | q | ||
114 | 162 | 72 | r | ||
115 | 163 | 73 | s | ||
116 | 164 | 74 | t | ||
117 | 165 | 75 | u | ||
118 | 166 | 76 | v | ||
119 | 167 | 77 | w | ||
120 | 170 | 78 | x | ||
121 | 171 | 79 | y | ||
122 | 172 | 7A | z | ||
123 | 173 | 7B | { | ||
124 | 174 | 7C | | | ||
125 | 175 | 7D | } | ||
126 | 176 | 7E | ~ | ||
127 | 177 | 7F | DEL | Delete |