TwiddleLab / Courses / Code
How Computers Store Everything
Flip switches into numbers, letters, pixels and sound, then squeeze, fix and hide them.
Best after: How a Programmer Thinks
Lessons
- Switches Count (5 min): A bit is one switch: 0 (off) or 1 (on).
- Bytes and Overflow (7 min): A byte is 8 bits. It holds 2⁸ = 256 values: 0 to 255.
- Letters Are Numbers (7 min): Every character has a number, its code: A is 65, a is 97.
- Pixels and Colors (7 min): A picture is a grid of pixels, each one a single colour.
- Sound Is a List of Numbers (7 min): A microphone turns sound into a wave; a computer samples it: measures its height again and again.
- Squeezing Without Losing (7 min): Compression writes the same information in fewer characters.
- Throw Away What You Won't Notice (7 min): Lossy compression throws away detail you are unlikely to notice, forever.
- The Parity Magic Trick (7 min): A parity bit is an extra bit that makes the number of 1s even.
- Fixing Errors on the Fly (7 min): Error correction adds spare bits so the receiver can find and fix flipped bits itself.
- Secret Messages (7 min): Encryption turns a message into gibberish that only someone with the key can undo.
- Hide a Message in a Picture (7 min): Steganography hides that a message exists at all, not just what it says.
Lessons are interactive and need JavaScript. Turn it on to play them.