Codex

ASCII

Section: Linux Programmer's Manual (7)

Updated: 2014-10-02

Index?action=index Return to Main Contents


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 escapes are noted.

<TABLE> <TR VALIGN="top| <TD>Oct</TD> <TD>Dec</TD> <TD>Hex</TD> <TD>Char</TD> <TD>Oct</TD> <TD>Dec</TD> <TD>Hex</TD> <TD>Char

</TD> </TR> <TR VALIGN="top| <TD COLSPAN="8|


</TD> </TR> <TR VALIGN="top| <TD>000</TD> <TD>0</TD> <TD>00</TD> <TD>NUL '\0' (null character)</TD> <TD>100</TD> <TD>64</TD> <TD>40</TD> <TD>@

</TD> </TR> <TR VALIGN="top| <TD>001</TD> <TD>1</TD> <TD>01</TD> <TD>SOH (start of heading)</TD> <TD>101</TD> <TD>65</TD> <TD>41</TD> <TD>A

</TD> </TR> <TR VALIGN="top| <TD>002</TD> <TD>2</TD> <TD>02</TD> <TD>STX (start of text)</TD> <TD>102</TD> <TD>66</TD> <TD>42</TD> <TD>B

</TD> </TR> <TR VALIGN="top| <TD>003</TD> <TD>3</TD> <TD>03</TD> <TD>ETX (end of text)</TD> <TD>103</TD> <TD>67</TD> <TD>43</TD> <TD>C

</TD> </TR> <TR VALIGN="top| <TD>004</TD> <TD>4</TD> <TD>04</TD> <TD>EOT (end of transmission)</TD> <TD>104</TD> <TD>68</TD> <TD>44</TD> <TD>D

</TD> </TR> <TR VALIGN="top| <TD>005</TD> <TD>5</TD> <TD>05</TD> <TD>ENQ (enquiry)</TD> <TD>105</TD> <TD>69</TD> <TD>45</TD> <TD>E

</TD> </TR> <TR VALIGN="top| <TD>006</TD> <TD>6</TD> <TD>06</TD> <TD>ACK (acknowledge)</TD> <TD>106</TD> <TD>70</TD> <TD>46</TD> <TD>F

</TD> </TR> <TR VALIGN="top| <TD>007</TD> <TD>7</TD> <TD>07</TD> <TD>BEL '\a' (bell)</TD> <TD>107</TD> <TD>71</TD> <TD>47</TD> <TD>G

</TD> </TR> <TR VALIGN="top| <TD>010</TD> <TD>8</TD> <TD>08</TD> <TD>BS '\b' (backspace)</TD> <TD>110</TD> <TD>72</TD> <TD>48</TD> <TD>H

</TD> </TR> <TR VALIGN="top| <TD>011</TD> <TD>9</TD> <TD>09</TD> <TD>HT '\t' (horizontal tab)</TD> <TD>111</TD> <TD>73</TD> <TD>49</TD> <TD>I

</TD> </TR> <TR VALIGN="top| <TD>012</TD> <TD>10</TD> <TD>0A</TD> <TD>LF '\n' (new line)</TD> <TD>112</TD> <TD>74</TD> <TD>4A</TD> <TD>J

</TD> </TR> <TR VALIGN="top| <TD>013</TD> <TD>11</TD> <TD>0B</TD> <TD>VT '\v' (vertical tab)</TD> <TD>113</TD> <TD>75</TD> <TD>4B</TD> <TD>K

</TD> </TR> <TR VALIGN="top| <TD>014</TD> <TD>12</TD> <TD>0C</TD> <TD>FF '\f' (form feed)</TD> <TD>114</TD> <TD>76</TD> <TD>4C</TD> <TD>L

</TD> </TR> <TR VALIGN="top| <TD>015</TD> <TD>13</TD> <TD>0D</TD> <TD>CR '\r' (carriage ret)</TD> <TD>115</TD> <TD>77</TD> <TD>4D</TD> <TD>M

