Donation?
Harley Hahn Home Page
Send a Message to Harley
A Personal Note from Harley Hahn
Unix Book Home Page
SEARCH
List of Chapters
Table of Contents
List of Figures
Chapters...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
Glossary
Appendixes...
A
B
C
D
E
F
G
H
Command Summary...
• Alphabetical
• By category
Unix-Linux Timeline
Internet Resources
Errors and Corrections
Endorsements
INSTRUCTOR AND STUDENT MATERIAL...
Home Page & Overview
Exercises & Answers
The Unix Model Curriculum &
Course Outlines
PowerPoint Files for Teachers
|
Appendix D...
The ASCII Code
Before the 1990s, the character encoding used
by Unix (and most computer systems) was the
ASCII CODE, often referred to as ASCII. The
name stands for "American Standard Code for
Information Interchange".
The ASCII code was created in 1967. It
specifies a 7-bit pattern for every
character, 128 in all. These bit patterns
range from 0000000 (0 in decimal) to 1111111
(127 in decimal). For this reason, the 128
ASCII characters are numbered from 0 to 127.
The 128 characters that comprise the ASCII
code consist of 33 "control characters" and 95
"printable characters". The control characters
are discussed in see Chapter 7. The printable
characters, shown below, are the 52 letters of
the alphabet (26 uppercase, 26 lowercase), 10
numbers, 32 punctuation symbols, and the space
character (listed first below):
!"#$%&'()*+,-./0123456789:;<=>?
@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_
'abcdefghijklmnopqrstuvwxyz{|}~
As a convenience, most Unix systems have a
reference page showing the ASCII code to allow
you to look at it quickly whenever you want.
Unfortunately, the ASCII reference page is not
standardized, so the way in which you display
it depends on which system you are using. You
can see the details in Figure 19-1 or
Figure 20-5.
For reference, the tables below contain the
128 characters of the ASCII code along with
their decimal (base 10), hexadecimal (base
16), octal (base 8), and binary (base 2)
equivalents. For a discussion of the binary,
octal, and hexadecimal number systems see
Chapter 21.
Character |
Decimal |
Hex |
Octal |
Binary |
|
| 0 | 00 | 000 | 0000 0000 | (null) |
Ctrl-A | 1 | 01 | 001 | 0000 0001 | |
Ctrl-B | 2 | 02 | 002 | 0000 0010 | |
Ctrl-C | 3 | 03 | 003 | 0000 0011 | |
Ctrl-D | 4 | 04 | 004 | 0000 0100 | |
Ctrl-E | 5 | 05 | 005 | 0000 0101 | |
Ctrl-F | 6 | 06 | 006 | 0000 0110 | |
Ctrl-G | 7 | 07 | 007 | 0000 0111 | (beep) |
Ctrl-H | 8 | 08 | 010 | 0000 1000 | backspace |
Ctrl-I | 9 | 09 | 011 | 0000 1001 | tab |
Ctrl-J | 10 | 0A | 012 | 0000 1010 | |
Ctrl-K | 11 | 0B | 013 | 0000 1011 | |
Ctrl-L | 12 | 0C | 014 | 0000 1100 | |
Ctrl-M | 13 | 0D | 015 | 0000 1101 | return |
Ctrl-N | 14 | 0E | 016 | 0000 1110 | |
Ctrl-O | 15 | 0F | 017 | 0000 1111 | |
Ctrl-P | 16 | 10 | 020 | 0001 0000 | |
Ctrl-Q | 17 | 11 | 021 | 0001 0001 | |
Ctrl-R | 18 | 12 | 022 | 0001 0010 | |
Ctrl-S | 19 | 13 | 023 | 0001 0011 | |
Ctrl-T | 10 | 14 | 024 | 0001 0100 | |
Ctrl-U | 21 | 15 | 025 | 0001 0101 | |
Ctrl-V | 22 | 16 | 026 | 0001 0110 | |
Ctrl-W | 23 | 17 | 027 | 0001 0111 | |
Ctrl-X | 24 | 18 | 020 | 0001 1000 | |
Ctrl-Y | 25 | 19 | 021 | 0001 1001 | |
Ctrl-Z | 26 | 1A | 022 | 0001 1010 | |
Ctrl-[ | 27 | 1B | 023 | 0001 1011 | escape |
Ctrl-\ | 28 | 1C | 024 | 0001 1100 | |
Ctrl-] | 29 | 1D | 025 | 0001 1101 | |
Ctrl-^ | 30 | 1E | 026 | 0001 1110 | |
Ctrl-_ | 31 | 1F | 027 | 0001 1111 | |
Jump to top of page
Character |
Decimal |
Hex |
Octal |
Binary |
|
(space) | 32 | 20 | 040 | 0010 0000 | space |
! | 33 | 21 | 041 | 0010 0001 | (exclamation mark) |
" | 34 | 22 | 042 | 0010 0010 | (double quote) |
# | 35 | 23 | 043 | 0010 0011 | (number sign) |
$ | 36 | 24 | 044 | 0010 0100 | (dollar sign) |
% | 37 | 25 | 045 | 0010 0101 | (percent) |
& | 38 | 26 | 046 | 0010 0110 | (ampersand) |
' | 39 | 27 | 047 | 0010 0111 | (single quote) |
( | 40 | 28 | 050 | 0010 1000 | (left parenthesis) |
) | 41 | 29 | 051 | 0010 1001 | (right parenthesis) |
* | 42 | 2A | 052 | 0010 1010 | (asterisk) |
+ | 43 | 2B | 053 | 0010 1011 | (plus) |
, | 44 | 2C | 054 | 0010 1100 | (comma) |
- | 45 | 2D | 055 | 0010 1101 | (minus/hyphen) |
. | 46 | 2E | 056 | 0010 1110 | (period) |
/ | 47 | 2F | 057 | 0010 1111 | (slash) |
0 | 48 | 30 | 060 | 0011 0000 | |
1 | 49 | 31 | 061 | 0011 0001 | |
2 | 50 | 32 | 062 | 0011 0010 | |
3 | 51 | 33 | 063 | 0011 0011 | |
4 | 52 | 34 | 064 | 0011 0100 | |
5 | 53 | 35 | 065 | 0011 0101 | |
6 | 54 | 36 | 066 | 0011 0110 | |
7 | 55 | 37 | 067 | 0011 0111 | |
8 | 56 | 38 | 070 | 0011 1000 | |
9 | 57 | 39 | 071 | 0011 1001 | |
: | 58 | 3A | 072 | 0011 1010 | (colon) |
; | 59 | 3B | 073 | 0011 1011 | (semicolon) |
< | 60 | 3C | 074 | 0011 1100 | (less than) |
= | 61 | 3D | 075 | 0011 1101 | (equals) |
> | 62 | 3E | 076 | 0011 1110 | (greater than) |
? | 63 | 3F | 077 | 0011 1111 | (question mark) |
Jump to top of page
Character |
Decimal |
Hex |
Octal |
Binary |
|
@ | 64 | 40 | 100 | 0100 0000 | (at sign) |
A | 65 | 41 | 101 | 0100 0001 | |
B | 66 | 42 | 102 | 0100 0010 | |
C | 67 | 43 | 103 | 0100 0011 | |
D | 68 | 44 | 104 | 0100 0100 | |
E | 69 | 45 | 105 | 0100 0101 | |
F | 70 | 46 | 106 | 0100 0110 | |
G | 71 | 47 | 107 | 0100 0111 | |
H | 72 | 48 | 110 | 0100 1000 | |
I | 73 | 49 | 111 | 0100 1001 | |
J | 74 | 4A | 112 | 0100 1010 | |
K | 75 | 4B | 113 | 0100 1011 | |
L | 76 | 4C | 114 | 0100 1100 | |
M | 77 | 4D | 115 | 0100 1101 | |
N | 78 | 4E | 116 | 0100 1110 | |
O | 79 | 4F | 117 | 0100 1111 | |
P | 80 | 50 | 120 | 0101 0000 | |
Q | 81 | 51 | 121 | 0101 0001 | |
R | 82 | 52 | 122 | 0101 0010 | |
S | 83 | 53 | 123 | 0101 0011 | |
T | 84 | 54 | 124 | 0101 0100 | |
U | 85 | 55 | 125 | 0101 0101 | |
V | 86 | 56 | 126 | 0101 0110 | |
W | 87 | 57 | 127 | 0101 0111 | |
X | 88 | 58 | 130 | 0101 1000 | |
Y | 89 | 59 | 131 | 0101 1001 | |
Z | 90 | 5A | 132 | 0101 1010 | (left square bracket) |
[ | 91 | 5B | 133 | 0101 1011 | (backslash) |
\ | 92 | 5C | 134 | 0101 1100 | (right square bracket) |
] | 93 | 5D | 135 | 0101 1101 | (circumflex) |
^ | 94 | 5E | 136 | 0101 1110 | (underscore) |
_ | 95 | 5F | 137 | 0101 1111 | |
Jump to top of page
Character |
Decimal |
Hex |
Octal |
Binary |
|
` | 96 | 60 | 140 | 0110 0000 | (back quote) |
a | 97 | 61 | 141 | 0110 0001 | |
b | 98 | 62 | 142 | 0110 0010 | |
c | 99 | 63 | 143 | 0110 0011 | |
d | 100 | 64 | 144 | 0110 0100 | |
e | 101 | 65 | 145 | 0110 0101 | |
f | 102 | 66 | 146 | 0110 0110 | |
g | 103 | 67 | 147 | 0110 0111 | |
h | 104 | 68 | 150 | 0110 1000 | |
i | 105 | 69 | 151 | 0110 1001 | |
j | 106 | 6A | 152 | 0110 1010 | |
k | 107 | 6B | 153 | 0110 1011 | |
l | 108 | 6C | 154 | 0110 1100 | |
m | 109 | 6D | 155 | 0110 1101 | |
n | 110 | 6E | 156 | 0110 1110 | |
o | 111 | 6F | 157 | 0110 1111 | |
p | 112 | 70 | 160 | 0111 0000 | |
q | 113 | 71 | 161 | 0111 0001 | |
r | 114 | 72 | 162 | 0111 0010 | |
s | 115 | 73 | 163 | 0111 0011 | |
t | 116 | 74 | 164 | 0111 0100 | |
u | 117 | 75 | 165 | 0111 0101 | |
v | 118 | 76 | 166 | 0111 0110 | |
w | 119 | 77 | 167 | 0111 0111 | |
x | 120 | 78 | 170 | 0111 1000 | |
y | 121 | 79 | 171 | 0111 1001 | |
z | 122 | 7A | 172 | 0111 1010 | |
{ | 123 | 7B | 173 | 0111 1011 | (left brace bracket) |
| | 124 | 7C | 174 | 0111 1100 | (vertical bar) |
} | 125 | 7D | 175 | 0111 1101 | (right brace bracket) |
~ | 126 | 7E | 176 | 0111 1110 | (tilde) |
| 127 | 7F | 177 | 0111 1111 | del |
Jump to top of page
Jump to Appendix E
What to Do If You Forget the Root Password
List of Chapters + Appendixes
Table of Contents
© All contents Copyright 2024, Harley Hahn
Full trademark and copyright information
|