The paper that started it all: reading Shannon's 1948 work through an ASCII lens
The paper that started it all: reading Shannon's 1948 work through an ASCII lens
Have you ever stopped to ask why ASCII is exactly 128 characters and not, say, 200? Not a round number, not a committee's compromise — 128, which is 2×2×2×2×2×2×2. Seven twos. There is a reason for that, and it has nothing to do with keyboards or printers. It's math, written down in a single 1948 paper by a 32-year-old Bell Labs engineer named Claude Shannon. That Shannon 1948 paper, "A Mathematical Theory of Communication," is the closest thing our whole industry has to a founding text, and I'd bet most people who type ASCII art all day have never opened it. So let me show you what's inside, because it's stranger and more practical than you'd think.
Before the paper: information was a vibe
Here's the situation Shannon walked into. In the 1920s and 30s, if you worked for a telephone or telegraph company — and a lot of the smartest people in engineering did, because that's where the money was — your boss had exactly one question: how much can we squeeze down this wire? More messages per minute meant more revenue per mile of copper. Engineers could measure everything. Volts, watts, ohms, decibels. But the thing actually being transported, information itself, had no unit, no formula, no way to be counted at all.
Worse, everyone confused information with meaning. A letter from your mother contains more "information" than a junk mail ad, right? Subjectively, sure. But you can't build a telephone network out of subjectivity, and you can't invoice a customer for emotional weight. Meaning was a dead end, and smart people knew it, and that's where the field sat for about thirty years.
Shannon's move was almost insultingly simple: stop caring about what messages mean. A message is a choice from a set of possible messages, and that's the whole job. Think of it as a shipment of identical crates — you don't measure the crates by what's inside them, you measure them by how many you need to ship. A telegram reading "SEND MONEY" and one reading "SEND MONEY NOW" are, for the engineer, the same size crate: one option out of a small set, picked by the sender. The meaning is the receiver's problem. The counting is the engineer's. That one pivot — information as selection, not as sense — is what the whole information theory history we actually live in is built on. Every zip file, every video stream, every checksum, every character in this paragraph is downstream of that decision.
The bit and the coin: the Shannon 1948 paper's first trick
Once information is a choice, you need a unit for how much choice there is. Shannon picked the simplest possible machine: a binary digit, a yes or a no, a switch that's on or off.
Think of it like flipping a coin. A fair coin has two equally likely outcomes, so one flip carries exactly one unit of information — one binary digit. Two coin flips give four possible outcomes, so two digits. Three flips, eight outcomes, three digits. See the pattern? Every extra flip doubles the possibilities, and the count grows by one. Shannon wrote that as the logarithm base two, and in a footnote he credited the word "bit" to a Bell Labs colleague, J. W. Tukey: "binary digit," shortened. The word is about seventy-five years old, as far as I remember. Feels younger somehow.
So the number of bits in a message is really the answer to a question: how many yes/no questions would you need to pin down exactly what was sent? That's why the old twenty-questions game works as a strategy — every answer halves the remaining possibilities, and the best players are unconsciously doing base-two logarithms in their heads.
Now the ASCII punchline. 128 is two to the seventh power. Seven binary digits, seven yes/no questions, exactly enough to pick out any one of 128 characters. The character set itself was standardized in 1963 — ASA X3.4, a committee product through and through — but the accounting that says "seven bits, not six, not nine" is pure Shannon, from a paper published fifteen years earlier. Every time you type an "@", some machine somewhere resolves seven binary decisions to draw it. You've been running the Shannon 1948 paper on a loop, every keystroke, your whole life, and nobody told you.
Entropy: how surprising a message is
Here's where it gets weird. What if the choices aren't equally likely?
Go back to the coin, but imagine a loaded one — ninety-nine times out of a hundred it lands heads. Does a flip of that coin still carry one full bit of information? Shannon said no. Almost every flip is heads, so heads tells you almost nothing you didn't already know. It's the tails that surprise you. The information carried by a message, he argued, is how surprising it is — and the average surprise across all possible messages is what he called entropy.
Entropy, in his sense, is one small formula: take each possible message, multiply its probability by the logarithm of that probability, add them all up, and put a minus sign in front. If you've never seen the equation, don't blink — the shape is all you need. Fair coin, two equal outcomes: one bit of entropy. Loaded coin, ninety-nine to one: a sliver of a bit, because the outcome is practically foretold. A message you can predict is a message that barely needs to be sent.
You know entropy in your bones. You have a friend who replies "k" to everything — that's a low-entropy channel. Predictable, boring, and, here's the trick, hugely compressible. Shannon showed that written English is roughly half redundant — as far as I remember, he estimated you can guess about every other letter from context alone. That's why you can still read "cn y rd ths wtht vwls", and why zip files shrink text by half. Compression is the art of removing the predictable part and keeping only the surprise. Every modern format — PNG, JPEG, MP3, video codecs — is an entropy-sweeper: find what's predictable, throw it away, keep the surprise.
One more twist, because it's my favorite. Shannon's formula is formally the same one Boltzmann used for entropy in physics — that's literally where the name comes from. As far as I remember, Shannon used to tell a story about asking John von Neumann what to call it, and von Neumann replying: call it entropy, because nobody really knows what entropy is, so in any argument you'll always have the advantage. Whether that happened or it's just a good story, I choose to believe it.
The noisy channel: where parity was born
Real wires are not fair coins. They hiss, they drop bits, they corrupt characters. Shannon's problem number two: can you send information through noise and still be sure it arrives?
Set the scene. You're in a loud bar, and you have to get a phone number to the person across the table. You could shout it three times and hope — that's redundancy, and it sort of works, but it's expensive and it still fails if all three shoutings get garbled the same way. Shannon's answer was the noisy-channel coding theorem, and it made engineers' heads spin: no matter how noisy the channel, you can communicate as reliably as you like, as long as you send slower than the channel's capacity. Noise isn't a wall. Noise is a tax. You just have to pay it in the right currency — clever encoding — instead of brute-force shouting.
The simplest payment plan is parity, which I like to describe as a checksum before checksums were cool. Count the ones in your message, add an extra bit chosen so the total comes out even. If the receiver counts an odd total, something flipped in transit, and you ask for a resend. Crude, but it's the seed of everything that followed. And here's the accidental link to our subject: the serial lines that carried early ASCII often ran seven data bits plus one parity bit. If you've ever stared at "8N1" or "7E1" in an old modem settings menu and wondered what it meant — that's what it was. The spare eighth bit of your 8-bit world was, half the time, a Shannon-style error check riding along for free.
Within a couple of years, R. W. Hamming at Bell Labs built on this and invented codes that don't just detect errors but correct them. Every packet that crosses the internet today still does a checksum on the way through. QR codes, satellite links, the TCP stack in your browser, the error correction on a scratched CD — all of it is the Shannon 1948 paper doing its job, and all of it is one chapter of the information theory history that started in a math journal.
Here's the whole theorem in a picture, forty characters or so:
.--. .--. .--. .--.
| 1 | | 0 | | 1 | | 0 |
'--' '--' '--' '--'
| | | |
v v v v
.=======================.
( the noisy channel )
'======================='
| | | |
v v v v
.--. .--. .--. .--.
| 1 | | 0 | | 1 | | 0 |
'--' '--' '--' '--'
Bits in, hiss in the middle, bits out — and because somebody did the math in 1948, the bits at the bottom are the same as the bits on top.
Information theory ascii: art as a compressor
Now the part I actually care about. What does any of this have to do with drawing dragons out of characters?
Everything. A piece of ASCII art is a message squeezed through a brutally narrow channel: a grid of monospace cells, ninety-five printable glyphs, that's the entire palette. The artist is a lossy compressor working in real time. You take a face with infinite detail and keep only what surprises — the eyes, the frown line, the tilt of the chin — and throw away the rest, exactly the way a codec throws away what you can't see. Shannon would have loved this. It's source coding with a sense of humor.
And you can measure it, which is the fun part. Count how often each character appears in a drawing and run the entropy formula — that's the shannon entropy ascii style of analysis, and it's a surprisingly good critique tool. A paragraph of prose is low-entropy: e, t, a, and spaces do most of the work. A good ASCII dragon is high-entropy: the artist spreads the ninety-five characters out so your eye keeps guessing, keeps being surprised. Shading with # and . and M isn't random — it's choosing glyphs whose visual weight and texture trick the eye in exactly the right way. The text pixel art guide explains that palette trickery in detail; the short version is that every glyph you choose is an information decision.
If you want to feel this with your own hands, open the ascii.im studio, draw something simple — a mug, a cat, whatever — and then count the characters you used versus the characters a sentence about the same subject would use. The drawing will win, and it will win because it's denser, more surprising, more carefully chosen. You can even run a shannon entropy ascii count on your own drawings and watch the number climb as you get better. That density is information theory ascii, practiced by people who have never read the paper and don't need to. If you're going to spend your evenings on this — and let's be honest, you are — the pricing page is a two-minute read, and the studio costs nothing to start with.
So next time you paste a dragon into a chat, or type a smiley, or just hit a key, remember what's underneath. Seven binary decisions per character. One paper from 1948, written by a man who, by all accounts, rode a unicycle through the halls of Bell Labs. Math that predates your keyboard by half a century and still runs it.
The characters were always the easy part. The counting was the revolution.
Here's my question for you, viewer: take your favorite piece of ASCII art and guess its entropy. Is the drawing more surprising than the sentence you'd write to describe it? I genuinely want to know what you find. Go count. I'll wait.