Web ProCategory

What is ASCII code and what is it for? 

•8 min read
GoDaddy Content Team
Image credit: Photo by Markus Spiske on Unsplash

Have you ever wondered how your computer or any other electronic device interprets and displays letters, numbers and symbols? There is a secret key, called an ASCII code (American Standard Code for Information Interchange), that unlocks this mystery.

In this post we are going to show you how ASCII has become the universal language of computer systems. ASCII code enables the sharing and representation of information in a standardized way so everything works as it should.

Related: AI guide for web design

What is ASCII code? 

The ASCII code is a coding system that assigns a unique numerical value to the different characters used in electronic communication. It was developed in the 1960s as a standard for transferring data between different computing devices. 

ASCII code uses seven bits to represent 128 different characters.  

These characters include: 

  • Upper and lowercase letters 
  • Numerical digits 
  • Punctuation marks 
  • Mathematical symbols 
  • Characters used for text formatting and device control 
Photo by Shubham Dhage on Unsplash 

The first 32 characters are non-printable control characters, such as carriage return, the action of moving the cursor or print head back to the beginning of a line, and line feed, which indicates the end of a line of text and the start of a new line. 
 
This ASCII code became a widely used standard in the computer industry and laid the foundation for communication between different computer systems.  

However, as technology advanced, the ASCII system fell short of representing all the characters needed in different languages and alphabets.  

This led to the development of broader encodings, such as the Unicode standard, which uses more bits to represent a wider range of characters.

Despite its limitations, ASCII code is still relevant and widely used in programming and data communication. Understanding how characters map to numeric values in ASCII code is essential for working with data in computing environments.

Editor's note: Manage all your client accounts with free tools from GoDaddy.

How ASCII code is structured 

As we’ve mentioned, ASCII code assigns numeric values to different characters. It is organised as follows: 

  • Control Characters: The first 32 characters are non-printable control characters used for text formatting and device control. They include carriage return, line feed and tab, among others. 
  • Basic printable characters: Printable characters starting with a value of 32. These include uppercase and lowercase letters, numeric digits, punctuation marks and mathematical symbols. 
  • Extended characters: Starting at value 127, there are extended characters that are not present in all versions of ASCII code.  These characters can vary depending on the specific encoding used, such as extended ASCII or the specific encodings of different languages. 

While the thought of learning all the characters of the ASCII code may seem overwhelming, there are only 128 and many of them make sense as they correspond to lowercase letters, uppercase letters or numbers.  

Memorising them is much easier than it might seem. 
 

Of course, today it is very easy to access ASCII code tables with all their variants, like the ones shown below.  

For those who are new to ASCII, it is much easier to use them than to memorise all 128 codes as if they were the periodic table or the table of irregular verbs in English. 

ASCII code table 

Knowing how the numbers 0 to 9 are represented in ASCII code and what they correspond to in binary can get you out of more than one fix. 

Character decimal value 
0 48 
1 49 
2 fifty 
3 51 
4 52 
5 53 
6 54 
7 55 
8 56 
9 57 
ASCII code Numbers 0 to 9

It is also important to be clear that the letters of the alphabet have two correspondences in the ASCII code depending on whether they are capitalized or lowercase. They are as follows: 

Letter Uppercase Decimal Value Lowercase Decimal Value 
to 65 97 
b 66 98 
c 67 99 
d 68 100 
and 69 101 
F 70 102 
g 71 103 
h 72 104 
Yo 73 105 
j 74 106 
k 75 107 
l 76 108 
m 77 109 
n 78 110 
either 79 111 
p 80 112 
q 81 113 
r 82 114 
yes 83 115 
t 84 116 
or 85 117 
v 86 118 
w 87 119 
x 88 120 
and 89 121 
z 90 122 
ASCII characters

You can learn more about how to insert ASCII characters in Microsoft Word here. The article lists all the combinations necessary to write a character, as you hold down the ALT key on your keyboard.

Related: 5 ways to use the .tech domain for your business

How to convert binary code to ASCII 

Knowing how to convert binary code to ASCII is another of those things that can be done online today, but most of us can manage two-digit divisions, right? 
 
Well, since knowledge is never wasted ... here are the steps to do it: 

First you should know that the binary representation of an ASCII character consists of 8 bits, so it separates the binary code into groups of 8 bits (one byte) for each character. 

  1. Convert each group of bits to its decimal equivalent. 
  1. Consult a conversion table that shows decimal values for the corresponding ASCII characters. 
  1. Assign the ASCII character that corresponds to each decimal value. 

Repeat the above steps for each group of 8 bits until you have converted all the binary code. 

ASCII equivalence table for the uppercase alphabet 

Character decimal value Binary value 
TO 65 01000001 
b 66 01000010 
c 67 01000011 
d 68 01000100 
AND 69 01000101 
F 70 01000110 
g 71 01000111 
h 72 01001000 
Yo 73 01001001 
J. 74 01001010 
K 75 01001011 
l 76 01001100 
M 77 01001101 
N 78 01001110 
EITHER 79 01001111 
Q 80 01010000 
Q 81 01010001 
R 82 01010010 
Yes 83 01010011 
T 84 01010100 
OR 85 01010101 
V 86 01010110 
W 87 01010111 
x 88 01011000 
AND 89 01011001 
Z 90 01011010 
ASCII code for uppercase alphabet

ASCII equivalence table for the lowercase alphabet 

Character decimal value Binary value 
to 97 01100001 
b 98 01100010 
c 99 01100011 
d 100 01100100 
and 101 01100101 
F 102 01100110 
g 103 01100111 
h 104 01101000 
Yo 105 01101001 
j 106 01101010 
k 107 01101011 
l 108 01101100 
m 109 01101101 
n 110 01101110 
either 111 01101111 
p 112 01110000 
q 113 01110001 
r 114 01110010 
yes 115 01110011 
t 116 01110100 
or 117 01110101 
v 118 01110110 
w 119 01110111 
x 120 01111000 
and 121 01111001 
z 122 01111010 
ASCII for lowercase alphabet

ASCII equivalence table for numbers 0 to 9 

Character decimal value Binary value 
0 48 00110000 
1 49 00110001 
2 fifty 00110010 
3 51 00110011 
4 52 00110100 
5 53 00110101 
6 54 00110110 
7 55 00110111 
8 56 00111000 
9 57 00111001 
ASCII equivalence table for numbers 0 to 9 

Suppose we have the binary code "01000001 01000010 01000011". Following the steps mentioned above we should: 

  1. Separate the binary code into groups of 8 bits — so "01000001", "01000010" and "01000011". 
  1. Convert each group of bits to decimal: 65, 66, 67. 
  1. Consult the ASCII equivalence table and find the corresponding characters: A, B and C. 
  1. The result would be ABC, which is the ASCII representation of the binary code we started with. 

Always keep in mind that ASCII codes go from 0 to 127 and that each character is represented with 8 bits. The rest is easy! 

ASCII — a forgotten art? 

Luckily, creating a website today is much easier than all this thanks to the easy site builders and content management systems we have. Not to mention AI, which can now do repetitious coding work for us (that we then check for accuracy). 

Still, knowing the underpinnings of modern coding will make you that much better at your job. Armed with this knowledge, you may find many more things make sense.

Products Used