HOME

TheInfoList




ASCII ( ), abbreviated from American Standard Code for Information Interchange, is a
character encoding Character encoding is the process of assigning numbers to graphical Graphics (from Greek Greek may refer to: Greece Anything of, from, or related to Greece Greece ( el, Ελλάδα, , ), officially the Hellenic Republic, is a country ...
standard for electronic communication. ASCII codes represent text in computers,
telecommunications equipment Telecommunications equipment (also telecoms equipment or communications equipment) is a hardware which is used for the purposes of telecommunication Telecommunication is the transmission of information by various types of technologies over wire ...
, and other devices. Most modern character-encoding schemes are based on ASCII, although they support many additional characters. The
Internet Assigned Numbers Authority The Internet Assigned Numbers Authority (IANA) is a standards organization that oversees global IP address allocation, Autonomous system (Internet), autonomous system number allocation, DNS root zone, root zone management in the Domain Name Sys ...
(IANA) prefers the name US-ASCII for this character encoding. ASCII is one of the IEEE milestones.


Overview

ASCII was developed from
telegraph code Telegraphy is the long-distance transmission of messages where the sender uses symbolic codes, known to the recipient, rather than a physical exchange of an object bearing the message. Thus flag semaphore is a method of telegraphy, whereas p ...
. Its first commercial use was as a seven-
bit The bit is a basic unit of information in computing Computing is any goal-oriented activity requiring, benefiting from, or creating computing machinery. It includes the study and experimentation of algorithm of an algorithm (Euclid's algo ...
teleprinter A teleprinter (teletypewriter, teletype or TTY) is an electromechanical device that can be used to send and receive typed messages through various communications channels, in both point-to-point (telecommunications), point-to-point and point- ...
code promoted by Bell data services. Work on the ASCII standard began on October 6, 1960, with the first meeting of the
American Standards Association The American National Standards Institute (ANSI ) is a private non-profit organization A nonprofit organization (NPO), also known as a non-business entity, not-for-profit organization, or nonprofit institution, is a legal entity organize ...
's (ASA) (now the
American National Standards Institute The American National Standards Institute (ANSI ) is a private non-profit organization that oversees the development of Standardization, voluntary consensus standards for products, services, processes, systems, and personnel in the United Sta ...
or ANSI) X3.2 subcommittee. The first edition of the standard was published in 1963, underwent a major revision during 1967, and experienced its most recent update during 1986. Compared to earlier telegraph codes, the proposed Bell code and ASCII were both ordered for more convenient sorting (i.e., alphabetization) of lists, and added features for devices other than teleprinters. The use of ASCII format for Network Interchange was described in 1969. That document was formally elevated to an Internet Standard in 2015. Originally based on the
English alphabet The modern English alphabet is a consisting of 26 , each having an form. It originated around the 7th century from . Since then, letters have been added or removed to give the current Modern English of 26 letters with no s, , no ...
, ASCII encodes 128 specified
characters Character(s) may refer to: Arts, entertainment, and media Literature * Character (novel), ''Character'' (novel), a 1936 Dutch novel by Ferdinand Bordewijk * Characters (Theophrastus), ''Characters'' (Theophrastus), a classical Greek set of char ...
into seven-bit integers as shown by the ASCII chart above. Ninety-five of the encoded characters are printable: these include the digits ''0'' to ''9'', lowercase letters ''a'' to ''z'', uppercase letters ''A'' to ''Z'', and
punctuation symbol Punctuation (or sometimes interpunction) is the use of spacing, conventional signs (called punctuation marks), and certain typographical devices as aids to the understanding and correct reading of written text, whether read silently or aloud. Ano ...
s. In addition, the original ASCII specification included 33 non-printing
control code In computing Computing is any goal-oriented activity requiring, benefiting from, or creating computing machinery. It includes the study and experimentation of algorithmic processes and development of both computer hardware , hardware and softw ...
s which originated with
Teletype machine A teleprinter (teletypewriter, teletype or TTY) is an electromechanical In engineering Engineering is the use of scientific method, scientific principles to design and build machines, structures, and other items, including bridges, ...
s; most of these are now obsolete, although a few are still commonly used, such as the
carriage return A carriage return, sometimes known as a cartridge return and often shortened to CR, or return, is a control character In computing Computing is any goal-oriented activity requiring, benefiting from, or creating computing machinery. It inclu ...
,
line feed Newline (frequently called line ending, end of line (EOL), next line (NEL) or line break) is a control character In computing Computing is any goal-oriented activity requiring, benefiting from, or creating computing machinery. It includes ...
and tab codes. For example, lowercase ''
i
i
'' would be represented in the ASCII encoding by
binary Binary may refer to: Science and technology Mathematics * Binary number In mathematics and digital electronics, a binary number is a number expressed in the base-2 numeral system or binary numeral system, which uses only two symbols: ty ...
1101001 =
hexadecimal In mathematics and computing, the hexadecimal (also base 16 or hex) numeral system is a Numeral system#Positional systems in detail, positional numeral system that represents numbers using a radix (base) of 16. Unlike the decimal system repres ...
69 (''i'' is the ninth letter) =
decimal The decimal numeral system A numeral system (or system of numeration) is a writing system A writing system is a method of visually representing verbal communication Communication (from Latin ''communicare'', meaning "to share") is t ...
105.


History

The American Standard Code for Information Interchange (ASCII) was developed under the auspices of a committee of the
American Standards Association The American National Standards Institute (ANSI ) is a private non-profit organization A nonprofit organization (NPO), also known as a non-business entity, not-for-profit organization, or nonprofit institution, is a legal entity organize ...
(ASA), called the X3 committee, by its X3.2 (later X3L2) subcommittee, and later by that subcommittee's X3.2.4 working group (now
INCITS The InterNational Committee for Information Technology Standards (INCITS), (pronounced "insights"), is an ANSI The American National Standards Institute (ANSI ) is a private non-profit organization A nonprofit organization (NPO), also k ...
). The ASA became the
United States of America Standards Institute The American National Standards Institute (ANSI ) is a private non-profit organization that oversees the development of Standardization, voluntary consensus standards for products, services, processes, systems, and personnel in the United Stat ...
(USASI) and ultimately the
American National Standards Institute The American National Standards Institute (ANSI ) is a private non-profit organization that oversees the development of Standardization, voluntary consensus standards for products, services, processes, systems, and personnel in the United Sta ...
(ANSI). With the other special characters and control codes filled in, ASCII was published as ASA X3.4-1963, leaving 28 code positions without any assigned meaning, reserved for future standardization, and one unassigned control code. There was some debate at the time whether there should be more control characters rather than the lowercase alphabet. The indecision did not last long: during May 1963 the CCITT Working Party on the New Telegraph Alphabet proposed to assign lowercase characters to ''sticks'' 6 and 7,Brief Report: Meeting of CCITT Working Party on the New Telegraph Alphabet, May 13–15, 1963. and
International Organization for Standardization The International Organization for Standardization (ISO ) is an international standard An international standard is a technical standard A technical standard is an established norm Norm, the Norm or NORM may refer to: In academic discipline ...
TC 97 SC 2 voted during October to incorporate the change into its draft standard.Report of ISO/TC/97/SC 2 – Meeting of October 29–31, 1963. The X3.2.4 task group voted its approval for the change to ASCII at its May 1963 meeting. Locating the lowercase letters in ''sticks'' 6 and 7 caused the characters to differ in bit pattern from the upper case by a single bit, which simplified
case-insensitiveIn computers, case sensitivity defines whether uppercase and lowercase letters are treated as distinct (case-sensitive) or equivalent (case-insensitive). For instance, when users interested in learning about dogs search an e-book An electronic b ...
character matching and the construction of keyboards and printers. The X3 committee made other changes, including other new characters (the
brace Brace(s) or bracing may refer to: Medical * Orthotics, Orthopaedic brace, a device used to restrict or assist body movement ** Back brace, a device limiting motion of the spine *** Milwaukee brace, a kind of back brace used in the treatment of sp ...
and
vertical bar The vertical bar, , is a glyph with various uses in mathematics, computing, and typography. It has many names, often related to particular meanings: Sheffer stroke (in mathematical logic, logic), pipe, vbar, stick, vertical line, bar, verti-bar ...
characters), renaming some control characters (SOM became start of header (SOH)) and moving or removing others (RU was removed). ASCII was subsequently updated as USAS X3.4-1967, then USAS X3.4-1968, ANSI X3.4-1977, and finally, ANSI X3.4-1986. Revisions of the ASCII standard: * ASA X3.4-1963 * ASA X3.4-1965 (approved, but not published, nevertheless used by
IBM 2260 The text-only monochrome during the 1889 Exposition Universelle rendered with a monochrome palette of a limited number of shades File:Mp3 player.jpg, A Philips branded digital audio player with a monochrome display with green backlit, co ...

IBM 2260
&
2265 In contemporary history, the third millennium of the anno Domini or Common Era in the Gregorian calendar is the current millennium spanning the years 2001 to 3000 (21st century, 21st to 30th century, 30th centuries). Ongoing futures studies seek ...
Display Stations and
IBM 2848 The text-only monochrome during the 1889 Exposition Universelle rendered with a monochrome palette of a limited number of shades File:Mp3 player.jpg, A Philips branded digital audio player with a monochrome display with green backlit, co ...
Display Control) * USAS X3.4-1967 * USAS X3.4-1968 * ANSI X3.4-1977 * ANSI X3.4-1986 * ANSI X3.4-1986 (R1992) * ANSI X3.4-1986 (R1997) * ANSI INCITS 4-1986 (R2002) * ANSI INCITS 4-1986 (R2007) * (ANSI) INCITS 4-1986ref name="INCITS_4-1986_R2012"/> * (ANSI) INCITS 4-1986
2017 2017 was designated as International Year of Sustainable Tourism for Development2017 was declared as the International Year of Sustainable Tourism for Development by the United Nations General Assembly on 4 December 2015 relating to sustainab ...
ref name="INCITS_4-1986_R2017"/> In the X3.15 standard, the X3 committee also addressed how ASCII should be transmitted (
least significant bit In computing Computing is any goal-oriented activity requiring, benefiting from, or creating computing machinery. It includes the study and experimentation of algorithmic processes and development of both computer hardware , hardware and softwa ...

least significant bit
first), and how it should be recorded on perforated tape. They proposed a
9-track The IBM System/360, announced in 1964, introduced what is now generally known as 9 track tape. The  inch (12.7 mm) wide Magnetic tape data storage, magnetic tape media and reels are the same size as the earlier IBM 7 track format it rep ...
standard for magnetic tape, and attempted to deal with some
punched card A punched card (also punch cardSteven Pinker, in ''The Stuff of Thought'', Viking, 2007, p.362, notes the loss of ''-ed'' in pronunciation ''as it did in ice cream, mincemeat, and box set, formerly iced cream, minced meat, and boxed set.'' or p ...

punched card
formats.


Design considerations


Bit width

The X3.2 subcommittee designed ASCII based on the earlier teleprinter encoding systems. Like other
character encoding Character encoding is the process of assigning numbers to graphical Graphics (from Greek Greek may refer to: Greece Anything of, from, or related to Greece Greece ( el, Ελλάδα, , ), officially the Hellenic Republic, is a country ...
s, ASCII specifies a correspondence between digital bit patterns and
character Character(s) may refer to: Arts, entertainment, and media Literature * ''Character'' (novel), a 1936 Dutch novel by Ferdinand Bordewijk * ''Characters'' (Theophrastus), a classical Greek set of character sketches attributed to Theophrastus M ...
symbols (i.e.
grapheme In linguistics Linguistics is the scientific study of language A language is a structured system of communication used by humans, including speech (spoken language), gestures (Signed language, sign language) and writing. Most langu ...

grapheme
s and
control character In computing Computing is any goal-oriented activity requiring, benefiting from, or creating computing machinery. It includes the study and experimentation of algorithmic processes and development of both computer hardware , hardware and sof ...
s). This allows
digital Digital usually refers to something using digits, particularly binary digits. Technology and computing Hardware *Digital electronics Digital electronics is a field of electronics Electronics comprises the physics, engineering, technology a ...
devices to communicate with each other and to process, store, and communicate character-oriented information such as written language. Before ASCII was developed, the encodings in use included 26
alphabetic An alphabet is a standardized set of basic written symbols or graphemes (called letter (alphabet), letters) that represent the phonemes of certain spoken languages. Not all writing systems represent language in this way; in a syllabary, each ...
characters, 10
numerical digit A numerical digit (often shortened to just digit) is a single symbol used alone (such as "2") or in combinations (such as "25"), to represent number A number is a mathematical object A mathematical object is an abstract concept arising in mat ...
s, and from 11 to 25 special graphic symbols. To include all these, and control characters compatible with the Comité Consultatif International Téléphonique et Télégraphique (CCITT)
International Telegraph Alphabet No. 2 The Baudot code is an early character encoding In computing Computing is any goal-oriented activity requiring, benefiting from, or creating computing machinery. It includes the study and experimentation of algorithmic processes and developme ...
(ITA2) standard of 1924, (1956), and early
EBCDIC Extended Binary Coded Decimal Interchange Code (EBCDIC; ) is an eight-bit character encoding used mainly on IBM mainframe and IBM midrange computer operating systems. It descended from the code used with punched cards and the corresponding six-b ...
(1963), more than 64 codes were required for ASCII. ITA2 were in turn based on the 5-bit telegraph code
Émile Baudot Jean-Maurice-Émile Baudot (; 11 September 1845 – 28 March 1903), French telegraph Telegraphy is the long-distance transmission of textual messages where the sender uses a semaphore system, known to the recipient, rather than a physica ...
invented in 1870 and patented in 1874. The committee debated the possibility of a shift function (like in
ITA2 The Baudot code is an early character encoding Character encoding is the process of assigning numbers to Graphics, graphical character (computing), characters, especially the written characters of Language, human language, allowing them to b ...

ITA2
), which would allow more than 64 codes to be represented by a six-bit code. In a shifted code, some character codes determine choices between options for the following character codes. It allows compact encoding, but is less reliable for
data transmission Data transmission and data reception or, more broadly, data communication or digital communications is the transfer and reception of data Data (; ) are individual facts, statistics, or items of information, often numeric. In a more techn ...

data transmission
, as an error in transmitting the shift code typically makes a long part of the transmission unreadable. The standards committee decided against shifting, and so ASCII required at least a seven-bit code. The committee considered an eight-bit code, since eight bits (
octet Octet may refer to: Music * Octet (music) In music, an octet is a musical ensemble consisting of eight Musical instrument, instruments or voices, or a musical composition written for such an ensemble. Octets in classical music Octets in Europea ...
s) would allow two four-bit patterns to efficiently encode two digits with
binary-coded decimal In computing and electronics, electronic systems, binary-coded decimal (BCD) is a class of Binary numeral system, binary encodings of decimal numbers where each numerical digit, digit is represented by a fixed number of bits, usually four or ei ...
. However, it would require all data transmission to send eight bits when seven could suffice. The committee voted to use a seven-bit code to minimize costs associated with data transmission. Since perforated tape at the time could record eight bits in one position, it also allowed for a
parity bit A parity bit, or check bit, is a bit The bit is a basic unit of information in computing Computing is any goal-oriented activity requiring, benefiting from, or creating computing machinery. It includes the study and experimentation of al ...
for
error checking In information theory Information theory is the scientific study of the quantification, storage, and communication Communication (from Latin ''communicare'', meaning "to share") is the act of developing Semantics, meaning among Subjec ...
if desired. Eight-bit machines (with octets as the native data type) that did not use parity checking typically set the eighth bit to 0.


Internal organization

The code itself was patterned so that most control codes were together and all graphic codes were together, for ease of identification. The first two so-called ''ASCII sticks'' (32 positions) were reserved for control characters. The had to come before graphics to make
sorting Sorting is any process of arranging items systematically, and has two common, yet distinct meanings: # Collating order, ordering: arranging items in a sequence ordered by some criterion; # categorization, categorizing: grouping items with simil ...
easier, so it became position 20 hex; for the same reason, many special signs commonly used as separators were placed before digits. The committee decided it was important to support
uppercase Letter case is the distinction between the letters Letter, letters, or literature may refer to: Characters typeface * Letter (alphabet) A letter is a segmental symbol A symbol is a mark, sign, or word that indicates, signifies, or ...
64-character alphabets, and chose to pattern ASCII so it could be reduced easily to a usable 64-character set of graphic codes, as was done in the
DEC SIXBIT A six-bit character code is a character encoding In computing Computing is any goal-oriented activity requiring, benefiting from, or creating computing machinery. It includes the study and experimentation of algorithmic processes and developmen ...
code (1963).
Lowercase Letter case is the distinction between the letters Letter, letters, or literature may refer to: Characters typeface * Letter (alphabet) A letter is a segmental symbol A symbol is a mark, sign, or word that indicates, signifies, or i ...
letters were therefore not interleaved with uppercase. To keep options available for lowercase letters and other graphics, the special and numeric codes were arranged before the letters, and the letter ''A'' was placed in position 41 hex to match the draft of the corresponding British standard. The digits 0–9 are prefixed with 011, but the remaining 4 bits correspond to their respective values in binary, making conversion with
binary-coded decimal In computing and electronics, electronic systems, binary-coded decimal (BCD) is a class of Binary numeral system, binary encodings of decimal numbers where each numerical digit, digit is represented by a fixed number of bits, usually four or ei ...
straightforward. Many of the non-alphanumeric characters were positioned to correspond to their shifted position on typewriters; an important subtlety is that these were based on ''mechanical'' typewriters, not ''electric'' typewriters. Mechanical typewriters followed the standard set by the Remington No. 2 (1878), the first typewriter with a shift key, and the shifted values of 23456789- were "#$%_&'() early typewriters omitted ''0'' and ''1'', using ''O'' (capital letter ''o'') and ''l'' (lowercase letter ''L'') instead, but 1! and 0) pairs became standard once 0 and 1 became common. Thus, in ASCII !"#$% were placed in the second stick, positions 1–5, corresponding to the digits 1–5 in the adjacent stick. The parentheses could not correspond to ''9'' and ''0'', however, because the place corresponding to ''0'' was taken by the space character. This was accommodated by removing _ (underscore) from ''6'' and shifting the remaining characters, which corresponded to many European typewriters that placed the parentheses with ''8'' and ''9''. This discrepancy from typewriters led to
bit-paired keyboard A bit-paired keyboard is a keyboard where the layout Layout may refer to: * Page layout, the arrangement of visual elements on a page ** Comprehensive layout (comp), a proposed page layout presented by a designer to their client * Layout (comput ...
s, notably the
Teletype Model 33 The Teletype Model 33 is an electromechanical teleprinter designed for light-duty office use. It is less rugged and cost less than earlier Teletype machines. The Teletype Corporation introduced the Model 33 as a commercial product in 1963 after ...
, which used the left-shifted layout corresponding to ASCII, not to traditional mechanical typewriters. Electric typewriters, notably the
IBM Selectric The IBM Selectric typewriter was a highly successful line of electric typewriters introduced by IBM International Business Machines Corporation (IBM) is an American multinational technology company headquartered in Armonk, New York, ...

IBM Selectric
(1961), used a somewhat different layout that has become standard on computers following the
IBM PC The IBM Personal Computer (model 5150, commonly known as the IBM PC) is the first computer released in the IBM PC model line and the basis for the IBM PC compatible IBM PC compatible computers are similar to the original IBM PC The IBM ...

IBM PC
(1981), especially
Model M Model M designates a group of computer keyboard A computer keyboard is a peripheral A peripheral or peripheral device is an auxiliary device used to put information into and get information out of the computer. The term peripheral devic ...
(1984) and thus shift values for symbols on modern keyboards do not correspond as closely to the ASCII table as earlier keyboards did. The /? pair also dates to the No. 2, and the ,< .> pairs were used on some keyboards (others, including the No. 2, did not shift , (comma) or . (full stop) so they could be used in uppercase without unshifting). However, ASCII split the ;: pair (dating to No. 2), and rearranged mathematical symbols (varied conventions, commonly -* =+) to :* ;+ -=. Some common characters were not included, notably ½¼¢, while ^`~ were included as diacritics for international use, and <> for mathematical use, together with the simple line characters \, (in addition to common /). The ''@'' symbol was not used in continental Europe and the committee expected it would be replaced by an accented ''À'' in the French variation, so the ''@'' was placed in position 40 hex, right before the letter A. The control codes felt essential for data transmission were the start of message (SOM), end of address (EOA), end of message (EOM), end of transmission (EOT), "who are you?" (WRU), "are you?" (RU), a reserved device control (DC0), synchronous idle (SYNC), and acknowledge (ACK). These were positioned to maximize the
Hamming distance In information theory Information theory is the scientific study of the quantification, storage, and communication Communication (from Latin ''communicare'', meaning "to share" or "to be in relation with") is "an apparent answer to ...
between their bit patterns.


Character order

ASCII-code order is also called ''ASCIIbetical'' order.
Collation Collation is the assembly of written information into a standard order. Many systems of collation are based on numerical order or alphabetical order, or extensions and combinations thereof. Collation is a fundamental element of most office fili ...
of data is sometimes done in this order rather than "standard" alphabetical order ( collating sequence). The main deviations in ASCII order are: * All uppercase come before lowercase letters; for example, "Z" precedes "a" * Digits and many punctuation marks come before letters An intermediate order converts uppercase letters to lowercase before comparing ASCII values.


Character groups


Control characters

ASCII reserves the first 32 codes (numbers 0–31 decimal) for
control character In computing Computing is any goal-oriented activity requiring, benefiting from, or creating computing machinery. It includes the study and experimentation of algorithmic processes and development of both computer hardware , hardware and sof ...
s: codes originally intended not to represent printable information, but rather to control devices (such as
printers Printers may be: Technology * Printer (publishing) In publishing, printers are both companies A company, abbreviated as co., is a legal entity In law, a legal person is any person A person (plural people or persons) is a being th ...
) that make use of ASCII, or to provide 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". refers to control characters that do not include carriage return, line feed or white space as non-whitespace control characters. (NB. NO-WS-CTL.) Except for the control characters that prescribe elementary line-oriented formatting, ASCII does not define any mechanism for describing the structure or appearance of text within a document. Other schemes, such as
markup language #REDIRECT Markup language In computer text processing, a markup language is a system for annotation, annotating a document in a way that is Syntax (logic), syntactically distinguishable from the text, meaning when the document is processed for di ...
s, address page and document layout and formatting. The original ASCII standard used only short descriptive phrases for each control character. The ambiguity this caused was sometimes intentional, for example where a character would be used slightly differently on a terminal link than on a
data stream In connection-oriented communication Connection-oriented communication is a network communication mode in telecommunications and computer networking, where a communication session or a semi-permanent connection is established before any useful ...
, and sometimes accidental, for example with the meaning of "delete". Probably the most influential single device on the interpretation of these characters was the
Teletype Model 33 The Teletype Model 33 is an electromechanical teleprinter designed for light-duty office use. It is less rugged and cost less than earlier Teletype machines. The Teletype Corporation introduced the Model 33 as a commercial product in 1963 after ...
ASR, which was a printing terminal with an available
paper tape Five- and eight-hole punched paper tape file:Harwell-dekatron-witch-10.jpg, Paper tape reader on the Harwell computer with a small piece of five-hole tape connected in a circle – creating a physical program loop Punched tape or perforated pape ...

paper tape
reader/punch option. Paper tape was a very popular medium for long-term program storage until the 1980s, less costly and in some ways less fragile than magnetic tape. In particular, the Teletype Model 33 machine assignments for codes 17 (Control-Q, DC1, also known as XON), 19 (Control-S, DC3, also known as XOFF), and 127 (
Delete In the database structured query language (SQL), the DELETE statement removes one or more records from a Table (database), table. A subset may be defined for deletion using a condition, otherwise all records are removed. Some Database#Database mana ...

Delete
) became de facto standards. The Model 33 was also notable for taking the description of Control-G (code 7, BEL, meaning audibly alert the operator) literally, as the unit contained an actual bell which it rang when it received a BEL character. Because the keytop for the O key also showed a left-arrow symbol (from ASCII-1963, which had this character instead of
underscore Underscored or underlined text. An underscore, also called an underline, low line or low dash, is a line drawn under a segment of text. In proofreading Proofreading is the reading (activity), reading of a galley proof or an electronic copy of ...

underscore
), a noncompliant use of code 15 (Control-O, Shift In) interpreted as "delete previous character" was also adopted by many early timesharing systems but eventually became neglected. When a Teletype 33 ASR equipped with the automatic paper tape reader received a Control-S (XOFF, an abbreviation for transmit off), it caused the tape reader to stop; receiving Control-Q (XON, "transmit on") caused the tape reader to resume. This technique became adopted by several early computer operating systems as a "handshaking" signal warning a sender to stop transmission because of impending overflow; it persists to this day in many systems as a manual output control technique. On some systems Control-S retains its meaning but Control-Q is replaced by a second Control-S to resume output. The 33 ASR also could be configured to employ Control-R (DC2) and Control-T (DC4) to start and stop the tape punch; on some units equipped with this function, the corresponding control character lettering on the keycap above the letter was TAPE and TAPE respectively.


Delete & Backspace

The Teletype could not move the head backwards, so it did not put a key on the keyboard to send a BS (backspace). Instead there was a key marked that sent code 127 (DEL). The purpose of this key was to erase mistakes in a hand-typed paper tape: the operator had to push a button on the tape punch to back it up, then type the rubout, which punched all holes and replaced the mistake with a character that was intended to be ignored. Teletypes were commonly used for the less-expensive computers from
Digital Equipment Corporation Digital Equipment Corporation (DEC ), using the trademark A trademark (also written trade mark or trade-mark) is a type of intellectual property Intellectual property (IP) is a category of property Property is a system of rights ...
, so these systems had to use the available key and thus the DEL code to erase the previous character. Because of this, DEC video terminals (by default) sent the DEL code for the key marked "Backspace" while the key marked "Delete" sent an escape sequence, while many other terminals sent BS for the Backspace key. The Unix terminal driver could only use one code to erase the previous character, this could be set to BS ''or'' DEL, but not both, resulting in a long period of annoyance where users had to correct it depending on what terminal they were using (shells that allow line editing, such as ksh, bash, and
zsh The Z shell (Zsh) is a Unix shell A Unix shell is a command-line interpreter or shell Shell may refer to: Architecture and design * Shell (structure)A shell is a type of structural element which is characterized by its geometry, being a thr ...
, understand both). The assumption that no key sent a BS caused Control+H to be used for other purposes, such as the "help" prefix command in
GNU Emacs GNU Emacs is a free software text editor. It was created by GNU Project founder Richard Stallman. In common with other varieties of Emacs, GNU Emacs is extensible using a Turing complete programming language. GNU Emacs has been called "the most p ...
.


Escape

Many more of the control codes have been given meanings quite different from their original ones. The "escape" character (ESC, code 27), for example, was intended originally to allow sending other control characters as literals instead of invoking their meaning. This is the same meaning of "escape" encountered in URL encodings,
C language C (, as in the letter ''c'') is a general-purpose, procedural computer programming language A programming language is a formal language comprising a Instruction set architecture, set of instructions that produce various kinds of Input/outp ...
strings, and other systems where certain characters have a reserved meaning. Over time this meaning has been co-opted and has eventually been changed. In modern use, an ESC sent to the terminal usually indicates the start of a command sequence usually in the form of a so-called "
ANSI escape code ANSI escape sequences are a standard for in-band signaling to control cursor location, color, font styling, and other options on video text terminals and terminal emulators. Certain sequences of bytes, most starting with an Escape character#AS ...
" (or, more properly, a "
Control Sequence Introducer ANSI escape sequences are a standard for in-band signaling to control cursor location, color, font styling, and other options on video text terminal A computer terminal is an electronic or electromechanical computer hardware, hardware devi ...
") from ECMA-48 (1972) and its successors, beginning with ESC followed by a "
out-of-band Out-of-band_is_activity_outside_a_defined_telecommunications_frequency_band_(radio),_band,_or,_metaphorically,_outside_some_other_kind_of_activity._Protection_from_falsing_is_among_its_purposes. _Examples_General_usage *_Out-of-band_agreement,_an__...
_character_used_to_terminate_an_operation,_as_in_the_Text_Editor_and_Corrector.html" ;"title="out-of-band_data.html" "title="/nowiki>" (left-bracket) character. An ESC sent from the terminal is most often used as an out-of-band data">out-of-band Out-of-band is activity outside a defined telecommunications frequency band (radio), band, or, metaphorically, outside some other kind of activity. Protection from falsing is among its purposes. Examples General usage * Out-of-band agreement, an ...
character used to terminate an operation, as in the Text Editor and Corrector">TECO and vi text editors. In graphical user interface (GUI) and window (computing), windowing systems, ESC generally causes an application to abort its current operation or to exit (system call), exit (terminate) altogether.


End of Line

The inherent ambiguity of many control characters, combined with their historical usage, created problems when transferring "plain text" files between systems. The best example of this is the
newline Newline (frequently called line ending, end of line (EOL), next line (NEL) or line break) is a control character or sequence of control characters in a character encoding specification (e.g., ASCII, EBCDIC) that is used to signify the end of a ...

newline
problem on various
operating system An operating system (OS) is system software System software is software designed to provide a platform for other software. Examples of system software include operating systems (OS) like macOS, Linux, Android (operating system), Android and Mi ...

operating system
s. Teletype machines required that a line of text be terminated with both "Carriage Return" (which moves the printhead to the beginning of the line) and "Line Feed" (which advances the paper one line without moving the printhead). The name "Carriage Return" comes from the fact that on a manual
typewriter A typewriter is a mechanical Mechanical may refer to: Machine * Mechanical system A machine is any physical system with ordered structural and functional properties. It may represent human-made or naturally occurring device molecular ...

typewriter
the carriage holding the paper moved while the position where the typebars struck the ribbon remained stationary. The entire carriage had to be pushed (returned) to the right in order to position the left margin of the paper for the next line. DEC operating systems (
OS/8 OS/8 was the primary operating system used on the Digital Equipment Corporation's PDP-8 minicomputer. Pre-OS/8 there were earlier PDP-8 operating systems: * R-L Monitor, also referred to as MS/8. * P?S/8, requiring only 4K of memory. * PDP-8 4K D ...
,
RT-11 RT-11 ("RT" for ''real-time'') is a discontinued small, low-end, single-user real-time operating system A real-time operating system (RTOS) is an operating system An operating system (OS) is system software that manages computer hardware, compu ...
,
RSX-11 RSX-11 is a discontinued family of multi-user Multi-user software is software, computer software that allows access by multiple User (computing), users of a computer. Time-sharing systems are multi-user systems. Most batch processing systems for m ...
, RSTS,
TOPS-10 TOPS-10 System (''Timesharing / Total Operating System-10'') is a discontinued operating system An operating system (OS) is system software System software is software designed to provide a platform for other software. Examples of system sof ...
, etc.) used both characters to mark the end of a line so that the console device (originally Teletype machines) would work. By the time so-called "glass TTYs" (later called CRTs or terminals) came along, the convention was so well established that backward compatibility necessitated continuing the convention. When
Gary Kildall Gary Arlen Kildall (; May 19, 1942 – July 11, 1994) was an American computer scientist A computer scientist is a person who has acquired the knowledge of computer science Computer science deals with the theoretical foundations o ...
created
CP/M CP/M, originally standing for Control Program/Monitor and later Control Program for Microcomputers, is a mass-market operating system An operating system (OS) is system software System software is software designed to provide a platform ...
he was inspired by some command line interface conventions used in DEC's
RT-11 RT-11 ("RT" for ''real-time'') is a discontinued small, low-end, single-user real-time operating system A real-time operating system (RTOS) is an operating system An operating system (OS) is system software that manages computer hardware, compu ...
. Until the introduction of
PC DOS PC or pc may refer to: Arts and entertainment * Player character A player character (also known as a playable character or PC) is a fictional Character (arts), character in a video game or tabletop role-playing game whose actions are control ...
in 1981,
IBM International Business Machines Corporation (IBM) is an American multinational technology company headquartered in Armonk, New York, with operations in over 170 countries. The company began in 1911, founded in Endicott, New York, as the C ...

IBM
had no hand in this because their 1970s operating systems used EBCDIC instead of ASCII and they were oriented toward punch-card input and line printer output on which the concept of carriage return was meaningless. IBM's
PC DOS PC or pc may refer to: Arts and entertainment * Player character A player character (also known as a playable character or PC) is a fictional Character (arts), character in a video game or tabletop role-playing game whose actions are control ...
(also marketed as
MS-DOS MS-DOS ( ; acronym for Microsoft Disk Operating System, also known as Microsoft DOS) is an operating system An operating system (OS) is system software System software is software designed to provide a platform for other software. Example ...
by Microsoft) inherited the convention by virtue of being loosely based on CP/M, and
Windows Microsoft Windows, commonly referred to as Windows, is a group of several proprietary {{Short pages monitor * *

{{Authority control ASCII, Computer-related introductions in 1963 Character sets Character encoding Latin-script representations Presentation layer protocols