Numverto logo NUMVERTO
Published: 2 min read By
ascii encoding programming

ASCII Explained — Character Encoding for Programmers

Complete guide to ASCII character codes: decimal, hex, binary values, control characters, extended ASCII, and Unicode relationship.

Advertisement — Responsive Ad

What is ASCII?

ASCII (American Standard Code for Information Interchange) maps 128 characters (codes 0–127) to 7-bit values. It includes uppercase and lowercase English letters, digits, punctuation, space, and 33 control codes (newline, tab, etc.). ASCII became the foundation for text representation in early computing and persists as a subset of modern Unicode.

Key ASCII Values to Memorise

CharacterDecimalHexBinary
Space322000100000
0483000110000
A654101000001
a976101100001

Lowercase = uppercase + 32. Digits 0–9 start at 48, not 0.

Control Characters

  • NUL (0): Null terminator in C strings
  • LF (10): Line feed (Unix newline)
  • CR (13): Carriage return
  • TAB (9): Horizontal tab

Extended ASCII (128–255)

Codes 128–255 depend on code page (Windows-1252, ISO-8859-1). Not portable — modern apps prefer UTF-8 Unicode.

ASCII vs Unicode

Unicode assigns a code point to every character worldwide. UTF-8 encodes Unicode compatibly: ASCII characters (0–127) use one byte identical to ASCII. Non-English characters use multi-byte sequences.

Encoding Text in Practice

When you type “Hi” in Python ord('H') returns 72. Serial protocols often send raw ASCII bytes. Hex dumps show ASCII as both hex values and printable characters.

Tools & Reference

Frequently Asked Questions

What is the ASCII code for @?

64 decimal, 0x40 hex.

Why does ‘A’ + 32 equal ‘a’ in some languages?

Case conversion exploits the fixed 32-offset between uppercase and lowercase ASCII blocks.

Is ASCII the same as UTF-8 for English text?

For characters U+0000 to U+007F, yes — UTF-8 is identical to ASCII.

What is EBCDIC?

An alternative encoding used on IBM mainframes — not compatible with ASCII.

How do I convert a string to hex?

Use our ASCII Converter — it outputs hex byte pairs for each character.

Advertisement — Responsive Ad

Share this article

Learn Faster with Numverto

Explore free number system converters, binary tools, EMI calculators, GST calculators, and educational guides.

About Numverto

Numverto logo

Numverto Editorial Team

Numverto publishes educational content about number systems, computer science concepts, binary arithmetic, financial calculations, EMI formulas, GST calculations, and practical learning resources for students and professionals.

About | Contact | Editorial Policy

Article Metadata

Tags: ascii, encoding, programming

Last Updated: March 2026

Related Calculators

Advertisement — Responsive Ad

Related Articles

Popular Tools

View all 13 free tools → · Read tutorials · Number system guide