What is ASCII?
ASCII (American Standard Code for Information Interchange) is a character encoding standard that assigns numeric values to 128 characters including English letters, digits, punctuation marks, and control characters. It forms the foundation of modern text encoding systems.
Quick Facts
| Full Name | American Standard Code for Information Interchange |
|---|---|
| Created | 1963 (first published by ASA) |
| Specification | Official Specification |
How ASCII Works
ASCII was developed in the 1960s and became the dominant character encoding for computers and the internet. It uses 7 bits to represent each character, allowing for 128 unique values (0-127). The first 32 codes (0-31) are control characters for device communication, while codes 32-126 represent printable characters. Code 127 is the delete character. Extended ASCII uses 8 bits to include additional characters (128-255), though these extensions vary by system. ASCII's simplicity made it foundational, but its limitation to English characters led to the development of Unicode.
Key Characteristics
- 7-bit encoding with 128 possible characters
- Codes 0-31 are non-printable control characters
- Codes 32-126 are printable characters
- Uppercase letters: 65-90 (A-Z)
- Lowercase letters: 97-122 (a-z)
- Digits: 48-57 (0-9)
Common Use Cases
- Text file encoding and storage
- Network protocol communication
- Programming language source code
- Data transmission between systems
- Character validation and filtering
Example
ASCII Character Examples:
Dec Hex Char Description
32 20 ' ' Space
48 30 '0' Digit zero
65 41 'A' Uppercase A
97 61 'a' Lowercase a
10 0A LF Line Feed (newline)
13 0D CR Carriage Return
9 09 TAB Horizontal Tab
Conversion:
'A'.charCodeAt(0) = 65
String.fromCharCode(65) = 'A'