Course contentsShow
← Computer Science
Lesson 24 of 2,8721. Digital FoundationsFree lesson

ASCII: The Foundation

Learning the 7-bit ASCII standard, its 128 characters, and control codes.

ASCII: The Foundation

What you'll learn: How computers use a simple 7-bit code to represent all basic text characters.

What is ASCII?

ASCII (American Standard Code for Information Interchange) is a character encoding standard that assigns a unique binary number to each letter, digit, punctuation mark, and control command. Created in the 1960s, it's the foundation that allows computers to store and display text.

Think of ASCII like a dictionary where each entry has exactly two parts: a character (like "A") and its numeric code (65 in decimal, 1000001 in binary).

The 7-Bit Structure

ASCII uses 7 bits, which means it can represent 2⁷ = 128 different characters (remember binary counting?). These 128 slots are divided into:

Control Codes (0-31)

Non-printable commands that control devices:

  • 0000000 (0): NULL
  • 0001010 (10): Line Feed (new line)
  • 0001101 (13): Carriage Return

Printable Characters (32-126)

The text you actually see:

  • Space: 32 (0100000)
  • Digits: "0" is 48, "1" is 49... "9" is 57
  • Uppercase: "A" is 65, "B" is 66... "Z" is 90
  • Lowercase: "a" is 97, "b" is 98... "z" is 122
  • Symbols: punctuation and special characters

Delete (127)

One final control code: 1111111

Why It Matters

ASCII established the universal language for text in computing. When you type "Hi", your computer stores 1001000 1101001 — using the exact same codes everywhere from your keyboard to the internet.

Key Takeaway: ASCII is a 7-bit standard that maps 128 characters to binary numbers, creating a universal system for representing basic text in computers.