People sometimes assume binary was invented alongside the first computers, a technical solution dreamed up in a 1940s laboratory. The actual history is longer and stranger. The core idea of a two-symbol counting system was formalized in the late 1600s, built on foundations that trace back to ancient China. By the time engineers needed a logical language for electronic circuits, the mathematics had been waiting for two hundred years.
Leibniz in 1679 and the I Ching Connection
Gottfried Wilhelm Leibniz, the German mathematician and philosopher, wrote his first notes on a binary number system in 1679, though his landmark paper "Explication de l'Arithmetique Binaire" was not published until 1703. Leibniz showed that any integer could be represented using only the digits 0 and 1, with each position corresponding to a power of 2.
What made Leibniz's work distinctive was where he found confirmation for it. A French Jesuit missionary named Joachim Bouvet had sent him a copy of the I Ching, the ancient Chinese text of divination and philosophy. The I Ching is built on 64 hexagrams, each made of six lines that are either solid (yang) or broken (yin). Leibniz recognized these immediately as binary sequences. The 64 hexagrams correspond to the 64 six-bit binary numbers from 000000 to 111111.
Leibniz saw this as proof of a universal mathematical language underlying all things, a deeply philosophical motivation rather than a practical one. He had no computers in mind. He was interested in the idea that creation itself might be expressible as a system of ones and zeros, with 1 representing God and 0 representing the void.
His binary arithmetic was mathematically complete. He described addition, subtraction, multiplication, and division in base 2. He proposed that binary might one day be used in calculating machines. The technology to build those machines would not exist for another two centuries.
George Boole and Boolean Algebra, 1847
George Boole was a self-taught English mathematician who had no university education but ended up as a professor of mathematics at Queen's College Cork. In 1847, he published "The Mathematical Analysis of Logic," followed by "An Investigation of the Laws of Thought" in 1854. These works created what is now called Boolean algebra.
Boolean algebra treats logical statements as mathematical objects. Variables can be either true (1) or false (0). Operations such as AND, OR, and NOT combine these values according to strict rules. AND returns 1 only when both inputs are 1. OR returns 1 when at least one input is 1. NOT flips 0 to 1 and 1 to 0.
Boole was not trying to build a computer. He was trying to formalize logic itself, to show that reasoning could be treated algebraically. But what he created was the mathematical backbone of digital electronics. Every logic gate in every chip manufactured today implements Boolean operations. The connection between Boole's abstract algebra and physical circuits waited another 90 years to be made explicit.
Claude Shannon, 1937: Linking Logic to Circuits
In 1937, a 21-year-old MIT graduate student named Claude Shannon submitted a master's thesis titled "A Symbolic Analysis of Relay and Switching Circuits." It has since been called the most important master's thesis of the 20th century, and that assessment is not an exaggeration.
Shannon showed that Boolean algebra could describe the behavior of electrical relay circuits. A closed switch corresponds to 1 (true, current flows). An open switch corresponds to 0 (false, no current). Switches wired in series implement AND: both must be closed for current to pass. Switches in parallel implement OR: either one being closed allows current through.
This was the bridge. Leibniz had a numbering system. Boole had a logical algebra. Shannon showed that physical switches could be arranged to perform Boolean operations, which meant that any logical computation could in principle be built from hardware. The digital computer became mathematically inevitable at that moment, even if the hardware components were still primitive.
Shannon went on to found information theory in 1948, coining the term "bit" (binary digit) in the process. He spent his career at Bell Labs and MIT, and his influence on computing is difficult to overstate.
ENIAC and Early Binary Computers, 1940s
The first general-purpose electronic computers arrived in the 1940s. ENIAC (Electronic Numerical Integrator and Computer), completed in 1945 at the University of Pennsylvania, is often cited as the first, though it actually used decimal arithmetic internally rather than binary. ENIAC stored decimal digits in rings of ten vacuum tubes.
Binary computing came to dominance through machines like the EDVAC (1949), designed by John von Neumann, John Mauchly, and J. Presper Eckert, and the Manchester Baby (1948), built at the University of Manchester. These machines operated natively in binary because it mapped directly to the two states of a vacuum tube: conducting or not conducting.
Von Neumann's 1945 report on EDVAC described what became known as the von Neumann architecture: a binary stored-program computer where instructions and data share the same memory. That architecture is still the basis of most computers built today, more than 75 years later.
ASCII Standardization, 1963
Once computers could process binary data, the problem of what the data meant became pressing. Early computers used incompatible character encodings. IBM had its own scheme. Other manufacturers had theirs. Sharing data between machines required manual translation.
The American Standards Association published ASCII (American Standard Code for Information Interchange) in 1963, with a revised version in 1967 that remains the standard today. ASCII assigned 7-bit binary codes to 128 characters: uppercase and lowercase letters, digits 0 through 9, punctuation marks, and 33 non-printing control characters like carriage return and line feed.
The letter A is 1000001 (decimal 65). The digit 0 is 0110000 (decimal 48). These assignments are not arbitrary: they were chosen to make comparisons and sorting efficient on the hardware of the time.
ASCII made it possible to share text files between different computer systems. It became the common ground for computing, and when Unicode arrived decades later to handle non-Latin scripts, it was built as a superset of ASCII. The first 128 Unicode code points are identical to ASCII.
Modern CPUs and Why Binary Stuck
Modern processors contain billions of transistors, each functioning as a binary switch. The Intel Core i9-13900K, released in 2022, contains approximately 26 billion transistors on a die roughly the size of a fingernail. Each of those transistors represents a single bit, on or off.
Binary stuck because it is the most reliable way to represent information in physical hardware. Two states (high voltage, low voltage) are easy to distinguish even when signals degrade due to heat, interference, or manufacturing variation. More on this in the companion article on why computers use binary.
The instruction sets running on these chips, ARM and x86-64, are direct descendants of binary machine code. When you compile a Python script or a C program, the output is a sequence of binary numbers that the CPU decodes into operations. The chain from Leibniz to a modern smartphone CPU is unbroken.
Binary in Culture: Barcodes, QR Codes, and Beyond
Binary encoding is not confined to computing hardware. It shows up in any system that needs to store or transmit information reliably using a two-state medium.
Barcodes: A standard UPC barcode encodes 12 decimal digits using a binary pattern of narrow and wide bars. The bars are read by a laser scanner, and the alternating reflective and non-reflective stripes are interpreted as binary patterns that decode to the product number.
QR codes: A QR code is a two-dimensional binary matrix. Dark squares represent 1, light squares represent 0. A standard QR code can store up to 3,000 bytes of data using error-correction algorithms that allow partial damage to the code without data loss. The error correction is itself built on binary arithmetic over finite fields.
CDs and DVDs: Optical discs store data as a series of pits and lands on a reflective surface. The laser reads variations in reflected light intensity, interpreting them as binary values. A standard CD holds about 650 MB of data, all encoded as roughly 5 billion binary transitions on a spiral track.
DNA storage research: Since the 2010s, researchers have been encoding binary data in synthetic DNA strands, using the four nucleotides as a quaternary (base-4) system that can be translated to and from binary. DNA has an information density roughly a million times greater than conventional flash storage.
From a 17th-century philosophical exercise to the inside of your phone, binary has proved to be a durable answer to a question humans keep asking: what is the simplest reliable way to represent anything?
Related Reading
Frequently Asked Questions
Who invented binary code?
Gottfried Wilhelm Leibniz formalized the modern binary number system in a 1703 article, though his notes date to 1679. He drew inspiration from the I Ching, the ancient Chinese text whose 64 hexagrams are arrangements of broken and solid lines representing binary sequences. The connection between binary mathematics and physical computing hardware was not made until Claude Shannon's 1937 thesis.
What did George Boole contribute to binary?
George Boole published "The Mathematical Analysis of Logic" in 1847, creating an algebra where variables can only be true or false (1 or 0). Boolean algebra gave binary a formal mathematical foundation and defined the AND, OR, and NOT operations that underpin every logic gate in modern hardware. Without it, there would be no framework for designing logical circuits.
What was the significance of Claude Shannon's 1937 thesis?
Shannon's MIT master's thesis showed that Boolean algebra could describe the behavior of electrical switching circuits. This was the bridge between abstract binary mathematics and physical hardware. It proved that AND, OR, and NOT operations could be built from relays and switches, laying the foundation for all digital electronics. Shannon later coined the term "bit" (binary digit) in 1948.
When was ASCII created and why does it matter?
ASCII was standardized in 1963. It assigned fixed 7-bit binary numbers to 128 characters including letters, digits, and control codes. Before ASCII, each computer manufacturer used its own character encoding, making data exchange between systems unreliable. ASCII made interoperability possible and remains the foundation of Unicode, which is the character encoding standard used on virtually every device today.
