This site is supported by donations to The OEIS Foundation.

ASCII

From OeisWiki
(Redirected from Printable ASCII characters)
Jump to: navigation, search


This article page is a stub, please help by expanding it.


The ASCII (American Standard Code for Information Interchange) character set consists of 128 characters, comprising 33 control characters and 95 printable characters (symbol characters and alphanumeric characters representing Hindu-Arabic numeral characters and Latin alphabet literal characters).

Table of ASCII characters

      Char    NUL 	SOH 	STX 	ETX 	EOT 	ENQ 	ACK 	BEL 	BS 	HT 	LF 	VT 	FF 	CR 	SO 	SI
      HEX     00 	01 	02 	03 	04 	05 	06 	07 	08 	09 	0A      0B      0C      0D      0E      0F 	 
      DEC     00 	01 	02 	03 	04 	05 	06 	07 	08 	09 	10 	11 	12 	13 	14 	15 	 

      Char    DLE 	DC1 	DC2 	DC3 	DC4 	NAK 	SYN 	ETB 	CAN 	EM 	SUB 	ESC 	FS 	GS 	RS 	US 	 
      HEX     10 	11 	12 	13 	14 	15 	16 	17 	18 	19 	1A      1B      1C      1D      1E      1F 	 
      DEC     16 	17 	18 	19 	20 	21 	22 	23 	24 	25 	26 	27 	28 	29 	30 	31 	 

      Char       	! 	" 	# 	$ 	% 	& 	' 	( 	) 	* 	+ 	, 	- 	. 	/ 	 
      HEX     20 	21 	22 	23 	24 	25 	26 	27 	28 	29 	2A      2B      2C      2D      2E      2F 	 
      DEC     32 	33 	34 	35 	36 	37 	38 	39 	40 	41 	42 	43 	44 	45 	46 	47 	 

      Char    0 	1 	2 	3 	4 	5 	6 	7 	8 	9 	: 	; 	< 	= 	> 	? 	 
      HEX     30 	31 	32 	33 	34 	35 	36 	37 	38 	39 	3A      3B      3C      3D      3E      3F 	 
      DEC     48 	49 	50 	51 	52 	53 	54 	55 	56 	57 	58 	59 	60 	61 	62 	63 	 

      Char    @ 	A 	B 	C 	D 	E 	F 	G 	H 	I 	J 	K 	L 	M 	N 	O 	 
      HEX     40 	41 	42 	43 	44 	45 	46 	47 	48 	49 	4A      4B      4C      4D      4E      4F 	 
      DEC     64 	65 	66 	67 	68 	69 	70 	71 	72 	73 	74 	75 	76 	77 	78 	79 	 

      Char    P 	Q 	R 	S 	T 	U 	V 	W 	X 	Y 	Z 	[ 	\ 	] 	^ 	_ 	 
      HEX     50 	51 	52 	53 	54 	55 	56 	57 	58 	59 	5A      5B      5C      5D      5E      5F 	 
      DEC     80 	81 	82 	83 	84 	85 	86 	87 	88 	89 	90 	91 	92 	93 	94 	95 	 

      Char    ` 	a 	b 	c 	d 	e 	f 	g 	h 	i 	j 	k 	l 	m 	n 	o 	 
      HEX     60 	61 	62 	63 	64 	65 	66 	67 	68 	69 	6A      6B      6C      6D      6E      6F 	 
      DEC     96 	97 	98 	99 	100 	101 	102 	103 	104 	105 	106 	107 	108 	109 	110 	111 	 

      Char    p 	q 	r 	s 	t 	u 	v 	w 	x 	y 	z 	{ 	| 	} 	~ 	DEL 	 
      HEX     70 	71 	72 	73 	74 	75 	76 	77 	78 	79 	7A      7B      7C      7D      7E      7F 	 
      DEC     112 	113 	114 	115 	116 	117 	118 	119 	120 	121 	122 	123 	124 	125 	126 	127

ASCII whitespace characters

The ASCII whitespace characters consist of the ASCII format effectors (a subset of the ASCII control characters) and the space (ASCII [invisible] nongraphic printable character)

BS, HT, LF, VT, FF, CR and <space>

with corresponding ASCII codes within the range [8 .. 13] and 32.

The hexadecimal codes are [x08 .. x0D] and x20.

Line endings

Line endings have been done in all of three different ways!

  • Unix/MacOS X: LF
  • Traditional Mac: CR
  • DOS/Windows: CR LF

NOTE: In the Main OEIS, line endings must be LF (Unix style). (Cf. b-files)

However, "thanks to help from Brendan McKay," Neil Sloane "automated the process that converts non-Unix b-files to Unix format, and also replaces tab characters with spaces" so that contributors may freely use DOS/Windows and traditional Mac (pre Mac OS X) text editors to make b-files.[1]

ASCII printable characters

The ninety-five ASCII printable characters (including the space  , an [invisible] nongraphic printable character, just before !)

 !"#$%&'()*+,-./ and 0123456789 and :;<=>?@ and ABCDEFGHIJKLMNOPQRSTUVWXYZ and [\]^_` and abcdefghijklmnopqrstuvwxyz and {|}~

