Jan 25, 2023 4 min read

Understanding the ASCII Table

Table of Contents

If you are into computers, you must have come across the ASCII table. It is a crucial part of modern computing even if many people are not aware of it.

In this tutorial, I will be covering

  • A brief history of ASCII
  • Character encoding
  • Understanding the contents of the ASCII table

Roots of ASCII

Before the existence of ASCII, every computer manufacturer used their own way of character encoding, making it impossible to communicate when you use two machines from different manufacturers.

At that time, IBM only used nine different character sets!

American Standards Association (ASA) now known as American National Standards Institute (ANSI) started working on ASCII on May 1961.

But it wasn't intended for computers and used 5-bit telegraph codes and later changed to 7-bit.

The first edition was launched in 1963 which didn't gain much popularity in the initial days and was revised in 1967.

And everything changed for ASCII on March 11, 1968, when President Lyndon B. Johnson mandated that every US federal government computer must support it.  

Now, let's jump to the character encoding part.

What is character encoding?

Character encoding plays a fundamental role when you want to understand the ASCII table.

You may ask why.

Well, character encoding basically means, giving numbers to the alphabet.

You may ask why anyone would go through the hassle of numbering each character.

Let me remind you of something. Computers are nothing but powerful calculators which works on the basic principle of calculation.

And when you assign them numbers, converting them to binaries is quite easy.

In the English language, we have 26 characters so if we assign them numbers, it should look like this:

Character Encoded Number Binary conversion
L 12 00001100
H 8 00001000
B 2 00000010

Here, I gave numbers to L, H, and B and later converted them to binary, which made the whole calculation quite easy and efficient.  

That was more of a basic part. Now, let's jump to the ASCII table.

Getting into the ASCII table

ASCII of S letter
ASCII code of S

ASCII serves as a prime reference when your computer has some information that must be translated into human-readable form as computers work on binaries (0s and 1s).

Here's the complete ASCII table:

Complete ASCII table
Complete ASCII table

So for the understanding purpose, you can divide the ASCII table into three main parts:

  • 0 to 31 and 127: Control characters (used for keys like backspace, escape, etc.)
  • 32 to 126: Printable characters (which you mostly use for typing and basic tasks).
  • 128 to 255: Extended ASCII.

Here, the extended ASCII is the most interesting part as it extension of special characters to the original ASCII table.

Initially, the ASCII table was made up of 7-bit making a total of 128 possible values. But ASCII was built for extension and when they went for 8-bit, 127 special characters were added.

Making it a total of 255 characters!

But I'm not going to discuss that part as it is not useful to the general audience and apart from special characters, there's nothing much to discuss.

Now, let's take a quick example of how computers will handle characters on the basis of ASCII.

Here's what I have used LINUX as a string of characters to explain how it will be handled by the computer.

Character L I N U X
ASCII 76 73 78 85 88
Binary 01001100 01001001 01001110 01010101 01011000

So if you store LINUX in your memory, it will be stored as 01001100 01001001 01001110 01010101 01011000 and ASCII becomes the bridge between the conversion here.  

Control characters (From 0 to 31, 127)

The control characters are also known as non-printable characters which are used for certain actions and do not print anything.

ASCII control characters and their descriptions
Control characters and their description

For example, when you press the escape key, it reverts you to the previous page and prints nothing on the screen as a control character.

Printable characters

As its name suggests, printable characters refer to those characters that visually appear on screen such as alphabets.

The printable characters can be further divided into two subsections:

  • Symbols and numbers
  • Alphabets

Symbols and numbers

This is not supposed to be a linear sequence as I'm dividing this for better understanding.

You will find symbols and numbers between the following ranges:

  • From 32 to 64
  • From 91 to 96
  • And from 123 to 126
Range of symbols and numbers in ASCII table
Symbols and numbers in ASCII table

Alphabets

In the last portion of the ASCII table, you will find the alphabet in capital and small letters.

  • Uppercase letters will range from 65 to 90
  • Whereas the lowercase case letters will range from 97 to 122
Range of capital and small letters in ASCII table
Small and capital alphabets in ASCII table

Wrapping Up

In this guide, I went through how you can understand the ASCII table by dividing it into small parts.

I hope you will find this information useful and if you have any queries or suggestions, feel free to let me know in the comments.

Great! You’ve successfully signed up.
Welcome back! You've successfully signed in.
You've successfully subscribed to Linux Handbook.
Your link has expired.
Success! Check your email for magic link to sign-in.
Success! Your billing info has been updated.
Your billing was not updated.