Shannon
Information theory · one biased coin

Shannonuncertainty, measured in bits.

A single coin, weighted by a slider, spilling its verdicts as a field of ones and zeros. Its Shannon entropy — the average surprise per flip — peaks at exactly one bit when the coin is fair and falls to nothing as it becomes a foregone conclusion. Drag the bias and watch the field calm, the curve's dot slide off its peak, and a near-certain stream compress to almost nothing.

Live bit-stream
1 expected 0 surprising
Entropy of one flip
1.000 bits / flip maximal
1 0 0 ½ 1 bias p — probability of 1
Compressed length1000 of 1,000 bits
incompressible — nothing to remove100%
Bias p
0.500
Surprise · 1
1.00 bits
Surprise · 0
1.00 bits
Weight the coin p( 1 ) = 0.50
certain 0fair ½certain 1

H The measure

Entropy is the average number of yes/no questions you would need to pin down each flip. One bit is the most a coin can ever cost you.

½ The peak

A fair coin is maximally uncertain: every flip is a genuine surprise. This is the single point where the curve touches one full bit.

1 Expected marks

The common outcome, set in ink. As the coin tips one way, its field fills with dark, predictable, low-information marks.

0 Surprising marks

The rarer outcome, flagged in red — the flips that actually carry information. Certainty starves the field of them.

Information is surprise you can count.

In 1948 Claude Shannon proposed that the information in a message is not what it says but how much it removes your uncertainty. A flip you can already predict tells you nothing; a genuine coin-toss tells you a full bit. Weight the coin and each flip carries less — the outcome was half-expected already.

The bit-field above is that idea made physical. Every mark is one flip, sampled live from the current bias. The expected symbol is set quietly in ink; the surprising one flares red and stands out — because surprise is exactly what information is. Watch the red thin out as the coin tips: less surprise, less information, lower entropy.

And the compression bar is Shannon's own theorem, drawn to scale. A stream of N flips can be squeezed, on average, to no fewer than N·H(p) bits — and no cleverness beats that floor. A fair stream refuses to shrink; a lopsided one collapses toward silence.