</TD> </TR> <TR VALIGN="top| <TD>016</TD> <TD>14</TD> <TD>0E</TD> <TD>SO (shift out)</TD> <TD>116</TD> <TD>78</TD> <TD>4E</TD> <TD>N

</TD> </TR> <TR VALIGN="top| <TD>017</TD> <TD>15</TD> <TD>0F</TD> <TD>SI (shift in)</TD> <TD>117</TD> <TD>79</TD> <TD>4F</TD> <TD>O

</TD> </TR> <TR VALIGN="top| <TD>020</TD> <TD>16</TD> <TD>10</TD> <TD>DLE (data link escape)</TD> <TD>120</TD> <TD>80</TD> <TD>50</TD> <TD>P

</TD> </TR> <TR VALIGN="top| <TD>021</TD> <TD>17</TD> <TD>11</TD> <TD>DC1 (device control 1)</TD> <TD>121</TD> <TD>81</TD> <TD>51</TD> <TD>Q

</TD> </TR> <TR VALIGN="top| <TD>022</TD> <TD>18</TD> <TD>12</TD> <TD>DC2 (device control 2)</TD> <TD>122</TD> <TD>82</TD> <TD>52</TD> <TD>R

</TD> </TR> <TR VALIGN="top| <TD>023</TD> <TD>19</TD> <TD>13</TD> <TD>DC3 (device control 3)</TD> <TD>123</TD> <TD>83</TD> <TD>53</TD> <TD>S

</TD> </TR> <TR VALIGN="top| <TD>024</TD> <TD>20</TD> <TD>14</TD> <TD>DC4 (device control 4)</TD> <TD>124</TD> <TD>84</TD> <TD>54</TD> <TD>T

</TD> </TR> <TR VALIGN="top| <TD>025</TD> <TD>21</TD> <TD>15</TD> <TD>NAK (negative ack.)</TD> <TD>125</TD> <TD>85</TD> <TD>55</TD> <TD>U

</TD> </TR> <TR VALIGN="top| <TD>026</TD> <TD>22</TD> <TD>16</TD> <TD>SYN (synchronous idle)</TD> <TD>126</TD> <TD>86</TD> <TD>56</TD> <TD>V

</TD> </TR> <TR VALIGN="top| <TD>027</TD> <TD>23</TD> <TD>17</TD> <TD>ETB (end of trans. blk)</TD> <TD>127</TD> <TD>87</TD> <TD>57</TD> <TD>W

</TD> </TR> <TR VALIGN="top| <TD>030</TD> <TD>24</TD> <TD>18</TD> <TD>CAN (cancel)</TD> <TD>130</TD> <TD>88</TD> <TD>58</TD> <TD>X

</TD> </TR> <TR VALIGN="top| <TD>031</TD> <TD>25</TD> <TD>19</TD> <TD>EM (end of medium)</TD> <TD>131</TD> <TD>89</TD> <TD>59</TD> <TD>Y

</TD> </TR> <TR VALIGN="top| <TD>032</TD> <TD>26</TD> <TD>1A</TD> <TD>SUB (substitute)</TD> <TD>132</TD> <TD>90</TD> <TD>5A</TD> <TD>Z

</TD> </TR> <TR VALIGN="top| <TD>033</TD> <TD>27</TD> <TD>1B</TD> <TD>ESC (escape)</TD> <TD>133</TD> <TD>91</TD> <TD>5B</TD> <TD>[

</TD> </TR> <TR VALIGN="top| <TD>034</TD> <TD>28</TD> <TD>1C</TD> <TD>FS (file separator)</TD> <TD>134</TD> <TD>92</TD> <TD>5C</TD> <TD>\ '\\'

</TD> </TR> <TR VALIGN="top| <TD>035</TD> <TD>29</TD> <TD>1D</TD> <TD>GS (group separator)</TD> <TD>135</TD> <TD>93</TD> <TD>5D</TD> <TD>]