are the characters with corresponding ASCII code within the range [32 .. 126]. (ASCII code 32 corresponds to the space character. The space character is considered an [invisible] nongraphic printable character, not a control character.)

The hexadecimal codes are [x20 .. x7E].

ASCII graphic/nongraphic characters

Among the ninety-five ASCII printable characters, there are the ninety-four [visible] ASCII graphic characters (of which the space is not) and the [invisible] ASCII nongraphic character, namely the space character.

ASCII symbol characters

The thirty-three ASCII symbol characters (including the space   (invisible printable character) just before !)

 !"#$%&'()*+,-./ and :;<=>?@ and [\]^_` and {|}~

are the characters with corresponding ASCII code within the ranges [32 .. 47], [58 .. 64], [91 .. 96] and [123 .. 126]. (ASCII code 32 corresponds to the space character. The space character is considered an [invisible] nongraphic printable character, not a control character.)

The hexadecimal codes are [x20 .. x2F], [x3A .. x40], [x5B .. x60] and [x7B .. x7E].

    HEX   DEC   HTML     Char  Name

    20    32    &#x20;         Space
    21    32    &#x21;    !    Bang, exclamation mark
    22    32    &#x22;    "    Double quote
    23    32    &#x23;    #    Hash, number sigh, pound sign
    24    32    &#x24;    $    Dollar sign
    25    32    &#x25;    %    Modulo sign, Percent sign
    26    32    &#x26;    &    Ampersand, bitwise and
                &amp;     &    
    27    32    &#x27;    '    Single quote, apostrophe
    28    40    &#x28;    (    Opening parenthesis, opening round bracket
    29    41    &#x29;    )    Closing parenthesis, closing round bracket
    2A    42    &#x2A;    *    Asterisk
    2B    43    &#x2B;    +    Plus sign
    2C    44    &#x2C;    ,    Comma
    2D    45    &#x2D;    -    Hyphen
    2E    46    &#x2E;    .    Dot, period
    2F    47    &#x2F;    /    Slash, forward slash, division sign

    3A    58    &#x3A;    :    Colon
    3B    59    &#x3B;    ;    Semicolon
    3C    60    &#x3C;    <    Less than, opening angle bracket
                &lt;      <     
    3D    61    &#x3D;    =    Equal sign
    3E    62    &#x3E;    >    Greater than, closing angle bracket
                &gt;      >     
    3F    63    &#x3F;    ?    Question mark
    40    64    &#x40;    @    Commercial at

    5B    91    &#x5B;    [    Opening square bracket
    5C    92    &#x5C;    \    Backslash
    5D    93    &#x5D;    ]    Closing square bracket
    5E    94    &#x5E;    ^    Caret, circumflex, hat, exponentiation sign
    5F    95    &#x5F;    _    Underscore
    60    96    &#x60;    `    Grave accent, backquote, backtick

    7B    123   &#x7B;    {    Opening brace, opening curly bracket
    7C    124   &#x7C;    |    Pipe, vertical bar, bitwise or
    7D    125   &#x7D;    }    Closing brace, closing curly bracket
    7E    126   &#x7E;    ~    Tilde, similar

ASCII alphanumeric characters

The sixty-two ASCII alphanumeric characters

0123456789 and ABCDEFGHIJKLMNOPQRSTUVWXYZ and abcdefghijklmnopqrstuvwxyz

have their corresponding ASCII code within the ranges [48 .. 57], [65 .. 90] and [97 .. 122].

