ASCII

Section: Linux Programmer's Manual (7)
Updated: 2020-06-09
Page Index
 

NAME

ascii - ASCII character set encoded in octal, decimal, and hexadecimal  

DESCRIPTION

ASCII is the American Standard Code for Information Interchange. It is a 7-bit code. Many 8-bit codes (e.g., ISO 8859-1) contain ASCII as their lower half. The international counterpart of ASCII is known as ISO 646-IRV.

The following table contains the 128 ASCII characters.

C program '\X' escapes are noted.

OctDecHexCharOctDecHexChar

000000NUL '\0' (null character)1006440@
001101SOH (start of heading)1016541A
002202STX (start of text)1026642B
003303ETX (end of text)1036743C
004404EOT (end of transmission)1046844D
005505ENQ (enquiry)1056945E
006606ACK (acknowledge)1067046F
007707BEL '\a' (bell)1077147G
010808BS '\b' (backspace)1107248H
011909HT '\t' (horizontal tab)1117349I
012100ALF '\n' (new line)112744AJ
013110BVT '\v' (vertical tab)113754BK
014120CFF '\f' (form feed)114764CL
015130DCR '\r' (carriage ret)115774DM
016140ESO (shift out)116784EN
017150FSI (shift in)117794FO
0201610DLE (data link escape)1208050P
0211711DC1 (device control 1)1218151Q
0221812DC2 (device control 2)1228252R
0231913DC3 (device control 3)1238353S
0242014DC4 (device control 4)1248454T
0252115NAK (negative ack.)1258555U
0262216SYN (synchronous idle)1268656V
0272317ETB (end of trans. blk)1278757W
0302418CAN (cancel)1308858X
0312519EM (end of medium)1318959Y
032261ASUB (substitute)132905AZ
033271BESC (escape)133915B[
034281CFS (file separator)134925C\ '\\'
035291DGS (group separator)135935D]
036301ERS (record separator)136945Eha
037311FUS (unit separator)137955F_
0403220SPACE1409660`
0413321!1419761a
0423422"1429862b
0433523#1439963c
0443624$14410064d
0453725%14510165e
0463826&14610266f
0473927'14710367g
0504028(15010468h
0514129)15110569i
052422A*1521066Aj
053432B+1531076Bk
054442C,1541086Cl
055452D-1551096Dm
056462E.1561106En
057472F/1571116Fo
0604830016011270p
0614931116111371q
0625032216211472r
0635133316311573s
0645234416411674t
0655335516511775u
0665436616611876v
0675537716711977w
0705638817012078x
0715739917112179y
072583A:1721227Az
073593B;1731237B{
074603C<1741247C|
075613D= 1751257D}
076623E>1761267E~
077633F?1771277FDEL
 

Tables

For convenience, below are more compact tables in hex and decimal.

   2 3 4 5 6 7       30 40 50 60 70 80 90 100 110 120
 -------------      ---------------------------------
0:   0 @ P ` p     0:    (  2  <  F  P  Z  d   n   x
1: ! 1 A Q a q     1:    )  3  =  G  Q  [  e   o   y
2: " 2 B R b r     2:    *  4  >  H  R  \  f   p   z
3: # 3 C S c s     3: !  +  5  ?  I  S  ]  g   q   {
4: $ 4 D T d t     4: "  ,  6  @  J  T  ha  h   r   |
5: % 5 E U e u     5: #  -  7  A  K  U  _  i   s   }
6: & 6 F V f v     6: $  .  8  B  L  V  `  j   t   ~
7: ' 7 G W g w     7: %  /  9  C  M  W  a  k   u  DEL
8: ( 8 H X h x     8: &  0  :  D  N  X  b  l   v
9: ) 9 I Y i y     9: '  1  ;  E  O  Y  c  m   w
A: * : J Z j z
B: + ; K [ k {
C: , < L \ l |
D: - = M ] m }
E: . > N ha n ~
F: / ? O _ o DEL
 

NOTES

 

History

An ascii manual page appeared in Version 7 of AT&T UNIX.

On older terminals, the underscore code is displayed as a left arrow, called backarrow, the caret is displayed as an up-arrow and the vertical bar has a hole in the middle.

Uppercase and lowercase characters differ by just one bit and the ASCII character 2 differs from the double quote by just one bit, too. That made it much easier to encode characters mechanically or with a non-microcontroller-based electronic keyboard and that pairing was found on old teletypes.

The ASCII standard was published by the United States of America Standards Institute (USASI) in 1968.  

SEE ALSO

charsets(7), iso_8859-1(7), iso_8859-2(7), iso_8859-3(7), iso_8859-4(7), iso_8859-5(7), iso_8859-6(7), iso_8859-7(7), iso_8859-8(7), iso_8859-9(7), iso_8859-10(7), iso_8859-11(7), iso_8859-13(7), iso_8859-14(7), iso_8859-15(7), iso_8859-16(7), utf-8(7)  

COLOPHON

This page is part of release 5.10 of the Linux man-pages project. A description of the project, information about reporting bugs, and the latest version of this page, can be found at https://www.kernel.org/doc/man-pages/.


 

Index

NAME
DESCRIPTION
Tables
NOTES
History
SEE ALSO
COLOPHON