Skip to main content
Encoding

The hidden language of computers: how text-to-ASCII/binary conversion powers every digital interaction

A keystroke never touches your screen as a letter. Here's the exact table that turns 'A' into 01000001, why 8 bits instead of 7, and where that mapping still matters today.

Thien Nguyen
By Thien Nguyen
Updated August 10, 2026 · 5 min read

Type the letter A and nothing that resembles an "A" ever exists inside the machine. What actually moves through the keyboard controller, the OS, RAM and the network socket is the number 65, written as the byte 01000001. Every character on your screen is a lookup-table entry — a single agreed-upon mapping from a bit pattern to a symbol, decided once in 1963 and still running underneath text messages, URLs and source code today.

The mapping, in one line: ASCII assigns every letter, digit and punctuation mark a number from 0–127, and a computer stores that number as an 8-bit binary byte — A is decimal 65, binary 01000001; a space is decimal 32, binary 00100000.

The table that runs everything

RFC 20 — the 1969 document that made ASCII the internet's baseline text encoding — lays out all 128 characters in a fixed grid: 32 control characters (NUL, LF, DEL and other non-printing codes left over from teletype machines) plus 96 printable ones covering the alphabet, digits, and standard punctuation. Every character's position in that grid is its binary value.

CharacterDecimalBinary (8-bit)
A6501000001
a9701100001
04800110000
(space)3200100000
!3300100001

Notice A (65) and a (97) differ by exactly 32 — bit 6 flips and nothing else moves. That single-bit relationship is why case-insensitive string comparisons in low-level code often just mask off that one bit instead of running a lookup, and why swapping case with XOR 0x20 is a decades-old trick rather than a new one.

Why 8 bits, when ASCII only needs 7

128 characters fit in 7 bits (2⁷ = 128), but memory is addressed in 8-bit bytes, not 7-bit units — so every ASCII value gets zero-padded on the left to fill the extra bit. A is technically 1000001 in 7 bits; stored as a byte, it's 01000001. That leading zero looks redundant until you remember it's also the seam where everything past plain English breaks: a byte has 256 possible values, ASCII only defined 128 of them, and for decades vendors used that free top half for accented letters, box-drawing characters, and whatever else a given code page wanted — with no agreement between vendors on what the same byte meant.

Where ASCII stops and UTF-8 starts

Type é, , or an emoji and there's no single byte for it in the original 128-slot table — those characters live outside ASCII's range entirely. Modern text handles this with UTF-8, which keeps every original ASCII character exactly as-is (one byte, same value as always) and represents everything else as 2, 3, or 4 bytes chained together with a marker pattern that says "keep reading, this character isn't done yet."

CharacterBytes neededBinary
A101000001
é211000011 10101001
311100010 10000010 10101100
😀411110000 10011111 10011000 10000000

This is also the single most common bug source in text-length code: counting "characters" by counting bytes only works for pure ASCII. The moment a string contains an accented letter or an emoji, byte count, code-point count and what a human perceives as one character can all disagree — a mismatch covered in more depth in why that emoji broke your database.

Where this mapping still does real work

It's tempting to file ASCII under "solved, 1960s trivia," but the table is load-bearing in places you touch daily:

  • URLs and email headers are still ASCII-only at the protocol level — anything else gets percent-encoded or Base64-wrapped precisely so it survives systems built to expect this exact 128-character range.
  • Checksums and hash functions operate on the raw bytes of a string, so password and Password hash to completely different values — a direct consequence of p (112) and P (80) being different binary numbers, not a stylistic choice by the hash algorithm.
  • Binary protocols and file formats frequently use ASCII bytes as literal delimiters or magic numbers (a .png file starts with the same 8 bytes every time), because ASCII is the one encoding every system on earth is guaranteed to agree on.
  • Debugging garbled text almost always comes down to reading the actual bytes — a string that displays as é instead of é is UTF-8 bytes being misread one byte at a time as if they were single ASCII characters, the exact inverse of the encode step above.

See it happen

The fastest way to make this concrete is to convert something yourself: paste a sentence into a text-to-ASCII/binary converter and watch plain letters turn into 8-bit groups in real time, or paste raw binary into a binary-to-text converter and decode it back. Type an emoji into either one and watch a single visual character expand into four separate bytes — the table above, running live.

FAQ

Is ASCII still used today, or has Unicode replaced it?

Both, simultaneously. Unicode is the modern standard and covers every writing system on earth, but its most common encoding — UTF-8 — was deliberately designed so that plain ASCII text is already valid UTF-8, byte for byte. ASCII wasn't replaced so much as absorbed as UTF-8's first 128 code points.

What's the difference between ASCII and Unicode?

ASCII is a fixed table of 128 characters, each one byte. Unicode is a much larger standard assigning a number ("code point") to over 149,000 characters across every major script, and it needs an encoding — UTF-8, UTF-16, or UTF-32 — to decide how those numbers become bytes. ASCII answers "which number is this character," Unicode-plus-UTF-8 answers the same question at global scale.

Why do some binary-to-text tools produce garbage on valid-looking input?

Usually a byte-boundary mismatch: binary meant to be read as 8-bit ASCII groups gets fed to a decoder expecting UTF-8 multi-byte sequences, or vice versa. A well-behaved converter validates that decoded bytes form legal UTF-8 before showing a result, and reports an error instead of printing garbled characters when they don't.

Cover photo by Tibe De Kort on Pexels.

References

Primary documentation and specifications checked when this article was last updated.

EncodingFundamentalsASCII

Related articles

All articles