ASCII Code Table

ASCII code table containing decimal hex and binary values
ASCII table containing decimal hex and binary conversions
This ASCII code table contains the decimal codes as well as the binary and hexadecimal values of characters.

What is ASCII?

ASCII(American Standard Code for Information Interchange) is a character encoding standard developed for communication between electronic devices. It was the most prevalent method of text file storage and transfer in computers until 2008 and was surpassed by UTF-8. Every symbol in this table is represented by an 8 bit code. So every symbol has a corresponding number, or ASCII code. For example, the symbol ‘+'(plus sign) has the code 43, capital letter C has the code 67, and a blank space has the code 32. Hence this encoding system lets a computer store a text document as a series of numbers. A total of 256 characters can be represented using this system. But only 7 bits are required to represent the basic ASCII characters.
The ASCII table can be divided into 2 different sections:
  1. Non-Printable characters(NPC) or Control characters
  2. Printable characters

1. Non-printable

Non-printable or or Control characters are characters that does not represent a written symbol. In the ASCII character table integer values from 0 to 31 are non-printable (now mostly obsolete) . These are called control characters because they are used for in-band signalling(To control devices such as printers that use of ASCII or to provide meta-information about data streams such as those from magnetic tapes).
for example: ASCII code10 represents the “line feed” function which causes a printer to advance its paper.

2. Printable

Printable characters are the normal characters that has shape. These are characters between 32 and 255. Space is also included in this section(even though it does not have a graphical representation it is considered an invisible graphic). Printable characters can again be divided into 2 sections:
Lower ASCII: characters from values 32 to 127 are in this section. These are composed of Numbers, letters and special characters(&, #, +..etc).
Higher ASCII/Extended ASCII: character values from 128 and 255. This section is not fixed and based on the language of your operating system or program you are using it can change. different equipment and software suppliers developed their own character set for this range. Some choose drawing symbols, some others choose accent characters…etc.

How to use ASCII table?

The column named ‘char’ contains the the the characters that electronic devices use. Values in a ‘characters’ same row indicates that particular charters storage/transmit forms(binary, hex and decimal). Ultimately computers will be handling the characters in binary form.
For example: character ‘R’ is represented as 82 in integer form, as 52 in hexadecimal form and as 01010010 in binary form.

History of ASCII standard

Development on ASCII began With the first meeting of X3.2 – a subcommittee of the American Standards Association (ASA) on October 6, 1960. The ASA became the United States of America Standards Institute (USASI) and ultimately the American National Standards Institute (ANSI). The ASCII character set or the IANA preferred name-USASCII character set was first published in 1963 by the American Standards association(ASA) leaving 28 code positions and one control code unassigned.
The X3.2 subcommittee designed USASCII based on the encoding systems of earlier teleprinters. Its first commercial use was also as a 7-bit teleprinter code backed by Bell data services. The code itself was patterned so that all control codes were together and all graphic codes were together. They also decided to code letters in the alphabetical order. This was for ease of identification and usage. ASCII-code order is also called ASCIIbetical order.

How to remember ASCII table?

Remembering the whole table may be very difficult. It is also not necessary since you can quickly look up this table. But there is a trick to remembering the ASCII values of numbers and letters.
The trick here is to remember just the 3 values of characters ‘0’, ‘a’ and ‘A’. then to get the other values you just have to add corresponding places of that number.
For example, you know the ASCII decimal value of ‘0’ is 48. jo to get the ASCII decimal of ‘7’ just add 7 to 48. which gives 55.
Same goes for alphabets. We know the ASCII decimal value of ‘a’ is 97. So to get value of ‘d’ just add 3 to 97. which is 101.

What is the difference between ASCII and Unicode?

Just like ASCII Unicode is also a standard for encoding text. But Unicode extends beyond just the English alphabets and basic symbols. It can encode 137,994 characters including 150 modern and historic scripts, as well as emoji. Since Unicode standard is very large there are different ways of encoding like UTF-8 and UTF-32. The first 128 characters(0-127) are represented by same values in both ASCII and Unicode. Most modern character encoding schemes including unicode are based on ASCII. Nowadays ASCII takes its practical definition from Unicode, not its original standard (ANSI X3.4-1968), because historically there were many variations on the ASCII 127-character encoding. All of those variations are obsolete and when people say “ASCII” they mean the bytes with value 0x00 through 0x7F encode Unicode code points U+0000 through U+007F. Read about Unicode.

How to type ASCII characters that are not shown on keyboard?

Make sure Numlock is turned on. Hold down ‘Alt’ key and type the decimal number of the character you want to print on the number pad. Then release ‘Alt’ key.
For example: If you wanted to type ‘¢’ then press Alt+155

How many bits does ASCII codes require?

Even though 8 bits were reserved for encoding each character(Including Extended ASCII character set) it was originally conceived as a 7-bit code because for the basic ASCII character set only 7 bits are required. In the 1990’s there were software’s that assumed it could use the 8th bit of each byte of text for its own purposes.

How to print ASCII code in programs?

To print the decimal value of an ASCII code use single quotes when writing programs in C or C++
eg:  int value = 'a';
the variable will contain value 97.
#include <stdio.h>
int main()
    char c;
    printf("Enter a character: ");
    //Reads a character from the user
    scanf("%c", &c);  
    //displays the integer value of the character
    printf("ASCII value of %c = %d", c, c);
    return 0;