Skip to content
BENIBIX Learn

American Standard Code for Information Interchange (ASCII)

Development📄 Files & FormatsText

Also known as ASCII, ASCII Code, US-ASCII

An early code that numbers 128 English letters, digits and symbols. Capital A is 65.

Think of it like

Think of it like a secret code where A is 65, B is 66, and so on.

Example

Jack's old label printer only knows ASCII. His name prints fine, but the é in café comes out as a strange mark.

Why it matters

ASCII is the base of almost every text format. UTF-8 stores these 128 characters in exactly the same way.

Definition

ASCII is an early code that gives a number to each English letter, digit and symbol. It has 128 codes, from 0 to 127. Capital A is 65, and a space is 32. Some codes are not letters but signals, like a new line. ASCII only covers basic English. Unicode came later to cover every language, and its first 128 codes match ASCII.

Example code

console
$ python3 -c "print(ord('A'), ord('a'), ord(' '))"
65 97 32
In ASCII, capital A is 65, small a is 97 and a space is 32.
Only the top row, the letter A, is in ASCII. The other two need Unicode.

Common mistake

Calling any text file ASCII. If it has an accent, an emoji or a letter from another language, it is not.

Key takeaways

  1. 1
    128 codes. The numbers run from 0 to 127.
  2. 2
    English only. No accents and no other alphabets.
  3. 3
    Lives on in UTF-8. The same bytes for the first 128.

Compare

Learn it properly