The hexadecimal codes are [x30 .. x39], [x41 .. x5A] and [x61 .. x7A].

ASCII numeric characters

The ten ASCII numeric characters

0123456789

have their corresponding ASCII code within the range [48 .. 57].

The hexadecimal codes are [x30 .. x39].

ASCII alphabetic characters

The fifty-two ASCII alphabetic characters

ABCDEFGHIJKLMNOPQRSTUVWXYZ and abcdefghijklmnopqrstuvwxyz

have their corresponding ASCII code within the ranges [65 .. 90] and [97 .. 122].

The hexadecimal codes are [x41 .. x5A] and [x61 .. x7A].

ASCII uppercase alphabetic characters

The twenty-six ASCII uppercase alphabetic characters

ABCDEFGHIJKLMNOPQRSTUVWXYZ

have their corresponding ASCII code within the range [65 .. 90].

The hexadecimal codes are [x41 .. x5A].

ASCII lowercase alphabetic characters

The twenty-six ASCII lowercase alphabetic characters

abcdefghijklmnopqrstuvwxyz

have their corresponding ASCII code within the range [97 .. 122].

The hexadecimal codes are [x61 .. x7A].

ASCII control characters

The ASCII control characters are the characters with corresponding ASCII code within the range [0 .. 31] and 127. The following table describes the ASCII control characters. (In the OEIS, we are mostly concerned with the ASCII whitespace characters, which comprise the ASCII format effectors and the space.) (In programming, the NUL control character is used for null pointers and for null terminated [C/C++] strings.)

      DEC     Unicode   Name                   DEC     Unicode   Name                       DEC      Unicode   Name

      00      NUL       NULl                   16      DLE       Data Link Escape           127      DEL       DELete
      01      SOH       Start Of Heading       17      DC1       Device Control 1
      02      STX       Start of TeXt          18      DC2       Device Control 2
      03      ETX       End of TeXt            19      DC3       Device Control 3
      04      EOT       End Of Transmission    20      DC4       Device Control 4
      05      ENQ       ENQuiry                21      NAK	 Negative AcKnowledge	 		 	 
      06      ACK       ACKnowledge            22      SYN       SYNchronous idle
      07      BEL       BELl                   23      ETB       End of Transmission Block
      08      BS        BackSpace              24      CAN       CANcel
      09      HT        Horizontal Tabulation  25      EM        End of Medium
      10      LF        Line Feed              26      SUB       SUBstitute
      11      VT        Vertical Tabulation    27      ESC       ESCape
      12      FF        Form Feed              28      FS        Field Separator
      13      CR        Carriage Return        29      GS        Group Separator
      14      SO        Shift Out              30      RS        Record Separator
      15      SI        Shift In               31      US        Unit Separator

ASCII transmission control characters

The ASCII transmission control characters are

SOH, STX, ETX, EOT, ENQ, ACK, DLE, NAK, SYN, ETB

with corresponding ASCII codes [1 .. 6], 16, [21 .. 23].

The hexadecimal codes are [x01 .. x06], x10 and [x15 .. x17].

ASCII device control characters

The ASCII device control characters are

DC1, DC2, DC3, DC4

with corresponding ASCII codes within the range [17 .. 20].

The hexadecimal codes are [x11 .. x14].

ASCII format effectors

The ASCII format effectors are

BS, HT, LF, VT, FF, CR

with corresponding ASCII codes within the range [8 .. 13].

The hexadecimal codes are [x08 .. x0D].

ASCII control characters used to separate and qualify data logically

The ASCII control characters used to separate and qualify data logically are

FS, GS, RS, US

with corresponding ASCII codes within the range [28 .. 31].

The hexadecimal codes are [x1C .. x1F].

ASCII control characters (other)

Other ASCII control characters are

NUL, BEL, SO, SI, CAN, EM, SUB, ESC, DEL

with corresponding ASCII codes 0, 7, [14 .. 15], [24 .. 27] and 127.

The hexadecimal codes are x00, x07, [x0E .. x0F], [x18 .. x1B] and x7F.

See also

  • {{ASCII}} OEIS Wiki utility template
  • {{char}} OEIS Wiki utility template


Notes

  1. Neil Sloane, Re: End of line characters in b-files, posting to SeqFan on March 11 2009.

External links