ASCII - American Standard Code for Information Interchange

Anyone who has been using the Internet and EDP for a long time should definitely have come across this acronym before. But what does it stand for? The term defines fixed character encoding, assigning printable characters such as letters, numbers, punctuation marks, and non-printable control character codes. The ASCII code can be used to determine the representation of characters by electronic devices, like PCs or smartphones. This is a key aspect of programming but is also important for a regular user to understand how the ASCII code works. For reference, we also provide you with a handy ASCII code table where you can look up the information for every character.

Definition ASCII

Character encoding is the American Standard Code for Information Interchange, and is the US precursor to ISO 646 (internationally defined character sets). ASCII is a 7-bit code, meaning that 128 characters (27) are defined. The code consists of 33 non-printable and 95 printable characters and includes both letters, punctuation marks, numbers and control characters.

A short history of the ASCII code

The American Standards Association (ASA, now known as ANSI for American National Standards Institute) had already approved the American Standard Code for Information Interchange (ASCII) in 1963 and provided binding specifications for how electronic devices should display characters. Since it is a purely US-American standard, it’s often called US-ASCII. As far as predecessors go, there is Morse code and coding that is used in telex writing, whereby a standardized code (e.g., a fixed sequence of acoustic signals) is translated into text. Since computers cannot handle our alphabet – their internal processes are based on the binary system – ASCII needed to be developed.

To date, the sign standard has only changed a few times to adapt to new requirements. There are extended versions that use an eighth bit so that regional language differences can be displayed. Changing between the Latin and Arabic alphabets, for example, isn’t practical. As a result, Unicode based character sets like UTF-8 are now widely accepted: Unicode can accommodate more than a million different characters. UTF-8 is also compatible with ASCII, so it also encodes the first 128 characters.

What is ASCII?

ASCII is a standard used to represent characters on electronic devices. To understand how it works, you first need to be familiar with how a calculator functions: in a computer, the computational processes are always based off a binary system, meaning that zeroes and ones determine the processes. That is the reason why ASCII is also built on this system. The original ASCII standard defines different characters within seven bits – seven digits that indicate either a 0 or a 1. The eighth bit, which is one full byte, is traditionally used for checking purposes. The ASCII-based extended versions use this exact bit to extend the available characters to 256 (28).

Each character corresponds to a seven-digit sequence of zeroes and ones, which can then be represented as a decimal number, or as a hexadecimal number. The ASCII characters can be divided into several groups.

  • Control Characters (0–31 & 127): Control characters are not printable characters. They are used to send commands to the PC or the printer and are based on telex technology. With these characters, you can set line breaks or tabs. Today, they are mostly out of use.

  • Special Characters (32–47 / 58–64 / 91–96 / 123–126): Special characters include all printable characters that are neither letters nor numbers. These include punctuation or technical, mathematical characters. ASCII also includes the space (a non-visible but printable character), and, therefore, does not belong to the control characters category, as one might suspect.

  • Numbers (30–39): These numbers include the ten Arabic numerals from 0-9.

  • Letters (65–90 / 97–122): Letters are divided into two blocks, with the first group containing the uppercase letters and the second group containing the lowercase.
Fact

The original purpose of the eighth is to check the data for errors. The “parity” bit allows the bit sequence receiver to detect inconsistencies. However, the only visible aspect is what occurred, not the cause of the error. This makes the parity check fairly unsuitable for correcting errors.

ASCII table: An overview of all ASCII codes + PDF Download

Values are usually represented in decimal, binary and hexadecimal form on the ASCII code tables. The first two are used as they are the most common number systems for humans and machines. The hexadecimal system, on the other hand, has the advantage that it comprises 16 characters (0-9 + A-F) and can represent large numbers with fewer digits than the other two options. This way, a byte can always be displayed with a maximum of 2 digits.

