Skip to content
Home

ASCII — American Standard Code for Information Interchange

ASCII is a 7-bit character encoding standard mapping 128 control and printable characters to numeric codes. It formed the foundation of modern text handling and remains compatible with Unicode and UTF-8.

Overview

ASCII (pronounced "az-kee" or "ass-key") is a character encoding standard that assigns numeric codes to letters, digits, punctuation and control signals so text can be represented and processed by electronic devices. The name stands for American Standard Code for Information Interchange. As a compact, language-neutral mapping it made it possible for early computers, terminals and communication equipment to exchange human-readable text reliably. For a visual reference see the character table commonly cited in documentation about computing.

ASCII-Table-wide

Image gallery

1 Image

Structure and key characteristics

ASCII is defined as a 7-bit encoding, which allows for 128 distinct values numbered 0–127. The set divides roughly into two groups: the control characters and the printable characters. Control codes (0–31 and 127) historically controlled devices such as printers or modems (for example carriage return, line feed, tab and escape) and are not normally shown as visible symbols. Printable codes (32–126) include the space, digits 0–9, uppercase and lowercase English letters, and common punctuation and special symbols like !, ?, & and $. These printable symbols are what most people think of as the ASCII alphabet and basic symbols used in plain text.

At the bit level ASCII values are binary numbers. For example the uppercase letter "A" is represented by the binary pattern 1000001, which is 65 in decimal. Programmers often consult the same mapping in different numeric bases: binary, decimal and hexadecimal. Because common hardware works with 8-bit bytes, an ASCII character is typically stored in one byte, leaving one unused bit or a parity bit (an error-detection bit) in some older systems; see byte and parity references for background.

History and development

ASCII was developed in the early 1960s as a successor to earlier teleprinter and teletype codes. It became widely adopted across mainframes, minicomputers, terminals and networking equipment because it provided a common baseline for exchanging text between otherwise incompatible systems. The design intentionally used a 7-bit space to economize on transmission costs of that era and to remain compatible with existing telecommunications practice. As computing advanced, many systems extended ASCII by using the eighth bit for extra characters or graphical symbols; these 8-bit extensions eventually led to standards such as ISO 8859 and, later, to Unicode.

Uses, compatibility and examples

ASCII remains important because it is the lowest common denominator of text encodings. Many programming languages, configuration files and network protocols assume ASCII for basic tokens and control characters. A plain text file saved in a basic ASCII subset is readable across platforms and applications; such files are often called plain text. In the context of the web and internet, ASCII characters were the original permitted set for many early systems; contemporary formats like HTML and software toolchains still rely on ASCII-compatible bytes for tags, keywords and identifiers. Web addresses historically required ASCII characters and used percent-encoding for non-ASCII characters; see more about URLs.

Practical distinctions and notable facts

  • ASCII uses 7 bits per character, providing 128 slots; extensions use the eighth bit for additional characters.
  • Control codes in ASCII do not print; they affect how text is processed or transmitted.
  • ASCII is a subset of modern encodings such as UTF-8 and Unicode, so ASCII text is usually valid UTF-8 text as well.
  • Files labeled as ASCII or containing only ASCII characters are widely supported by software tools and editors.

When studying or working with text, it helps to know both the abstract code table and how it is represented on real machines and in files. For context on electronic transmission and representation consult introductory materials about computers, the meaning of binary encodings and historical code systems that preceded ASCII. Developers and architects still reference ASCII when designing protocols, parsing text or ensuring backward compatibility; see further reading intended for programmers and engineers at programmer-focused resources and technical references on computer files.

Despite its age, ASCII's simplicity and clear mapping between symbols and numbers continue to make it a useful tool for teaching, troubleshooting and interoperability across a wide range of modern computing environments.

Coding

Letters as 7-bit code

ASCII

Dec

Hex

Binary

A

65

41

(0)100 0001

B

66

42

(0)100 0010

C

67

43

(0)100 0011

Z

90

5A

(0)101 1010

