Explain

# Understanding the ASCII Table

Learn the history of ASCII, character encoding and the ASCII table. Basically everything important associated with ASCII.

Sagar Sharma

## Understanding the ASCII Table

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.

## What is character encoding?

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

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 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:

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.

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

### 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

## 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.

Sagar Sharma