Interactive visual book · 12 chapters

The Measure of Surprise

Bits, compression, and codes that survive noise

Why does a rare event tell you more than a common one? Why can English be squeezed into a smaller file while random noise refuses to shrink? And how can a few extra, carefully placed bits let a message cross a crackling line intact? This book answers with things you can poke: guessing games, a live Huffman tree, a bit-flipping channel and a code that finds its own mistakes.

Live toySqueeze a phrase
Type anything
 
Your progress 0 of 12 chapters completed
Begin Chapter 1 →
How to read this book

Every chapter shows an idea before naming it. Drag the sliders, type into the boxes and break things on purpose. Six colours keep the same meaning on every page:

probability surprise / information code bits (what is stored or sent) noise / errors entropy / limits check bits / repair

The Measure of Surprise — an interactive introduction to information theory. Plain HTML, CSS and canvas; works offline, straight from disk. Your progress is stored only in this browser.