Bin. Hex. Dec. ASCII Symbol Explanation Group
0000000 0 0 NUL The null character prompts the device to do nothing Control Character
0000001 1 1 SOH Initiates a header (Start of Heading) Control Character
0000010 2 2 STX Ends the header and marks the beginning of a message. (start of text) Control Character
0000011 3 3 ETX Indicates the end of the message (end of text) Control Character
0000100 4 4 EOT Marks the end of a completes transmission (End of Transmission) Control Character
0000101 5 5 ENQ A request that requires a response (Enquiry) Control Character
0000110 6 6 ACK Gives a positive answer to the request (Acknowledge) Control Character
0000111 7 7 BEL Triggers a beep (Bell) Control Character
0001000 8 8 BS Lets the cursor move back one step (Backspace) Control Character
0001001 9 9 TAB (HT) A horizontal tab that moves the cursor within a row to the next predefined position (Horizontal Tab) Control Character
0001010 A 10 LF Causes the cursor to jump to the next line (Line Feed) Control Character
0001011 B 11 VT The vertical tab lets the cursor jump to a predefined line (Vertical Tab) Control Character
0001100 C 12 FF Requests a page break (Form Feed) Control Character
0001101 D 13 CR Moves the cursor back to the first position of the line (Carriage Return) Control Character
0001110 E 14 SO Switches to a special presentation (Shift Out) Control Character
0001111 F 15 SI Switches the display back to the normal state (Shift In) Control Character
0010000 10 16 DLE Changes the meaning of the following characters (Data Link Escape) Control Character
0010001 11 17 DC1 Control characters assigned depending on the device used (Device Control) Control Character
0010010 12 18 DC2 Control characters assigned depending on the device used (Device Control) Control Character
0010011 13 19 DC3 Control characters assigned depending on the device used (Device Control) Control Character
0010100 14 20 DC4 Control characters assigned depending on the device used (Device Control) Control Character
0010101 15 21 NAK Negative response to a request (Negative Acknowledge) Control Character
0010110 16 22 SYN Synchronizes a data transfer, even if no signals are transmitted (Synchronous Idle) Control Character
0010111 17 23 ETB Marks the end of a transmission block (End of Transmission Block) Control Character
0011000 18 24 CAN Makes it clear that a transmission was faulty and the data must be discarded (Cancel) Control Character
0011001 19 25 EM Indicates the end of the storage medium (End of Medium) Control Character
0011010 1A 26 SUB Replacement for a faulty sign (Substitute) Control Character
0011011 1B 27 ESC Initiates an escape sequence and thus gives the following characters a special meaning (Escape) Control Character
0011100 1C 28 FS Marks the separation of logical data blocks and is hierarchically ordered: file as the largest unit, file as the smallest unit.(File Separator, Group Separator, Record Separator, Unit Separator) Control Character
0011101 1D 29 GS Marks the separation of logical data blocks and is hierarchically ordered: file as the largest unit, file as the smallest unit.(File Separator, Group Separator, Record Separator, Unit Separator) Control Character
0011110 1E 30 RS Marks the separation of logical data blocks and is hierarchically ordered: file as the largest unit, file as the smallest unit.(File Separator, Group Separator, Record Separator, Unit Separator) Control Character
0011111 1F 31 US Marks the separation of logical data blocks and is hierarchically ordered: file as the largest unit, file as the smallest unit.(File Separator, Group Separator, Record Separator, Unit Separator) Control Character
0100000 20 32 SP Blank space (Space) Special Character
0100001 21 33 ! Exclamation mark Special Character
0100010 22 34   Only quotes above Special Character
0100011 23 35 # Pound sign Special Character
0100100 24 36 $ Dollar sign Special Character
0100101 25 37 % Percentage sign Special Character
0100110 26 38 & Commericial and Special Character
0100111 27 39   Apostrophe Special Character
0101000 28 40 ( Left bracket Special Character
0101001 29 41 ) Right bracket Special Character
0101010 2A 42 * Asterisk Special Character
0101011 2B 43 + Plus symbol Special Character
0101100 2C 44 , Comma Special Character
0101101 2D 45 - Dash Special Character
0101110 2E 46 . Full stop Special Character
0101111 2F 47 / Forward slash Special Character
0110000 30 48 0   Numbers
0110001 31 49 1   Numbers
0110010 32 50 2   Numbers
0110011 33 51 3   Numbers
0110100 34 52 4   Numbers
0110101 35 53 5   Numbers
0110110 36 54 6   Numbers
0110111 37 55 7   Numbers
0111000 38 56 8   Numbers
0111001 39 57 9   Numbers
0111010 3A 58 : Colon Special characters
0111011 3B 59 ; Semicolon Special characters
0111100 3C 60 < Small than bracket Special characters
0111101 3D 61 = Equals sign Special characters
0111110 3E 62 > Bigger than symbol Special characters
0111111 3F 63 ? Question mark Special characters
1000000 40 64 @ At symbol Special characters
1000001 41 65 A   Capital letters
1000010 42 66 B   Capital letters
1000011 43 67 C   Capital letters
1000100 44 68 D   Capital letters
1000101 45 69 E   Capital letters
1000110 46 70 F   Capital letters
1000111 47 71 G   Capital letters
1001000 48 72 H   Capital letters
1001001 49 73 I   Capital letters
1001010 4A 74 J   Capital letters
1001011 4B 75 K   Capital letters
1001100 4C 76 L   Capital letters
1001101 4D 77 M   Capital letters
1001110 4E 78 N   Capital letters
1001111 4F 79 O   Capital letters
1010000 50 80 P   Capital letters
1010001 51 81 Q   Capital letters
1010010 52 82 R   Capital letters
1010011 53 83 S   Capital letters
1010100 54 84 T   Capital letters
1010101 55 85 U   Capital letters
1010110 56 86 V   Capital letters
1010111 57 87 W   Capital letters
1011000 58 88 X   Capital letters
1011001 59 89 Y   Capital letters
1011010 5A 90 Z   Capital letters
1011011 5B 91 [ Left square bracket Special character
1011100 5C 92 \ Inverse/backward slash Special character
1011101 5D 93 ] Right square bracket Special character
1011110 5E 94 ^ Circumflex Special character
1011111 5F 95 _ Underscore Special character
1100000 60 96 ` Gravis (backtick) Special character
1100001 61 97 a   Lowercase letters
1100010 62 98 b   Lowercase letters
1100011 63 99 c   Lowercase letters
1100100 64 100 d   Lowercase letters
1100101 65 101 e   Lowercase letters
1100110 66 102 f   Lowercase letters
1100111 67 103 g   Lowercase letters
1101000 68 104 h   Lowercase letters
1101001 69 105 i   Lowercase letters
1101010 6A 106 j   Lowercase letters
1101011 6B 107 k   Lowercase letters
1101100 6C 108 l   Lowercase letters
1101101 6D 109 m   Lowercase letters
1101110 6E 110 n   Lowercase letters
1101111 6F 111 o   Lowercase letters
1110000 70 112 p   Lowercase letters
1110001 71 113 q   Lowercase letters
1110010 72 114 r   Lowercase letters
1110011 73 115 s   Lowercase letters
1110100 74 116 t   Lowercase letters
1110101 75 117 u   Lowercase letters
1110110 76 118 v   Lowercase letters
1110111 77 119 w   Lowercase letters
1111000 78 120 x   Lowercase letters
1111001 79 121 y   Lowercase letters
1111010 7A 122 z   Lowercase letters
1111011 7B 123 { Left curly bracket Special characters
1111100 7C 124 l Vertical line Special characters
1111101 7D 125 } Right curly brackets Special characters
1111110 7E 126 ~ Tilde Special characters
1111111 7F 127 DEL Deletes a character. Since this control character consists of the same number on all positions, during the typewriter era it was possible to invalidate another character by punching out all the positions (Delete) Control characters

The eighth bit (set to zero if an extended version uses it) is allocated differently, depending on the program. In most cases, the extra space is used to cater for country-specific variations. However, the first 128 characters are always preserved in their original form.

Example: Convert ASCII characters

In ASCII, the system converts binary numbers into printable and non-printable characters according to a specified standard, as listed in the table above. Users can also perform these computational processes without any aids. All you have to do is understand how to calculate in binary or hexadecimal. In a number system, each digit corresponds to the power on a particular basis: in the decimal system, the base is 10. The bases are 2 and 16 for binary and hexadecimal systems, respectively. Multiply the value of the digit by the value of the digit.

 

Digit values in the decimal system:

Decimal system

100

101

102

103

1

10

100

1000

Therefore:

7304 = 7 * 10³ + 3 * 10² + 0 * 10¹ + 4 * 10⁰

This also works analogously in the other two systems:

Binary system

20

21

22

23

1

2

4

8

However, there are only two digits, so:

1011 ≙1 * 2³ + 0 * 2² + 1 * 2¹ + 1 * 2⁰ = 11

Hexadecimal system

160

161

162

163

1

16

256

4096

There are 16 characters, therefore:

F1A9 ≙ 15 * 16³ + 1 * 16² + 10 * 16¹ + 9 * 16⁰ = 61865

With this information and the ASCII table, ASCII strings can be converted into any number system. See this example, using the term “Digital”:

„D“ corresponds to the decimal value of 68 in the ASCII table, therefore:

68 = 1 * 2⁶ + 1 * 2² ≙ 1000100

68 = 4 * 16¹ + 4 * 16⁰ ≙ 44

“i” corresponds to the decimal value of 105, therefore:

105 = 1 * 2⁶ + 1 * 2⁵ + 1 * 2³ + 1 * 2⁰ ≙ 1101001

105 = 6 * 16¹ + 9 * 16⁰ ≙ 69

“g” corresponds to the decimal value 103, therefore:

103 = 1 * 2⁶ + 1 * 2⁵ + 1 * 2² + 1 * 2¹ + 1 * 2⁰ ≙ 1100111

103 = 6 * 16¹ + 7 * 16⁰ ≙ 67

“i” corresponds to the decimal value of 105, therefore:

105 = 1 * 2⁶ + 1 * 2⁵ + 1 * 2³ + 1 * 2⁰ ≙ 1101001

105 = 6 * 16¹ + 9 * 16⁰ ≙ 69

“t” corresponds to the decimal 1106, therefore:

116 = 1 * 2⁶ + 1 * 2⁵ + 1 * 2⁴ + 1 * 2² ≙ 1110100

116 = 7 * 16¹ + 4 * 16⁰ ≙ 74

“a” corresponds to the decimal value 97, therefore:

97 = 1 * 2⁶ + 1 * 2⁵ + 1 * 2⁰ ≙ 1100001

97 = 6 * 16¹ + 1 * 16⁰ ≙ 61

“l” corresponds to the decimal value 108, therefore:

108 = 1 * 2⁶ + 1* 2⁵ + 1 * 2³ + 1 * 2² ≙ 1101100

108 = 6 * 16¹ + 12 * 16⁰ ≙ 6C

Accordingly, the example word can be represented as such:

Symbol D i g i t a l
Dec 68 105 103 105 116 97 108
Bin 1000100 1101001 1100111 1101001 1110100 1100001 1101100
Hex 44 69 67 69 74 61 6C
Tip

Using Windows, you can enter Unicode characters – thus, ASCII characters – using a key combination. To do this, hold down the Alt key and enter the decimal value of the character using the number pad on the keyboard.

ASCII code: benefits and areas of application

ASCII is still widely used today, even though UTF-8 has become more important when presenting a text. However, Unicode has only been displacing the old character encoding method used during the early days of the internet since 2008. The advantage of using UTF-8 is that the code is almost backwardly compatible: ASCII is a subset of UTF-8, so the first 128 characters are identical. Since ASCII can be considered the lowest common denominator of most new encoding forms, the old encoding method is still used in emails and URLs.

In addition, ASCII has long been used for artistic purposes as well as technical ones: ASCII art uses exclusively printable ASCII table characters to produce creative works. The spectrum ranges from lettering, to simple stick figures, to real paintings. ASCII artists use the different brightness levels of individual characters to create light and shade in their artworks.