Dev & Computing · ASCII 码表(ASCII Table) · Updated 2026-10-25
What Is ASCII Table?
Definition
ASCII encodes 128 characters in 7 bits: 0-31 controls, 32 space, 48-57 digits, 65-90 uppercase, 97-122 lowercase. Two workhorse patterns: case differs by exactly 32 (0x20 — one bit flip), so XOR with 32 toggles case; and a digit character minus 0x30 gives its value. Extended ASCII (128-255) maps differently per region (GBK for Chinese, Latin-1 for Western Europe) — the historical root of mojibake: the same byte points to different characters in different tables.
Formula
Case toggle: c XOR 0x20; digit value: char − 0x30
Worked Example
"B"=66 and "b"=66+32=98; string sorting follows code order: "Zebra" < "apple" since Z=90 < a=97 — exactly why case-insensitive sorting lowercases first.
Common Misconception
"A Chinese character is one ASCII character" — ASCII holds 128 characters and no Chinese; Chinese needs GBK (2 bytes) or UTF-8 (3 bytes). And UTF-8 is not a fixed-width set — it is variable-length (1-4 bytes), ASCII-compatible for English with CJK at 3 bytes.
Matching Calculators
Related Terms
Keep Exploring
Browse the full glossary, or head back to the homepage for 1,435 free online calculators.
Back to glossary