1、kNSIINCITS 4-1986 (RI993 (formerly ANSI X3.4-1986 1997) ADOPTED FOR USE BY THE FEDERAL GOVERNMENT WA- b PUB 1-2 SEE NOTICE ON INSIDE for Information Systems - Coded Character Sets - 7-Bit American National Standard for In forma tion In terchange (7- Bit ASCII) Code Developed by Where IT all begins T
2、his standard has been adopted for Federal Government use. Details concerning its use within the Federal Government are contained in Federal Information Processing Standards Publication 153, Programmers Hierarchical Interactive Graphics System (PHIGS). For a complete list of the publications availabl
3、e in the Federal Information Processing Standards Series, write to the Standards Processing Coordinator (ADP), National Institute of Standards and Tech- nology, Gaithersburg, MD 20899. Approval of an American National Standard requires review by ANSI that the requirements for due process, consensus,
4、 and other criteria for approval have been met by the standards developer. Consensus is established when, in the judgment of the ANSI Board of Standards Review, substantial agreement has been reached by directly and materially affected interests. Substantial agreement means much more than a simple m
5、ajority, but not necessarily unanimity. Consensus requires that all views and objections be considered, and that a concerted effort be made toward their resolution. The use of American National Standards is completely voluntary; their existence does not in any respect preclude anyone, whether he has
6、 approved the standards or not, from manufacturing, marketing, purchasing, or using products, processes, or procedures not conforming to the standards. The American National Standards Institute does not develop standards and will in no circumstances give an interpretation of any American National St
7、andard. Moreover, no person shall have the right or authority to issue an interpretation of an American National Standard in the name of the American National Standards Institute. Requests for interpretations should be addressed to the secretariat or sponsor whose name appears on the title page of t
8、his standard. CAUTION NOTICE: This American National Standard may be revised or withdrawn at any time. The procedures of the American National Standards Institute require that action be taken periodically to reaffirm, revise, or withdraw this standard. Purchasers of American National Standards may r
9、eceive current information on all standards by calling or writing the American National Standards Institute. American National Published by American National Standards Institute 11 West 42nd Street, New York, New York 10036 Copyright O1 986 by Information Technology Industry Council (ITI) All rights
10、 reserved. No part of this publication may be reproduced in any form, in an electronic retrieval system or otherwise, without prior written permission of ITI, 1250 Eye Street NW, Washington, DC 20005. Printed in the United States of America ANSI X3.4-1986 Revision of ANSI X3.4-1977 American National
11、 Standard for Information Systems - Coded Character Sets - 7- Bit American National Standard Code for Information Interchange (7- Bit ASCII) Secretariat Computer and Business Equipment Manufacturers Association Approved March 26, 1986 American National Standards Institute, I nc (This Foreword is not
12、 part of American Nitional Standard X3.4-1986.) Foreword This American National Standard presents the standard coded character set to be used for information interchange among information processing systems, communication systems, and associated equipment. Other standards prescribe the means of impl
13、ementing this standard in media, such as per- forated tape, punched cards, magnetic tape, magnetic tape cassette and cartridges, and optical character recognition. Further standards deal with error control, data communi- cation formats, keyboards, graphic representation of control characters, code e
14、xtension techniques, and media labels and file structures. The 7-bit coded character set was developed from a careful review of past work in the field and after a comprehensive program of original research and code design was com- pleted. Careful consideration has been given to the several conflicti
15、ng requirements for code sets and their resolution is reflected in the standard code. This standard is a revision of American National Standard Code for Information Inter- change, ANSI X3.4-1977, and was developed in parallel with its international counterpart, Informational Processing - IS0 7-Bit C
16、oded Character Set for Information Interchange, IS0 646-1983. This current revision retains the same technical relationship to IS0 646- 1983 as the earlier edition. The text of this revision is quite close to that of IS0 646- 1983. Changes were made to adopt more customary U.S. terminology and to re
17、duce ambiguity. A conformance section has been added to aid users in building compatible equipment. The relationship with American National Standard Code Extension Tech- niques for Use with the 7-Bit Coded Character Set of American National Standard Code for Information Interchange, ANSI X3.41-1974,
18、 has also been included. Suggestions for improvement of this standard will be welcome. They should be sent to the Computer and Business Equipment Manufacturers Association, 3 1 1 First Street, NW, Suite 500, Washington, DC 20001. This standard was processed and approved for submittal to ANSI by Amer
19、ican Na- tional Standards Committee on Information Processing Systems, X3. Committee approval of the standard does not necessarily mean that all committee members voted for its approval. At the time it approved this standard, the X3 Committee had the fol- lowing members: Edward Lohse, Chair Richard
20、Gibson, Vice-Chair Catherine A. Kachurik, Administrative Secretary Organization Represented Name of Representative American Express. D. L. Seigal Lucille Durfee (Alt) American Library Association. . Paul Peters American Nuclear Society Geraldine C. Main D. R. Vondy (Alt) AMP Incorporated Patrick E.
21、Lannan Edward Kelly (Alt) Association for Computing Machinery . Kenneth Mage1 Jon A. Meads (Alt) Association of the Institute for Certification of Computer Professionals. Thomas M. Kurihara AT that is, no action shall be taken and there shall be no effect on the interpretation of subsequent characte
22、rs. (3) Shall image all 94 graphic characters such that each character is recognizable as being associated with one of its names and such that each character is dis- tinguishable from the other graphic characters. No other graphic character may be substituted for any of the graphic characters in the
23、 set. 2.2 Implementation. The use of this character set re- quires definitions of its implementation in various media. For example, these could include punched tapes, punched cards, magnetic media, and transmis- sion channels, thus permitting interchange of data to take place either indirectly by me
24、ans of an intermedi- ate recording in a physical medium, or by local con- nection of various units (such as input and output de- vices and computers) or by means of data transmission equipment. The implementation of this coded charac- ter set in physical media and for transmission, taking into accou
25、nt the need for checking errors, is the sub- ject of other American National Standards and Inter- national Standards (see Appendix E). 3. Definitions 3.1 Active Position. The character position at which the action required by the next character in the data stream is to be effected. If the next chara
26、cter is a graphic character, it is imaged at that position, if it is a control character, the corresponding function is per- formed relative to that position. 3.2 Bit Combination. An ordered set of bits used for the representation of characters. 3.3 Character. A member of a set of elements used for
27、the organization, control, or representation of data. 3.4 Character Position. A position on an imaging de- vice at which a graphic character can be imaged. 3.5 Coded Character Set; Code. A set of unambigu- ous rules that establishes a character set and the one- to-one relationship between the charac
28、ters of the set and their assigned bit combinations. 3.6 Code Extension. The techniques for encoding characters that are not included in the character set of a given code. 3.7 Code Table. A table showing the character allo- cated to each bit combination in a code. 3.8 Control Character. A control fu
29、nction that is coded as a single bit combination. 3.9 Control Function. An action that affects the re- cording, processing, transmission, or interpretation of data and that has a coded representation consisting of one or more bit combinations. 3.10 Graphic Character. A character, other than a con- t
30、rol function, that has a visual representation normally handwritten, printed, or displayed. AMERICAN NATIONAL STANDARD X3.4-1986 3.1 1 Graphic Symbol. A visual representation of a graphic character or of a control function. 3.12 Code Table Position. That part of a code table identified by its column
31、 and row coordinates. 3.13 Small Letter. A lowercase letter. 3.14 Capital Letter. An uppercase letter 4. Specification of the Coded Character Set The bits of the bit combinations of the 7-bit code are identified by b7. b6, b5, b4, b3, bz, and bl ,where b7 is the highest order bit (most significant b
32、it), and bl is the lowest order bit (least significant bit). The bit combination may be interpreted to represent num- bers in the range O to 127 in binary notation by at- tributing the following weights to the individual bits: Bit: b7 b6 bS b4 b3 bz bi Weight : 64 32 16 08 04 02 O1 In this standard,
33、 the bit combinations are identified by notation of the form x/y, where x is a number in the range O to 7 andy is a number in the range O to 15. The correspondence between the notations of the form x/y and the bit combinations consisting of the bits b7 to bl is as follows: (i) x is the number repres
34、ented by b7, b6, and b5, where these bits are given the weights 4,2, and 1, re- spect ively . (2) y is the number represented by b4, b3, b2, and bl ,where these bits are given the weights 8,4,2, and 1, respectively. The notations of the form x/y are the same as the ones used to identify positions in
35、 the code table where x is the column number and y the row number (see Section 6). The 128 bit combinations of the 7-bit code repre- sent control characters and graphic characters. The allocation of characters to bit combinations is based on the following principles: (1) The bit combinations 0/0 to
36、1/15 represent 32 control characters (2) The bit combination 2/0 represents the charac- ter SPACE, which is interpreted both as a control char- acter and as a graphic character (3) The bit combinations 2/1 to 7/14 represent 94 graphic characters (4) The bit combination 7/15 represents the control ch
37、aracter DELETE The allocation of individual characters to the bit combinations of the 7-bit code is specified in 4.1,4.2, and 4.3. This standard assigns at least one name to each char- acter. In addition, it specifies an acronym for each con- trol character and for the character SPACE, and a graphic
38、 symbol for each graphic character. By conven- tion, only capital letters and hyphens are used for writing the names of the characters, except when writ- ing the names of small letters. For acronyms. only capital letters and digits are used. It is intended that the acronyms and this convention be re
39、tained in all translations of the text. The names chosen to denote graphic characters are intended to reflect their customary meaning. How- ever, this standard does not restrict the meanings of graphic characters. Neither does it specify a particular style or font design for the graphic characters w
40、hen imaged. 4.1 Control Characters. The control characters of the 7-bit coded character set are classified in the following categories: (1 ) Transmission Control Characters. Transmission control characters are intended to control or facilitate transmission of information over telecommunication netwo
41、rks. Procedures for the use of the transmission control characters on telecommunication networks are the subjects of other standards and correspond to Open Systems Interconnection (OSI) levels i through 4 (see ANSI X3.28-1976 and Appendix E). Transmis- sion control characters may also be referred to
42、 as communication control characters. (2) Fomat Effectors. Format effectors are mainly intended to control the layout and positioning of in- formation on character-imaging devices, such as print- ing and display devices. (3) Code Extension Control Characters. Code ex- tension control characters are
43、used to extend the char- acter set of the code. They may alter the meaning of one or more bit combinations that follow them in the data stream. Procedures for the use of the code exten- sion control characters are specified in ANSI X3.41- 1974. (4) Device Control Characters. Device control character
44、s are intended to control local or remote devices or ancillary devices connected to a data pro- cessing or data communication system. These control characters are not intended to control data communi- cation systems; this should be achieved by the use of transmission control characters. are used to
45、separate and qualify data logically. There are four such characters. They may be used in either hierarchical or nonhierarchical order; in the latter case, their !,pecific meanings depend on the application. (5) Information Separators. Information separators 8 AMERICAN NATIONAL STANDARD X3.4-1986 (6)
46、 Other Control Characters, These are the control characters that fall outside the preceding categories. The composition of each category, and the alloca- tion of the individual control characters in each cate- gory to bit combinations of the 7-bit code are speci- fied in 4.1.1 to 4.1.6. Each of thes
47、e subsections re- fers to a table consisting of three columns. The first column specifies the acronym of each control charac- ter, the second column specifies the standard name of the control character, and the third column, labeled “Coded Representation,” specifies the bit combination representing
48、the control character concerned. Detailed functional descriptions of all control char- acters are given in Section 7. 4.1.1 Transmission Control Characters. The trans- mission control characters and their coded representa- tions are specified in Table 1. their coded representations are specified in
49、Table 2. 4.1.2.1 Concepts. The definitions of the format effectors use the following concepts (1) A page is composed of a number of lines, each being composed of a number of character positions. (2) Each character position is capable of imaging SPACE or a graphic symbol. (3) The graphic symbol imaged at a character posi- tion represents a graphic character, a control function, or a combination of one or more graphic characters and/or control functions. (4) The active position is the character position at which the action required by the next character in the data stream is to be effected