ASCII Code

💡
Key learnings:
  • ASCII Code Definition: ASCII (American Standard Code for Information Interchange) is a 7-bit code used to represent text and control characters in digital electronics.
  • History and Development: ASCII was first standardized in 1967 and updated in 1986 as ANSI X3.4.
  • Structure and Representation: ASCII uses 7 bits to represent 128 characters, including letters, digits, and special symbols.
  • ASCII Table Overview: The ASCII table shows characters with their corresponding binary, decimal, octal, and hexadecimal values.
  • 8-bit ASCII: The extended 8-bit version, US ASCII-8, can represent 256 characters, enhancing its usage in digital electronics.

Alphanumeric codes include ASCII: a 7-bit code that represents letters, digits, punctuation and control characters in computers and comms equipment.

The three coded sets usually taught together are ASCII, EBCDIC and Unicode. ASCII Code is the 7-bit US set. EBCDIC remains on some IBM mainframes. Unicode (often UTF-8) is what most new text uses.

What is ASCII code

ASCII stands for American Standard Code for Information Interchange and is pronounced ask-ee. ASA first published it as X3.4-1963. The 1967 revision added lowercase letters. The last major 7-bit revision is ANSI X3.4-1986, still the reference for US-ASCII.

ASCII is a 7-bit code, so it can represent 27 = 128 characters. Ninety-five of those are printable: 26 upper-case letters (A – Z), 26 lower-case letters (a – z), 10 digits (0 – 9) and 33 other graphic codes (punctuation, symbols and space).

There is no single official 8-bit ASCII code named US ASCII-8. ASCII itself stays 7-bit. Later 8-bit pages such as ISO/IEC 8859 and Windows-1252 keep the same 0-127 codes and add another 128. Those sets can represent 28 = 256 characters. Unicode then went further. The table below is the 7-bit ASCII code.

ASCII Code Table

DECOCTHEXBINSymbolDescription
0000NULNull char
1111SOHStart of Heading
22210STXStart of Text
33311ETXEnd of Text
444100EOTEnd of Transmission
555101ENQEnquiry
666110ACKAcknowledgment
777111BELBell
81081000BSBack Space
91191001HTHorizontal Tab
10120A1010LFLine Feed
11130B1011VTVertical Tab
12140C1100FFForm Feed
13150D1101CRCarriage Return
14160E1110SOShift Out / X-On
15170F1111SIShift In / X-Off
16201010000DLEData Line Escape
17211110001DC1Device Control 1 (oft. XON)
18221210010DC2Device Control 2
19231310011DC3Device Control 3 (oft. XOFF)
20241410100DC4Device Control 4
21251510101NAKNegative Acknowledgement
22261610110SYNSynchronous Idle
23271710111ETBEnd of Transmit Block
24301811000CANCancel
25311911001EMEnd of Medium
26321A11010SUBSubstitute
27331B11011ESCEscape
28341C11100FSFile Separator
29351D11101GSGroup Separator
30361E11110RSRecord Separator
31371F11111USUnit Separator
324020100000 Space
334121100001!Exclamation mark
344222100010Double quotes (or speech marks)
354323100011#Number
364424100100$Dollar
374525100101%Procenttecken
384626100110&Ampersand
394727100111Single quote
405028101000(Open parenthesis (or open bracket)
415129101001)Close parenthesis (or close bracket)
42522A101010*Asterisk
43532B101011+Plus
44542C101100,Comma
45552D101101Hyphen
46562E101110.Period, dot or full stop
47572F101111/Slash or divide
4860301100000Zero
4961311100011One
5062321100102Two
5163331100113Three
5264341101004Four
5365351101015Five
5466361101106Six
5567371101117Seven
5670381110008Eight
5771391110019Nine
58723A111010:Colon
59733B111011;Semicolon
60743C111100<Less than (or open angled bracket)
61753D111101=Equals
62763E111110>Greater than (or close angled bracket)
63773F111111?Question mark
64100401000000@At symbol
65101411000001AUppercase A
66102421000010BUppercase B
67103431000011CUppercase C
68104441000100DUppercase D
69105451000101EUppercase E
70106461000110FUppercase F
71107471000111GUppercase G
72110481001000HUppercase H
73111491001001IUppercase I
741124A1001010JUppercase J
751134B1001011KUppercase K
761144C1001100LUppercase L
771154D1001101MUppercase M
781164E1001110NUppercase N
791174F1001111OUppercase O
80120501010000PUppercase P
81121511010001QUppercase Q
82122521010010RUppercase R
83123531010011SUppercase S
84124541010100TUppercase T
85125551010101UUppercase U
86126561010110VUppercase V
87127571010111WUppercase W
88130581011000XUppercase X
89131591011001YUppercase Y
901325A1011010ZUppercase Z
911335B1011011[Opening bracket
921345C1011100\Backslash
931355D1011101]Closing bracket
941365E1011110^Caret – circumflex
951375F1011111_Underscore
96140601100000`Grave accent
97141611100001aLowercase a
98142621100010bLowercase b
99143631100011cLowercase c
100144641100100dLowercase d
101145651100101eLowercase e
102146661100110fLowercase f
103147671100111gLowercase g
104150681101000hLowercase h
105151691101001iLowercase i
1061526A1101010jLowercase j
1071536B1101011kLowercase k
1081546C1101100lLowercase l
1091556D1101101mLowercase m
1101566E1101110nLowercase n
1111576F1101111oLowercase o
112160701110000pLowercase p
113161711110001qLowercase q
114162721110010rLowercase r
115163731110011sLowercase s
116164741110100tLowercase t
117165751110101uLowercase u
118166761110110vLowercase v
119167771110111wLowercase w
120170781111000xLowercase x
121171791111001yLowercase y
1221727A1111010zLowercase z
1231737B1111011{Opening brace
1241747C1111100|Vertical bar
1251757D1111101}Closing brace
1261767E1111110~Equivalency sign – tilde
1271777F1111111 Delete

From the table, digits 0 – 9 share the prefix 0011. Upper-case ‘P’ to ‘Z’ run from 0101 0000 to 0101 1010. Lower-case ‘p’ to ‘z’ run from 0111 0000 to 0111 1010.

Want To Learn Faster? 🎓
Get electrical articles delivered to your inbox every week.
No credit card required—it’s 100% free.

About Electrical4U

Electrical4U is dedicated to the teaching and sharing of all things related to electrical and electronics engineering.

Leave a Comment