</TD> </TR> <TR VALIGN="top| <TD>036</TD> <TD>30</TD> <TD>1E</TD> <TD>RS (record separator)</TD> <TD>136</TD> <TD>94</TD> <TD>5E</TD> <TD>^

</TD> </TR> <TR VALIGN="top| <TD>037</TD> <TD>31</TD> <TD>1F</TD> <TD>US (unit separator)</TD> <TD>137</TD> <TD>95</TD> <TD>5F</TD> <TD>_

</TD> </TR> <TR VALIGN="top| <TD>040</TD> <TD>32</TD> <TD>20</TD> <TD>SPACE</TD> <TD>140</TD> <TD>96</TD> <TD>60</TD> <TD>`

</TD> </TR> <TR VALIGN="top| <TD>041</TD> <TD>33</TD> <TD>21</TD> <TD>!</TD> <TD>141</TD> <TD>97</TD> <TD>61</TD> <TD>a

</TD> </TR> <TR VALIGN="top| <TD>042</TD> <TD>34</TD> <TD>22</TD> <TD>"</TD> <TD>142</TD> <TD>98</TD> <TD>62</TD> <TD>b

</TD> </TR> <TR VALIGN="top| <TD>043</TD> <TD>35</TD> <TD>23</TD> <TD>#</TD> <TD>143</TD> <TD>99</TD> <TD>63</TD> <TD>c

</TD> </TR> <TR VALIGN="top| <TD>044</TD> <TD>36</TD> <TD>24</TD> <TD>$</TD> <TD>144</TD> <TD>100</TD> <TD>64</TD> <TD>d

</TD> </TR> <TR VALIGN="top| <TD>045</TD> <TD>37</TD> <TD>25</TD> <TD>%</TD> <TD>145</TD> <TD>101</TD> <TD>65</TD> <TD>e

</TD> </TR> <TR VALIGN="top| <TD>046</TD> <TD>38</TD> <TD>26</TD> <TD>&</TD> <TD>146</TD> <TD>102</TD> <TD>66</TD> <TD>f

</TD> </TR> <TR VALIGN="top| <TD>047</TD> <TD>39</TD> <TD>27</TD> <TD>'</TD> <TD>147</TD> <TD>103</TD> <TD>67</TD> <TD>g

</TD> </TR> <TR VALIGN="top| <TD>050</TD> <TD>40</TD> <TD>28</TD> <TD>(</TD> <TD>150</TD> <TD>104</TD> <TD>68</TD> <TD>h

</TD> </TR> <TR VALIGN="top| <TD>051</TD> <TD>41</TD> <TD>29</TD> <TD>)</TD> <TD>151</TD> <TD>105</TD> <TD>69</TD> <TD>i

</TD> </TR> <TR VALIGN="top| <TD>052</TD> <TD>42</TD> <TD>2A</TD> <TD>*</TD> <TD>152</TD> <TD>106</TD> <TD>6A</TD> <TD>j

</TD> </TR> <TR VALIGN="top| <TD>053</TD> <TD>43</TD> <TD>2B</TD> <TD>+</TD> <TD>153</TD> <TD>107</TD> <TD>6B</TD> <TD>k

</TD> </TR> <TR VALIGN="top| <TD>054</TD> <TD>44</TD> <TD>2C</TD> <TD>,</TD> <TD>154</TD> <TD>108</TD> <TD>6C</TD> <TD>l

</TD> </TR> <TR VALIGN="top| <TD>055</TD> <TD>45</TD> <TD>2D</TD> <TD>-</TD> <TD>155</TD> <TD>109</TD> <TD>6D</TD> <TD>m

</TD> </TR> <TR VALIGN="top| <TD>056</TD> <TD>46</TD> <TD>2E</TD> <TD>.</TD> <TD>156</TD> <TD>110</TD> <TD>6E</TD> <TD>n

</TD> </TR> <TR VALIGN="top| <TD>057</TD> <TD>47</TD> <TD>2F</TD> <TD>/</TD> <TD>157</TD> <TD>111</TD> <TD>6F</TD> <TD>o

