Difference between revisions of "ASCII"
From MgmtWiki
(→Full Title or Meme) |
(→References) |
||
(4 intermediate revisions by the same user not shown) | |||
Line 3: | Line 3: | ||
==Context== | ==Context== | ||
− | At the time this coding scheme was introduced the common teletypewriter code was Baudot, which was only 6 bits and required a shift key like that on the typewriter. | + | *At the time this coding scheme was introduced the common teletypewriter code was Baudot, which was only 6 bits and required a shift key like that on the typewriter. |
+ | *This was the default coding scheme at the start of the [[World Wide Web]]. It is still used in some coding situations where no ambiguity can be tolerated. | ||
==Problem== | ==Problem== | ||
Line 10: | Line 11: | ||
==Solutions== | ==Solutions== | ||
Most of the solutions create more problems than they solve. | Most of the solutions create more problems than they solve. | ||
+ | |||
+ | |||
+ | {| class="wikitable" style="text-align: center" | ||
+ | |- | ||
+ | ! rowspan="2"|[[Binary numeral system|Binary]] !! rowspan="2"|[[Octal|Oct]] !! rowspan="2"|[[Decimal|Dec]] !! rowspan="2"|[[Hexadecimal|Hex]] !! colspan="3"|Abbreviation !! rowspan="2"|{{Efn|The [[Unicode]] characters from the area U+2400 to U+2421 reserved for representing control characters when it is necessary to print or display them rather than have them perform their intended function. Some browsers may not display these properly.}} !! rowspan="2"|{{Efn|[[Caret notation]] is often used to represent control characters on a terminal. On most text terminals, holding down the {{key press|[[Control key|Ctrl]]}} key while typing the second character will type the control character. Sometimes the shift key is not needed, for instance <code>^@</code> may be typable with just Ctrl and 2.}} !! rowspan="2"|{{Efn|Character [[escape sequence]]s in [[C (programming language)|C programming language]] and many other languages influenced by it, such as [[Java (programming language)|Java]] and [[Perl]] (though not all implementations necessarily support all escape sequences).}} !! rowspan="2"|Name ('67) | ||
+ | |- | ||
+ | ! '63 !! '65 !! '67 | ||
+ | |- | ||
+ | | 000 0000 || style="background:lightblue;" | 000 || style="background:#CFF;" | 0 || style="background:lightblue;" | 00 | ||
+ | |NULL||colspan=2|NUL|| style="font-size:large;" | ␀ || <code>[[^@]]</code> || <code>[[\0]]</code> || style="text-align:left;" | [[Null character|Null]] | ||
+ | |- | ||
+ | | 000 0001 || style="background:lightblue;" | 001 || style="background:#CFF;" | 1 || style="background:lightblue;" | 01 | ||
+ | |SOM||colspan=2|SOH|| style="font-size:large;" | ␁ || <code>[[^A]]</code> || || style="text-align:left;" | [[Start of Heading]] | ||
+ | |- | ||
+ | | 000 0010 || style="background:lightblue;" | 002 || style="background:#CFF;" | 2 || style="background:lightblue;" | 02 | ||
+ | |EOA||colspan=2|STX|| style="font-size:large;" | ␂ || <code>[[^B]]</code> || || style="text-align:left;" | [[Start of Text]] | ||
+ | |- | ||
+ | | 000 0011 || style="background:lightblue;" | 003 || style="background:#CFF;" | 3 || style="background:lightblue;" | 03 | ||
+ | |EOM||colspan=2|ETX|| style="font-size:large;" | ␃ || <code>[[^C]]</code> || || style="text-align:left;" | [[End-of-Text character|End of Text]] | ||
+ | |- | ||
+ | | 000 0100 || style="background:lightblue;" | 004 || style="background:#CFF;" | 4 || style="background:lightblue;" | 04 | ||
+ | <!-- Please note that the character below, U+2404, is correct. If you are seeing it as "ENQ", please upgrade your fonts as the one you have is buggy. --> | ||
+ | |colspan=3|EOT|| style="font-size:large;" | ␄ || <code>[[^D]]</code> || || style="text-align:left;" | [[End-of-Transmission character|End of Transmission]] | ||
+ | |- | ||
+ | | 000 0101 || style="background:lightblue;" | 005 || style="background:#CFF;" | 5 || style="background:lightblue;" | 05 | ||
+ | <!-- Please note that the character below, U+2405, is correct. If you are seeing it as "EOT", please upgrade your fonts as the one you have is buggy. --> | ||
+ | |WRU||colspan=2|ENQ|| style="font-size:large;" | ␅ || <code>[[^E]]</code> || || style="text-align:left;" | [[Enquiry character|Enquiry]] | ||
+ | |- | ||
+ | | 000 0110 || style="background:lightblue;" | 006 || style="background:#CFF;" | 6 || style="background:lightblue;" | 06 | ||
+ | |RU||colspan=2|ACK|| style="font-size:large;" | ␆ || <code>[[^F]]</code> || || style="text-align:left;" | [[Acknowledge character|Acknowledgement]] | ||
+ | |- | ||
+ | | 000 0111 || style="background:lightblue;" | 007 || style="background:#CFF;" | 7 || style="background:lightblue;" | 07 | ||
+ | |BELL||colspan=2|BEL|| style="font-size:large;" | ␇ || <code>[[^G]]</code> || <code>[[\a]]</code> || style="text-align:left;" | [[Bell character|Bell]] | ||
+ | |- | ||
+ | | 000 1000 || style="background:lightblue;" | 010 || style="background:#CFF;" | 8 || style="background:lightblue;" | 08 | ||
+ | |FE0||colspan=2|BS|| style="font-size:large;" | ␈ || <code>[[^H]]</code> || <code>[[Backspace|\b]]</code> || style="text-align:left;" | [[Backspace]]{{Efn|The [[Backspace]] character can also be entered by pressing the {{key press|Backspace}} key on some systems.}}{{Efn|name="bsp del mismatch"}} | ||
+ | |- | ||
+ | | 000 1001 || style="background:lightblue;" | 011 || style="background:#CFF;" | 9 || style="background:lightblue;" | 09 | ||
+ | |HT/SK||colspan=2|HT|| style="font-size:large;" | ␉ || <code>[[^I]]</code> || <code>[[\t]]</code> || style="text-align:left;" | [[Horizontal Tab]]{{Efn|The [[Tab character]] can also be entered by pressing the {{key press|Tab}} key on most systems.}} | ||
+ | |- | ||
+ | | 000 1010 || style="background:lightblue;" | 012 || style="background:#CFF;" | 10 || style="background:lightblue;" | 0A | ||
+ | |colspan=3|LF|| style="font-size:large;" | ␊ || <code>[[^J]]</code> || <code>[[\n]]</code> || style="text-align:left;" | [[Line Feed]] | ||
+ | |- | ||
+ | | 000 1011 || style="background:lightblue;" | 013 || style="background:#CFF;" | 11 || style="background:lightblue;" | 0B | ||
+ | |VTAB||colspan=2|VT|| style="font-size:large;" | ␋ || <code>[[^K]]</code> || <code>[[\v]]</code> || style="text-align:left;" | [[Vertical Tab]] | ||
+ | |- | ||
+ | | 000 1100 || style="background:lightblue;" | 014 || style="background:#CFF;" | 12 || style="background:lightblue;" | 0C | ||
+ | |colspan=3|FF|| style="font-size:large;" | ␌ || <code>[[^L]]</code> || <code>[[\f]]</code> || style="text-align:left;" | [[Form Feed]] | ||
+ | |- | ||
+ | | 000 1101 || style="background:lightblue;" | 015 || style="background:#CFF;" | 13 || style="background:lightblue;" | 0D | ||
+ | |colspan=3|CR|| style="font-size:large;" | ␍ || <code>[[^M]]</code> || <code>[[\r]]</code> || style="text-align:left;" | [[Carriage Return]]{{Efn|The [[Carriage Return]] character can also be entered by pressing the {{key press|Enter}} or {{key press|Return}} key on most systems.}} | ||
+ | |- | ||
+ | | 000 1110 || style="background:lightblue;" | 016 || style="background:#CFF;" | 14 || style="background:lightblue;" | 0E | ||
+ | |colspan=3|SO|| style="font-size:large;" | ␎ || <code>[[^N]]</code> || || style="text-align:left;" | [[Shift Out]] | ||
+ | |- | ||
+ | | 000 1111 || style="background:lightblue;" | 017 || style="background:#CFF;" | 15 || style="background:lightblue;" | 0F | ||
+ | |colspan=3|SI|| style="font-size:large;" | ␏ || <code>[[^O]]</code> || || style="text-align:left;" | [[Shift In]] | ||
+ | |- | ||
+ | | 001 0000 || style="background:lightblue;" | 020 || style="background:#CFF;" | 16 || style="background:lightblue;" | 10 | ||
+ | |DC0||colspan=2|DLE|| style="font-size:large;" | ␐ || <code>[[^P]]</code> || || style="text-align:left;" | [[Data Link Escape]] | ||
+ | |- | ||
+ | | 001 0001 || style="background:lightblue;" | 021 || style="background:#CFF;" | 17 || style="background:lightblue;" | 11 | ||
+ | |colspan=3|DC1|| style="font-size:large;" | ␑ || <code>[[^Q]]</code> || || style="text-align:left;" | [[Device Control 1]] (often [[XON]]) | ||
+ | |- | ||
+ | | 001 0010 || style="background:lightblue;" | 022 || style="background:#CFF;" | 18 || style="background:lightblue;" | 12 | ||
+ | |colspan=3|DC2|| style="font-size:large;" | ␒ || <code>[[^R]]</code> || || style="text-align:left;" | [[Device Control 2]] | ||
+ | |- | ||
+ | | 001 0011 || style="background:lightblue;" | 023 || style="background:#CFF;" | 19 || style="background:lightblue;" | 13 | ||
+ | |colspan=3|DC3|| style="font-size:large;" | ␓ || <code>[[^S]]</code> || || style="text-align:left;" | [[Device Control 3]] (often [[XOFF]]) | ||
+ | |- | ||
+ | | 001 0100 || style="background:lightblue;" | 024 || style="background:#CFF;" | 20 || style="background:lightblue;" | 14 | ||
+ | |colspan=3|DC4|| style="font-size:large;" | ␔ || <code>[[^T]]</code> || || style="text-align:left;" | [[Device Control 4]] | ||
+ | |- | ||
+ | | 001 0101 || style="background:lightblue;" | 025 || style="background:#CFF;" | 21 || style="background:lightblue;" | 15 | ||
+ | |ERR||colspan=2|NAK|| style="font-size:large;" | ␕ || <code>[[^U]]</code> || || style="text-align:left;" | [[Negative-acknowledge character|Negative Acknowledgement]] | ||
+ | |- | ||
+ | | 001 0110 || style="background:lightblue;" | 026 || style="background:#CFF;" | 22 || style="background:lightblue;" | 16 | ||
+ | |SYNC||colspan=2|SYN|| style="font-size:large;" | ␖ || <code>[[^V]]</code> || || style="text-align:left;" | [[Synchronous Idle]] | ||
+ | |- | ||
+ | | 001 0111 || style="background:lightblue;" | 027 || style="background:#CFF;" | 23 || style="background:lightblue;" | 17 | ||
+ | |LEM||colspan=2|ETB|| style="font-size:large;" | ␗ || <code>[[^W]]</code> || || style="text-align:left;" | [[End-of-Transmission-Block character|End of Transmission Block]] | ||
+ | |- | ||
+ | | 001 1000 || style="background:lightblue;" | 030 || style="background:#CFF;" | 24 || style="background:lightblue;" | 18 | ||
+ | |S0||colspan=2|CAN|| style="font-size:large;" | ␘ || <code>[[^X]]</code> || || style="text-align:left;" | [[Cancel character|Cancel]] | ||
+ | |- | ||
+ | | 001 1001 || style="background:lightblue;" | 031 || style="background:#CFF;" | 25 || style="background:lightblue;" | 19 | ||
+ | |S1||colspan=2|EM|| style="font-size:large;" | ␙ || <code>[[^Y]]</code> || || style="text-align:left;" | [[End of Medium]] | ||
+ | |- | ||
+ | | 001 1010 || style="background:lightblue;" | 032 || style="background:#CFF;" | 26 || style="background:lightblue;" | 1A | ||
+ | |S2||SS||SUB|| style="font-size:large;" | ␚ || <code>[[^Z]]</code> || || style="text-align:left;" | [[Substitute character|Substitute]] | ||
+ | |- | ||
+ | | 001 1011 || style="background:lightblue;" | 033 || style="background:#CFF;" | 27 || style="background:lightblue;" | 1B | ||
+ | |S3||colspan=2|ESC|| style="font-size:large;" | ␛ || <code>^<nowiki>[</nowiki></code> || <code>[[\e]]</code>{{Efn|The <code>\e</code> [[escape sequence]] is not part of [[ISO C]] and many other language specifications. However, it is understood by several compilers, including [[GCC (software)|GCC]].}} || style="text-align:left;" | [[Escape character|Escape]]{{Efn|The [[Escape character]] can also be entered by pressing the {{key press|Esc}} key on some systems.}} | ||
+ | |- | ||
+ | | 001 1100 || style="background:lightblue;" | 034 || style="background:#CFF;" | 28 || style="background:lightblue;" | 1C | ||
+ | |S4||colspan=2|FS|| style="font-size:large;" | ␜ || <code>[[^\]]</code> || || style="text-align:left;" | [[File Separator]] | ||
+ | |- | ||
+ | | 001 1101 || style="background:lightblue;" | 035 || style="background:#CFF;" | 29 || style="background:lightblue;" | 1D | ||
+ | |S5||colspan=2|GS|| style="font-size:large;" | ␝ || <code>^<nowiki>]</nowiki></code> || || style="text-align:left;" | [[Group Separator]] | ||
+ | |- | ||
+ | | 001 1110 || style="background:lightblue;" | 036 || style="background:#CFF;" | 30 || style="background:lightblue;" | 1E | ||
+ | |S6||colspan=2|RS|| style="font-size:large;" | ␞ || <code>^^</code>{{Efn|^^ means {{key press|Ctrl|^}} (pressing the "Ctrl" and [[caret]] keys).}} || || style="text-align:left;" | [[Record Separator]] | ||
+ | |- | ||
+ | | 001 1111 || style="background:lightblue;" | 037 || style="background:#CFF;" | 31 || style="background:lightblue;" | 1F | ||
+ | |S7||colspan=2|US|| style="font-size:large;" | ␟ || <code>^_</code> || || style="text-align:left;" | [[Unit Separator]] | ||
+ | |- | ||
+ | | colspan="9" | | ||
+ | |- | ||
+ | | 111 1111 || style="background:lightblue;" | 177 || style="background:#CFF;" | 127 || style="background:lightblue;" | 7F | ||
+ | |colspan=3|DEL|| style="font-size:large;" | ␡ || <code>[[^?]]</code> || || style="text-align:left;" | [[Delete character|Delete]]{{Efn|The [[Delete character]] can sometimes be entered by pressing the {{key press|Backspace}} key on some systems.}}{{Efn|name="bsp del mismatch"|The ambiguity of [[Backspace]] is due to early terminals designed assuming the main use of the keyboard would be to manually punch paper tape while not connected to a computer. To delete the previous character, one had to back up the paper tape punch, which for mechanical and simplicity reasons was a button on the punch itself and not the keyboard, then type the rubout character. They therefore placed a key producing rubout at the location used on typewriters for backspace. When systems used these terminals and provided command-line editing, they had to use the "rubout" code to perform a backspace, and often did not interpret the backspace character (they might echo "<code>^H</code>" for backspace). Other terminals not designed for paper tape made the key at this location produce Backspace, and systems designed for these used that character to back up. Since the delete code often produced a backspace effect, this also forced terminal manufacturers to make any {{key press|Delete}} key produce something other than the Delete character.}} | ||
+ | |} | ||
+ | |||
+ | [[File:Ascii.jpg]] | ||
==References== | ==References== |
Latest revision as of 15:09, 11 August 2019
Full Title or Meme
The American Standard Code for Information Interchange ASCII was created by Bell's Western Electric for teletypewriters.
Context
- At the time this coding scheme was introduced the common teletypewriter code was Baudot, which was only 6 bits and required a shift key like that on the typewriter.
- This was the default coding scheme at the start of the World Wide Web. It is still used in some coding situations where no ambiguity can be tolerated.
Problem
The standard does not comprehend many Western languages, let alone any Eastern languages.
Solutions
Most of the solutions create more problems than they solve.
Binary | Oct | Dec | Hex | Abbreviation | Template:Efn | Template:Efn | Template:Efn | Name ('67) | ||
---|---|---|---|---|---|---|---|---|---|---|
'63 | '65 | '67 | ||||||||
000 0000 | 000 | 0 | 00 | NULL | NUL | ␀ | ^@ |
\0 |
Null | |
000 0001 | 001 | 1 | 01 | SOM | SOH | ␁ | ^A |
Start of Heading | ||
000 0010 | 002 | 2 | 02 | EOA | STX | ␂ | ^B |
Start of Text | ||
000 0011 | 003 | 3 | 03 | EOM | ETX | ␃ | ^C |
End of Text | ||
000 0100 | 004 | 4 | 04 | EOT | ␄ | ^D |
End of Transmission | |||
000 0101 | 005 | 5 | 05 | WRU | ENQ | ␅ | ^E |
Enquiry | ||
000 0110 | 006 | 6 | 06 | RU | ACK | ␆ | ^F |
Acknowledgement | ||
000 0111 | 007 | 7 | 07 | BELL | BEL | ␇ | ^G |
\a |
Bell | |
000 1000 | 010 | 8 | 08 | FE0 | BS | ␈ | ^H |
\b |
BackspaceTemplate:EfnTemplate:Efn | |
000 1001 | 011 | 9 | 09 | HT/SK | HT | ␉ | ^I |
\t |
Horizontal TabTemplate:Efn | |
000 1010 | 012 | 10 | 0A | LF | ␊ | ^J |
\n |
Line Feed | ||
000 1011 | 013 | 11 | 0B | VTAB | VT | ␋ | ^K |
\v |
Vertical Tab | |
000 1100 | 014 | 12 | 0C | FF | ␌ | ^L |
\f |
Form Feed | ||
000 1101 | 015 | 13 | 0D | CR | ␍ | ^M |
\r |
Carriage ReturnTemplate:Efn | ||
000 1110 | 016 | 14 | 0E | SO | ␎ | ^N |
Shift Out | |||
000 1111 | 017 | 15 | 0F | SI | ␏ | ^O |
Shift In | |||
001 0000 | 020 | 16 | 10 | DC0 | DLE | ␐ | ^P |
Data Link Escape | ||
001 0001 | 021 | 17 | 11 | DC1 | ␑ | ^Q |
Device Control 1 (often XON) | |||
001 0010 | 022 | 18 | 12 | DC2 | ␒ | ^R |
Device Control 2 | |||
001 0011 | 023 | 19 | 13 | DC3 | ␓ | ^S |
Device Control 3 (often XOFF) | |||
001 0100 | 024 | 20 | 14 | DC4 | ␔ | ^T |
Device Control 4 | |||
001 0101 | 025 | 21 | 15 | ERR | NAK | ␕ | ^U |
Negative Acknowledgement | ||
001 0110 | 026 | 22 | 16 | SYNC | SYN | ␖ | ^V |
Synchronous Idle | ||
001 0111 | 027 | 23 | 17 | LEM | ETB | ␗ | ^W |
End of Transmission Block | ||
001 1000 | 030 | 24 | 18 | S0 | CAN | ␘ | ^X |
Cancel | ||
001 1001 | 031 | 25 | 19 | S1 | EM | ␙ | ^Y |
End of Medium | ||
001 1010 | 032 | 26 | 1A | S2 | SS | SUB | ␚ | ^Z |
Substitute | |
001 1011 | 033 | 27 | 1B | S3 | ESC | ␛ | ^[ |
\e Template:Efn |
EscapeTemplate:Efn | |
001 1100 | 034 | 28 | 1C | S4 | FS | ␜ | ^\ |
File Separator | ||
001 1101 | 035 | 29 | 1D | S5 | GS | ␝ | ^] |
Group Separator | ||
001 1110 | 036 | 30 | 1E | S6 | RS | ␞ | ^^ Template:Efn |
Record Separator | ||
001 1111 | 037 | 31 | 1F | S7 | US | ␟ | ^_ |
Unit Separator | ||
111 1111 | 177 | 127 | 7F | DEL | ␡ | ^? |
DeleteTemplate:EfnTemplate:Efn |