|
The information on this page is in four parts including general ASCII
information, conversions of the non-printable control characters,
conversions of the printable ASCII characters, and a keyboard input for
printable ASCII character conversion.
General Information
Pronounced as-key, ASCII is a sequential formula for representing
English characters as numbers, with each letter assigned a number from 0
to 127; however, not all of those are really printable characters. An
acronym for American Standard Code for Information Interchange, this is
the most common code for text on computers. In common usage, ASCII means
a text file
that doesn't include any formatting. In most programs, the "Save As
Text" option will create an ASCII file in contrast to a specially
formatted file or binary file. An ASCII file is a character by character
save process. For example, the ASCII code for an upper case A is
decimal 65; the lower case a adds decimal 32 to that and is 97. Most
computers use ASCII codes to represent, display or print text, which
makes it possible to transfer data from one computer to another. The
meaning of the acronym name in itself is misleading as there really is
no standard, just a strong suggestion. Many companies have taken
generous, liberal and self-enhancing liberties in making modifications
to suit themselves, IBM and Microsoft being at the top of the list.
Text
files stored in ASCII format are sometimes called text files or ASCII
files; they often have the file extensions .TXT, .txt, .ASC or .asc.
Text editors and word processors are usually capable of storing data in
ASCII format, although ASCII format is not always the default storage
format. Most data files, particularly if they contain numeric data, are
not stored in ASCII format unless there is a need for easy and quick
interchange with several types of systems that access that data.
Executable programs are not normally stored in standard ASCII format,
though there are certain exceptions such as executable programs running
under interpreters.
The standard ASCII character set uses only 7
bits of the 8 bit byte for each character. There are several larger
character sets that use all 8 bits of the byte, which gives them an 128
additional characters in the set. The extra characters are used to
represent characters not used in the English language, graphics
characters or symbols, and mathematical representations or symbols.
Several companies and organizations have proposed extensions for these
128 characters; none have made any effort to work together for
standards. The DOS operating system uses a superset of ASCII called the
ASCII extended set or PC ASCII. A more universal standard is the ISO
Latin 1 set of characters used by many current operating systems and
most current generation browsers. Typical non-conformer IBM (and several
other mainframe makers), use another code set called EBCDIC.
ASCII Control Character Information
ASCII control characters are actually commands for the terminal,
monitor, computer, I/O devices, printer or other peripherals to do
something. The first 32 values are non-printing control characters, such
as Carriage Return (decimal value 13) and Line Feed (decimal value 10).
You generate these characters on the keyboard by holding down the
Control key while you strike another key. For example, BEL (Bell) is
value decimal 7, Control and the letter G at the same time, often shown
in documents as ^G. Notice that 7 is 64 less than the value of G (71);
the Control key subtracts 64 from the value of the keys that it
modifies. It does this by setting bit 6 (the 7th bit in a 0-7 indicated 8
bit byte) to a space. These characters are also capable of being sent
to the device by a software sequence, most often by a program. They are
usually sent as a string of characters following an attention character,
usually ESCape, but not always. This string of characters, or the
equivalent numeric representation of each character, is usually done in
hexadecimal or decimal, sometimes in octal on older minicomputers, but
virtually never (though possible) in binary. Because of that, these
software issued control characters or sequences are often termed ESCape
sequences.
ASCII Control Characters
The following table lists ASCII Control codes in octal, decimal,
hexadecimal and their corresponding Control-key combinations.
Char | Oct | Dec | Hex | Control-Key | Control
Action |
---|
NUL | 0 | 0 | 0 | ^@ | NULl character
|
SOH | 1 | 1 | 1 | ^A | Start Of
Heading
|
STX | 2 | 2 | 2 | ^B | Start of TeXt
|
ETX | 3 | 3 | 3 | ^C | End of TeXt
|
EOT | 4 | 4 | 4 | ^D | End Of
Transmission
|
ENQ | 5 | 5 | 5 | ^E | ENQuiry
|
ACK | 6 | 6 | 6 | ^F | ACKnowledge
|
BEL | 7 | 7 | 7 | ^G | BELl, rings
terminal bell
|
BS | 10 | 8 | 8 | ^H | BackSpace
(non-destructive)
|
HT | 11 | 9 | 9 | ^I | Horizontal Tab
(move to next tab position)
|
LF | 12 | 10 | a | ^J | Line Feed
|
VT | 13 | 11 | b | ^K | Vertical Tab
|
FF | 14 | 12 | c | ^L | Form Feed
|
CR | 15 | 13 | d | ^M | Carriage
Return
|
SO | 16 | 14 | e | ^N | Shift Out
|
SI | 17 | 15 | f | ^O | Shift In
|
DLE | 20 | 16 | 10 | ^P | Data Link
Escape
|
DC1 | 21 | 17 | 11 | ^Q | Device
Control 1, normally XON
|
DC2 | 22 | 18 | 12 | ^R | Device
Control 2
|
DC3 | 23 | 19 | 13 | ^S | Device
Control 3, normally XOFF
|
DC4 | 24 | 20 | 14 | ^T | Device
Control 4
|
NAK | 25 | 21 | 15 | ^U | Negative
AcKnowledge
|
SYN | 26 | 22 | 16 | ^V | SYNchronous
idle
|
ETB | 27 | 23 | 17 | ^W | End
Transmission Block
|
CAN | 30 | 24 | 17 | ^X | CANcel line
|
EM | 31 | 25 | 19 | ^Y | End of Medium
|
SUB | 32 | 26 | 1a | ^Z | SUBstitute
|
ESC | 33 | 27 | 1b | ^[ | ESCape
|
FS | 34 | 28 | 1c | ^\ | File
Separator
|
GS | 35 | 29 | 1d | ^] | Group
Separator
|
RS | 36 | 30 | 1e | ^^ | Record
Separator
|
US | 37 | 31 | 1f | ^_ | Unit
Separator |
Printing Characters
Char | Octal | Dec | Hex | Description |
---|
SP | 40 | 32 | 20 | Space
|
! | 41 | 33 | 21 | Exclamation mark
|
" | 42 | 34 | 22 | Quotation mark
(" in HTML)
|
# | 43 | 35 | 23 | Cross hatch (number sign)
|
$ | 44 | 36 | 24 | Dollar sign
|
% | 45 | 37 | 25 | Percent sign
|
& | 46 | 38 | 26 | Ampersand
|
` | 47 | 39 | 27 | Closing single quote
(apostrophe)
|
( | 50 | 40 | 28 | Opening parentheses
|
) | 51 | 41 | 29 | Closing parentheses
|
* | 52 | 42 | 2a | Asterisk (star, multiply)
|
+ | 53 | 43 | 2b | Plus
|
, | 54 | 44 | 2c | Comma
|
- | 55 | 45 | 2d | Hyphen, dash, minus
|
. | 56 | 46 | 2e | Period
|
/ | 57 | 47 | 2f | Slash (forward or divide)
|
0 | 60 | 48 | 30 | Zero
|
1 | 61 | 49 | 31 | One
|
2 | 62 | 50 | 32 | Two
|
3 | 63 | 51 | 33 | Three
|
4 | 64 | 52 | 34 | Four
|
5 | 65 | 53 | 35 | Five
|
6 | 66 | 54 | 36 | Six
|
7 | 67 | 55 | 37 | Seven
|
8 | 70 | 56 | 38 | Eight
|
9 | 71 | 57 | 39 | Nine
|
: | 72 | 58 | 3a | Colon
|
; | 73 | 59 | 3b | Semicolon
|
< | 74 | 60 | 3c | Less than sign
(< in HTML)
|
= | 75 | 61 | 3d | Equals sign
|
> | 76 | 62 | 3e | Greater than sign
(> in HTML)
|
? | 77 | 63 | 3f | Question mark
|
@ | 100 | 64 | 40 | At-sign
|
A | 101 | 65 | 41 | Upper case A
|
B | 102 | 66 | 42 | Upper case B
|
C | 103 | 67 | 43 | Upper case C
|
D | 104 | 68 | 44 | Upper case D
|
E | 105 | 69 | 45 | Upper case E
|
F | 106 | 70 | 46 | Upper case F
|
G | 107 | 71 | 47 | Upper case G
|
H | 110 | 72 | 48 | Upper case H
|
I | 111 | 73 | 49 | Upper case I
|
J | 112 | 74 | 4a | Upper case J
|
K | 113 | 75 | 4b | Upper case K
|
L | 114 | 76 | 4c | Upper case L
|
M | 115 | 77 | 4d | Upper case M
|
N | 116 | 78 | 4e | Upper case N
|
O | 117 | 79 | 4f | Upper case O
|
P | 120 | 80 | 50 | Upper case P
|
Q | 121 | 81 | 51 | Upper case Q
|
R | 122 | 82 | 52 | Upper case R
|
S | 123 | 83 | 53 | Upper case S
|
T | 124 | 84 | 54 | Upper case T
|
U | 125 | 85 | 55 | Upper case U
|
V | 126 | 86 | 56 | Upper case V
|
W | 127 | 87 | 57 | Upper case W
|
X | 130 | 88 | 58 | Upper case X
|
Y | 131 | 89 | 59 | Upper case Y
|
Z | 132 | 90 | 5a | Upper case Z
|
[ | 133 | 91 | 5b | Opening square bracket
|
\ | 134 | 92 | 5c | Backslash (Reverse
slant)
|
] | 135 | 93 | 5d | Closing square bracket
|
^ | 136 | 94 | 5e | Caret (Circumflex)
|
_ | 137 | 95 | 5f | Underscore
|
` | 140 | 96 | 60 | Opening single quote
|
a | 141 | 97 | 61 | Lower case a
|
b | 142 | 98 | 62 | Lower case b
|
c | 143 | 99 | 63 | Lower case c
|
d | 144 | 100 | 64 | Lower case d
|
e | 145 | 101 | 65 | Lower case e
|
f | 146 | 102 | 66 | Lower case f
|
g | 147 | 103 | 67 | Lower case g
|
h | 150 | 104 | 68 | Lower case h
|
i | 151 | 105 | 69 | Lower case i
|
j | 152 | 106 | 6a | Lower case j
|
k | 153 | 107 | 6b | Lower case k
|
l | 154 | 108 | 6c | Lower case l
|
m | 155 | 109 | 6d | Lower case m
|
n | 156 | 110 | 6e | Lower case n
|
o | 157 | 111 | 6f | Lower case o
|
p | 160 | 112 | 70 | Lower case p
|
q | 161 | 113 | 71 | Lower case q
|
r | 162 | 114 | 72 | Lower case r
|
s | 163 | 115 | 73 | Lower case s
|
t | 164 | 116 | 74 | Lower case t
|
u | 165 | 117 | 75 | Lower case u
|
v | 166 | 118 | 76 | Lower case v
|
w | 167 | 119 | 77 | Lower case w
|
x | 170 | 120 | 78 | Lower case x
|
y | 171 | 121 | 79 | Lower case y
|
z | 172 | 122 | 7a | Lower case z
|
{ | 173 | 123 | 7b | Opening curly brace
|
| | 174 | 124 | 7c | Vertical line
|
} | 175 | 125 | 7d | Closing curly brace
|
~ | 176 | 126 | 7e | Tilde (approximate)
|
DEL | 177 | 127 | 7f | Delete (rubout),
cross-hatch box |
This converter requires the use of Javascript enabled and capable browsers.
|