</TD> </TR> <TR VALIGN="top| <TD>060</TD> <TD>48</TD> <TD>30</TD> <TD>0</TD> <TD>160</TD> <TD>112</TD> <TD>70</TD> <TD>p

</TD> </TR> <TR VALIGN="top| <TD>061</TD> <TD>49</TD> <TD>31</TD> <TD>1</TD> <TD>161</TD> <TD>113</TD> <TD>71</TD> <TD>q

</TD> </TR> <TR VALIGN="top| <TD>062</TD> <TD>50</TD> <TD>32</TD> <TD>2</TD> <TD>162</TD> <TD>114</TD> <TD>72</TD> <TD>r

</TD> </TR> <TR VALIGN="top| <TD>063</TD> <TD>51</TD> <TD>33</TD> <TD>3</TD> <TD>163</TD> <TD>115</TD> <TD>73</TD> <TD>s

</TD> </TR> <TR VALIGN="top| <TD>064</TD> <TD>52</TD> <TD>34</TD> <TD>4</TD> <TD>164</TD> <TD>116</TD> <TD>74</TD> <TD>t

</TD> </TR> <TR VALIGN="top| <TD>065</TD> <TD>53</TD> <TD>35</TD> <TD>5</TD> <TD>165</TD> <TD>117</TD> <TD>75</TD> <TD>u

</TD> </TR> <TR VALIGN="top| <TD>066</TD> <TD>54</TD> <TD>36</TD> <TD>6</TD> <TD>166</TD> <TD>118</TD> <TD>76</TD> <TD>v

</TD> </TR> <TR VALIGN="top| <TD>067</TD> <TD>55</TD> <TD>37</TD> <TD>7</TD> <TD>167</TD> <TD>119</TD> <TD>77</TD> <TD>w

</TD> </TR> <TR VALIGN="top| <TD>070</TD> <TD>56</TD> <TD>38</TD> <TD>8</TD> <TD>170</TD> <TD>120</TD> <TD>78</TD> <TD>x

</TD> </TR> <TR VALIGN="top| <TD>071</TD> <TD>57</TD> <TD>39</TD> <TD>9</TD> <TD>171</TD> <TD>121</TD> <TD>79</TD> <TD>y

</TD> </TR> <TR VALIGN="top| <TD>072</TD> <TD>58</TD> <TD>3A</TD> <TD>:</TD> <TD>172</TD> <TD>122</TD> <TD>7A</TD> <TD>z

</TD> </TR> <TR VALIGN="top| <TD>073</TD> <TD>59</TD> <TD>3B</TD> <TD>;</TD> <TD>173</TD> <TD>123</TD> <TD>7B</TD> <TD>{

</TD> </TR> <TR VALIGN="top| <TD>074</TD> <TD>60</TD> <TD>3C</TD> <TD><</TD> <TD>174</TD> <TD>124</TD> <TD>7C</TD> <TD>|

</TD> </TR> <TR VALIGN="top| <TD>075</TD> <TD>61</TD> <TD>3D</TD> <TD>=</TD> <TD>175</TD> <TD>125</TD> <TD>7D</TD> <TD>}

</TD> </TR> <TR VALIGN="top| <TD>076</TD> <TD>62</TD> <TD>3E</TD> <TD>></TD> <TD>176</TD> <TD>126</TD> <TD>7E</TD> <TD>~

</TD> </TR> <TR VALIGN="top| <TD>077</TD> <TD>63</TD> <TD>3F</TD> <TD>?</TD> <TD>177</TD> <TD>127</TD> <TD>7F</TD> <TD>DEL

</TD> </TR> </TABLE>

Tables

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

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-10?(7), iso_8859-11?(7), iso_8859-13?(7), iso_8859-14?(7), iso_8859-15?(7), iso_8859-16?(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), utf-8?(7)

COLOPHON

This page is part of release 3.74 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 http://www.kernel.org/doc/man-pages/.


Index

NAME

DESCRIPTION

Tables

NOTES

History

SEE ALSO

COLOPHON