From "Code"
🎧 Listen to Summary
Free 10-min PreviewEncoding Information with Binary Digits and Systems
Key Insight
Bits are widely used to encode diverse forms of information through various systems. Paul Revere's lantern signal, for instance, used one or two lit lanterns to convey 'British by land' or 'British by sea', with the absence of lanterns implying 'no invasion yet'. While two lanterns offer four binary possibilities (00, 01, 10, 11), his system effectively used three, incorporating redundancy to mitigate 'noise' (interfering factors like darkness or distance) by making both '01' and '10' represent 'by land'. Similarly, two film critics' 'thumbs up' or 'thumbs down' can be represented by two bits, creating four distinct outcomes (00, 01, 10, 11), like 'both hated it' or 'both loved it'.
The number of bits required depends directly on the number of discrete possibilities to be encoded. Leonard Maltin's movie ratings, which include 7 possibilities from 'BOMB' to 'four stars' (with half-star increments), require 3 bits (since 2 to the power of 3 equals 8, sufficient for 7 possibilities). Entertainment Weekly's 13 possible grades from 'A+' to 'F' necessitate 4 bits (as 2 to the power of 4 equals 16, providing sufficient codes). Each additional bit doubles the number of possible codes (e.g., 1 bit for 2 codes, 2 bits for 4 codes, 3 bits for 8 codes, and so on), following the formula 2^n, where 'n' is the number of bits. To determine the number of bits needed for a given number of codes, one calculates the base two logarithm.
Real-world applications of binary encoding are prevalent, often hidden but sometimes visible. 35-millimeter film cassettes use DX-encoding, a checkerboard of 12 silver (1) and black (0) squares, where 5 bits encode 24 standard ASA film speeds (e.g., 00110 for 400 ASA). Cameras read these conductive silver and insulating black patterns via metal contacts to automatically adjust exposure. The Universal Product Code (UPC) is a ubiquitous example, representing a series of 95 bits. It contains guard patterns, and groups of 7 bits encode 12 numeric digits (e.g., 0 for number system, 5 digits for manufacturer, 5 for product, 1 for modulo check character). Even older communication methods like Morse code (dots, dashes, pauses as 1s and 0s) and Braille (6-dot characters as 6-bit binary numbers) can be efficiently represented by bits.
📚 Continue Your Learning Journey — No Payment Required
Access the complete Code summary with audio narration, key takeaways, and actionable insights from Charles Petzold.