Each character is assigned a bit pattern consisting of 7 bits. Since each bit can take on two values, there are 27 = 128 different bit patterns, which can also be interpreted as the integers 0-127 (hexadecimal 00h-7Fh).

The eighth bit, which is not used for ASCII, can be used for error correction purposes (parity bit) on the communication lines or for other control tasks. Today, however, it is almost always used to extend ASCII to an 8-bit code. These extensions are largely compatible with the original ASCII, so that all characters defined in ASCII are also encoded by the same bit patterns in the various extensions. The simplest extensions are encodings with language-specific characters that are not contained in the basic Latin alphabet, cf. below.

Composition

ASCII character table, hexadecimal numbering

Code

…0

…1

…2

…3

…4

…5

…6

…7

…8

…9

…A

…B

…C

…D

…E

…F

0…

NUL

SOH

STX

ETX

EOT

ENQ

ACK

BEL

BS

HT

LF

VT

FF

CR

SO

SI

1…

DLE

DC1

DC2

DC3

DC4

NAC

SYN

ETB

CAN

EM

SUB

ESC

FS

GS

RS

US

2…

SP

#

$

%

+

,

-

3…

1

2

3

4

5

6

7

8

9

<

>

4…

A

B

C

D

E

F

G

H

I

J

K

L

M

N

O

5…

P

Q

R

S

T

U

V

W

X

Y

Z

[

\

]

_

6…

`

a

b

c

d

e

f

g

h

i

j

k

l

m

n

o

7…

p

q

r

s

t

u

v

w

x

y

z

{

}

DEL

The first 32 ASCII character codes (from 00hex to 1Fhex) are reserved for control characters; see there for the explanation of the abbreviations in the table to the right (or above). These characters are not characters, but are (or were) used to control devices that use ASCII (such as printers). Control characters are, for example, carriage return for line feed or Bell (the bell); their definition is historical.

Code 20hex (SP) is the space or blank character used in a text as a space and separator between words and is created on the keyboard by the space bar.

The codes 21hex to 7Ehex stand for printable characters which include letters, digits and punctuation marks (punctuation marks, word signs). The letters are only lowercase and uppercase letters of the Latin alphabet. Letter variants used in non-English languages - for example, the German umlauts - are not included in the ASCII character set. Similarly, typographically correct dashes and quotation marks are absent; typography is limited to the typewriter set. The purpose was information exchange, not print typesetting.

Code 7Fhex (all seven bits set to one) is a special character which is also called a delete character (DEL). This code used to be used like a control character in order to be able to subsequently delete an already punched character on punched tape or punched cards by setting all bits, i.e. by punching out all seven marks. This was the only way to erase, since once holes were made they could not be undone. Areas without holes (i.e. with the code 00hex) were found mainly at the beginning and end of a strip of holes (NUL).

For this reason, only 126 characters belonged to the actual ASCII, because no character codes corresponded to the bit patterns 0 (0000000) and 127 (1111111). The code 0 was later interpreted in the programming language C as "end of string"; the character 127 was assigned various graphic symbols.

Questions and answers

Q: What is ASCII?

A: ASCII is a table of characters for computers, which uses binary code to handle text using the English alphabet, numbers, and other common symbols.

Q: What does ASCII stand for?

A: ASCII stands for American Standard Code for Information Interchange.

Q: When was ASCII developed?

A: ASCII was developed in the 1960s.

Q: How many characters are included in the code?

A: The code includes definitions for 128 characters, which are assigned numbers from 0 to 127.

Q: How many bits does it take to represent an ASCII character?

A: It takes 7 binary digits (bits) to represent an ASCII character.

Q: Does an ASCII computer file use one byte per character?

A: Yes, an ASCII computer file uses one byte per character, with 8 bits per byte.

Q: Is standard ASCII still commonly used today? A: Yes, standard ASCI is still commonly used today, particularly in computer software and HTML files.

Related articles

Author

AlegsaOnline.com ASCII — American Standard Code for Information Interchange

URL: https://en.alegsaonline.com/art/6475

Share

Sources