Browse

6 breaks
Why one flipped bit can be found and fixed: Hamming's error-correcting code A single flipped bit can turn a good file into garbage, yet a machine can find and repair it without ever seeing the original. In 1950 Richard Hamming, tired… Computing4 min read How to find one name among a billion in 30 looks: binary search Pick a number from 1 to 1,000,000 and you can find it in at most 20 yes-or-no questions. The trick is binary search: look in the middle of a sorted list, throw… Computing4 min read Why common letters get short codes in a ZIP file: Huffman coding ASCII spends 8 bits on every letter, whether it is a common e or a rare z. In 1951 a graduate student, David Huffman, found a way to give frequent symbols… Computing4 min read How a computer finds one flipped bit and fixes it: Hamming's code A bit can flip in memory, on a disk or in a radio signal, and nothing tells you which one went wrong. In 1950 Richard Hamming published a code that finds the… Computing4 min read Why 0.1 + 0.2 isn't 0.3: flip the 64 bits a computer uses for decimals Type 0.1 + 0.2 into almost any programming language and you get 0.30000000000000004. Nothing is broken. Computers count in powers of two, and a tenth is an… Computing3 min read How a computer adds 7 + 1 using nothing but switches A computer chip has no idea what numbers are. It only has switches: billions of transistors that are either on or off. Yet wire a few of those switches into… Computing5 min read