Computing & tech · Overview

Binary: how 0 and 1 carry all information

A text, a photo, a bank transfer: everything is stored as 0s and 1s. We explain why, where the idea comes from, how it becomes a circuit and how a 0 and a 1 actually live inside a chip, step by step and without jargon.

Quick facts

Bit
0 or 1the smallest quantity of information
Byte
8 bitsthat is 256 possible values (0 to 255)
Two-valued logic
Boolean algebrapublished by George Boole in 1854
Link with circuits
1937Claude Shannon's master's thesis (published in 1938)
Basic memory
The flip-flopEccles-Jordan patent of 21 June 1918
TTL thresholds at 5 V
0.8 V / 2.0 Van input reads as 0 below 0.8 V and as 1 above 2.0 V

A text, a photo, a song, a bank transfer: inside a computer or a phone, all of it is stored and carried in the same form, a string of 0s and 1s. Using only two symbols looks poor. Yet it is the very reason digital electronics is reliable, fast and cheap.

This article gives an overview in six steps:

  1. The basics: what a bit and a binary number are.
  2. The history: who had the idea, and how several separate ideas came together.
  3. Boolean algebra: how we reason with true and false.
  4. Logic gates: how that reasoning becomes a component.
  5. The flip-flop: how a circuit learns to hold on to a piece of data.
  6. Electronics: how a 0 and a 1 actually live inside a chip.

It is written for two audiences: beginners, who will find every term defined where it first appears, and specialists, who will find deeper dives in the "Going further" boxes. The "Bridge to understanding" boxes fill in notions that are often assumed rather than really understood. Parts 3, 5 and 6 are deliberately overviews: each will be covered in detail in a dedicated article in the same series.

Key takeaway

Binary is not a mysterious "computer language". It is a number system with two digits, paired with a logic with two values (true/false), and it is very simple to build with a switch that is either open or closed.

01The basics: bit, byte, binary system

  • Bit (short for binary digit): the smallest quantity of information, which can only be 0 or 1. A question answered with yes or no is worth one bit.
  • Binary system (or base 2): a way of writing numbers with only two digits. Our usual system, decimal (base 10), uses ten.
  • Byte: a group of 8 bits.

The principle: in decimal, each position is worth ten times the previous one (units, tens, hundreds…). In binary, each position is worth twice the previous one: 1, 2, 4, 8, 16, 32…

Worked example: writing 13 in binary

We break 13 down into powers of two: 13 = 8 + 4 + 0 + 1. We write a 1 for each value used and a 0 for each value not used:

Position8421
Used?yesyesnoyes
Bit1101

So 13 is written 1101 in binary. Going the other way, 1101 = 8 + 4 + 0 + 1 = 13.

How many values with n bits?

Each extra bit doubles the number of combinations. With 1 bit: 2 values. With 2 bits: 4 (00, 01, 10, 11). With 3 bits: 8. With 8 bits (one byte): 2 × 2 × 2 × 2 × 2 × 2 × 2 × 2 = 256 values, that is the numbers from 0 to 255 (11111111 in binary).

Bridge to understanding

A binary number doesn't say what it stands for. The same byte 01000001 is the number 65, but the ASCII text-encoding convention maps it to the letter "A", and another program might read it as a shade of grey. Binary is a carrier; it is the convention (the encoding) that gives it meaning.

Key takeaway

One bit = two states; one byte = 256 states. Everything else (letters, colours, sounds) is a convention that links a number to something.

02A history of binary: ideas that took centuries to meet

Binary was not invented in one go to build computers. Independent ideas, born for other reasons, came together in the 20th century: a way of writing numbers (Harriot, Caramuel, Leibniz), a way of calculating with true and false (Boole), a way of building all this with switches (Nakashima, Shannon) and electronic memory (Eccles and Jordan).

Writing numbers with two digits: Harriot, Caramuel, Leibniz

Unpublished manuscripts by the Englishman Thomas Harriot (1560-1621) show that he was already using the digits 0 and 1 around 1600, without seeing any practical use for them. In 1670 the Spaniard Juan Caramuel published a work studying base two, probably the first European publication on the subject. But it is Leibniz who sets out the system in a complete form.

Who was Leibniz?

Gottfried Wilhelm Leibniz (Leipzig, 1 July 1646 – Hanover, 14 November 1716) was a German philosopher, mathematician, inventor, jurist, historian and diplomat. He is known for developing infinitesimal calculus, independently of Newton. He also built calculating machines, which worked in decimal, not binary.

Leibniz is regarded as the first mathematician to set out the binary system in a complete form. A manuscript dated 15 March 1679 already describes a mechanical binary calculator using balls to represent digits, which was never built. In 1703, after a correspondence with the Jesuit Joachim Bouvet, a missionary in China, who recognised Leibniz's binary numbers in the hexagrams of the Yi Jing (the "Book of Changes"), Leibniz sent the Royal Academy of Sciences in Paris his "Explication de l'arithmétique binaire" ("Explanation of binary arithmetic"), printed in 1705. For him, binary was first of all a tool for mathematical and philosophical thought, not a practical calculating tool.

George Boole: an algebra for logic (1854)

Who was Boole?

George Boole (1815-1864) was born in Lincoln, England, into a modest family, and was largely self-taught. With no university degree, he was appointed in 1849 as the first professor of mathematics at Queen's College, Cork, in Ireland. He taught there until his death at the age of 49.

In 1854 Boole published "An Investigation of the Laws of Thought, on Which Are Founded the Mathematical Theories of Logic and Probabilities". His central idea: logical reasoning (true/false, and, or, not) can be written with symbols and follow calculation rules. This is Boolean algebra, the subject of section 3. Boole was not thinking about machines: for decades his work remained a topic in logic and mathematics.

William Eccles and Frank Jordan: the electronic flip-flop (1918)

Who was Eccles?

William Henry Eccles (1875-1966), a British physicist, was a pioneer of radio transmission: a former assistant to Guglielmo Marconi, he argued for the existence of the ionosphere and proposed the word "diode". A Fellow of the Royal Society, he worked in London at the City and Guilds Technical College when the flip-flop was invented.

Who was Jordan?

Frank Wilfred Jordan (Canterbury, 6 October 1881 – Winchcombe, 12 January 1941) was a British physicist. A student at the Royal College of Science from 1899 to 1904, he taught physics in 1912, then in 1918 was an "electrician" at the City and Guilds Technical College, alongside Eccles.

On 21 June 1918, Eccles and Jordan filed a British patent for a circuit with two vacuum tubes (glass bulbs that control the flow of current) that has two stable states, and described it in 1919 in the journal The Electrician. They were thinking of telegraphy and telephony, not computing. The name "flip-flop" caught on afterwards. The circuit would be used in the Colossus code-breaking computer (1943, or 1944 depending on the source), then in the American ENIAC, and would become the basic building block of electronic memory. We come back to it in section 5.

Nakashima and Shannon: linking Boolean algebra to electricity (1934-1938)

Who was Shannon?

Claude Elwood Shannon (1916-2001), an American engineer and mathematician, was born on 30 April 1916 in Michigan (in Petoskey according to Britannica, in Gaylord according to other sources). A graduate of the University of Michigan in 1936, he went on to MIT, working with Vannevar Bush on an analogue calculating machine of gears and relays, the differential analyzer. He joined Bell Labs in 1941, taught at MIT from 1956 and died in 2001.

Who was Nakashima?

Akira Nakashima (born 1908) was a Japanese engineer at the company NEC, who designed relay circuits for telephony. He looked for a theory on which to base the design of these circuits, and arrived at an algebra that he only later recognised as Boolean algebra. Between 1934 and 1936 he published a series of papers on the subject, including one with Masao Hanzawa in 1936.

In the 1930s, several engineers realised, independently, that Boolean algebra describes relay circuits: Nakashima in Japan, Victor Shestakov in the USSR, and then Shannon. In his 1937 master's thesis, published in 1938, "A Symbolic Analysis of Relay and Switching Circuits", Shannon shows that it can be used to simplify telephone exchange circuits, and conversely that relays can solve Boolean algebra problems. His work, more general, overshadowed the other two and founded the modern design of digital circuits.

In 1948, in "A Mathematical Theory of Communication", published in the Bell System Technical Journal, Shannon founded information theory. He notes there that a flip-flop, having two stable states, can store one bit of information. The threads of the story are now joined.

Key takeaway

Writing numbers with two digits (Harriot, Caramuel, Leibniz), calculating with true and false (Boole), building this with switches (Nakashima, Shannon) and remembering a state (Eccles and Jordan). None of the pioneers mentioned was working to build the computer as we know it.

Going further: a compact timeline
DateEvent
1670Caramuel publishes "Mathesis biceps" (base two included)
15 March 1679Leibniz manuscript: a binary calculator using balls (never built)
1703Leibniz sends his "Explication de l'arithmétique binaire" to the Royal Academy of Sciences
1705The 1703 volume of the Academy's Mémoires is printed
1854Boole, "An Investigation of the Laws of Thought"
21 June 1918Eccles-Jordan patent (two-state vacuum-tube circuit)
1934-1936Nakashima's work (NEC) on relay circuits
10 August 1937Shannon submits his master's thesis (published in 1938)
1943-1944The Eccles-Jordan circuit is used in Colossus
1948Shannon: the flip-flop stores one bit

03Boolean algebra: reasoning with true and false

3.1 The idea: turning a question into a variable

A Boolean variable is a quantity that can only be 0 (false) or 1 (true). Whenever a question can be answered with yes or no, we can write it as a variable:

  • A = "the door is open": A is 1 if yes, 0 otherwise.
  • B = "it is raining": B is 1 if it is raining, 0 otherwise.

Boolean algebra is the set of rules for combining these variables. It rests on three basic operations, which we already know from everyday language.

3.2 The three basic operations

NOT (negation, written ¬A or A with a bar): flips the value. "It is not raining" is true when "it is raining" is false.

A¬A
01
10

AND (conjunction, written A·B): is 1 only if both are 1. "I go out if I have my keys AND my wallet": you need both.

OR (disjunction, written A+B): is 1 if at least one of the two is 1. "I take an umbrella if it rains OR if it is windy": either is enough (and both together too).

A truth table lists every possible combination of inputs and the matching output:

ABA·B (AND)A+B (OR)
0000
0101
1001
1111

Bridge to understanding

The link with switches. This is what Shannon and Nakashima saw in the 1930s. Two switches placed in series (one after the other) only let current through if both are closed: that is an AND. Two switches placed in parallel (on two branches) let current through if at least one is closed: that is an OR. A "normally closed" contact, which opens when it is activated, makes a NOT.

AND, OR and NOT with switches Three circuits with a lamp. AND: two switches in series. OR: two switches in parallel. NOT: a normally closed contact. AND: switches in series A B Lamp lit only if A = 1 and B = 1 OR: switches in parallel A B Lamp lit if A = 1 or B = 1 (or both) NOT: normally closed contact A A = 0: contact closed, lamp lit A = 1: contact open, lamp off
Figure 1 — AND, OR and NOT built with switches. The switches are drawn open (value 0); the NOT contact is drawn closed, with its open position dashed.

Key takeaway

Boolean algebra is a two-valued algebra in which you can check everything with a truth table. Its calculation rules, which let you simplify an expression (and therefore a circuit), will be presented in a dedicated article.

04Logic gates: from algebra to component

A logic gate is an electronic circuit that performs a Boolean operation: it takes one or more bits as input and produces one bit as output. Boolean algebra provides the rules; gates build them in hardware.

There is a gate for each operation in section 3 (NOT, AND, OR) and a few very common combinations: NAND ("NOT-AND"), NOR ("NOT-OR") and XOR ("exclusive OR", true when the two inputs are different). By assembling them, we build everything a computer can calculate.

Example: to add two bits, the sum is an XOR of the two and the carry is an AND. Two gates are therefore enough to write 1 + 1 = 10 in binary (sum 0, carry 1). Shannon already presented a base-two adder at the end of his 1937 thesis.

Bridge to understanding

A limit of gates. A gate is called combinational: its output depends only on the inputs present at that moment. Remove the inputs and the result disappears. With gates alone, we calculate but we remember nothing. To keep a result, we need another component: that is the subject of the next section.

Key takeaway

Boolean algebra provides the rules, logic gates the components. But neither gates nor rules give any memory.

05The flip-flop: giving circuits a memory

A computer has to remember: the result of a calculation so it can use it in the next step, the key you have just pressed, the value of a counter. It needs a component whose output stays after the command has gone, like a bedside lamp with a toggle switch: you press once, it lights up and stays lit, whereas a push-button only lights it while you press.

This component is called a flip-flop (or latch). It has two stable states: once placed in one state, it stays there even when the command has gone. It therefore stores one bit. Picture a ball resting in a landscape with two hollows: in either one it stays still, and it takes a push to move it from one to the other.

A flip-flop as a ball in two hollows A ball rests in the left hollow (state 0). An arrow shows the push that makes it cross the hump to reach the right hollow (state 1). push (input) hump to cross state 0 (stable) state 1 (stable)
Figure 2 — A flip-flop is a ball in a landscape with two hollows: each hollow is a stable state, and it takes a push to move from one to the other.

The principle relies on feedback: the output of each gate is wired to the input of the other, so each gate "listens" to the other and confirms it. This is exactly the Eccles and Jordan circuit, built today with transistors.

That changes everything. Putting 8 flip-flops side by side stores one byte: this is a register, a basic building block of a processor. A circuit that can remember "where it is" can follow a series of steps, that is, run a program. A clock (a regular signal that sets the rhythm of circuits) decides at which instant each flip-flop records its data.

Key takeaway

Gates calculate, flip-flops remember. A computer is this combination, synchronised by a clock. How a flip-flop works in detail will be covered in a dedicated article.

06Binary in electronics: from voltage to 0 and 1

6.1 A bit is a voltage

In a circuit, a bit is not an abstract symbol: it is a range of voltage, measured in volts (V). By convention, a low voltage stands for 0 and a high voltage stands for 1. The component that does the switching is the transistor, a switch controlled by an electrical signal: it lets current through (the "closed" state) or blocks it (the "open" state).

Successive technologies have changed the component, never the principle: electromechanical relays, vacuum tubes (as in the Eccles and Jordan circuit), then transistors, now packed by the billion onto a single chip.

6.2 Why only two levels? The noise margin

Noise is the set of stray electrical disturbances added to a signal (interference, supply variations, signals from neighbouring wires). With only two well-separated levels, a small disturbance doesn't change the interpretation. This is the deep reason for the binary choice in electronics: robustness.

So that two circuits understand each other, each circuit family sets four voltages:

  • VOL (output voltage in the low state, Output Low): the maximum a transmitted 0 can reach.
  • VOH (Output High): the minimum a transmitted 1 guarantees.
  • VIL (Input Low): the maximum an input can reach and still be read as 0.
  • VIH (Input High): the minimum an input needs to be read as 1.

The noise margin is the safety gap between what an output guarantees and what an input requires. Take the TTL (Transistor-Transistor Logic) family, a historic family of logic circuits powered at 5 V and well documented. The values below come from the Texas Instruments datasheet for the SN7400 (a NAND gate in the standard TTL series):

QuantityMeaningGuaranteed value
VOLMaximum output voltage of a 00.4 V (at an output current of 16 mA)
VILMaximum input voltage read as 00.8 V
VIHMinimum input voltage read as 12.0 V
VOHMinimum output voltage of a 12.4 V (at a current of 0.4 mA)

Between 0.8 V and 2.0 V the level is undetermined: the input guarantees no reading. These values are worst-case guarantees: the same datasheet gives more favourable typical values (for example a typical high output of 3.4 V).

TTL voltage levels at 5 V An input bar is split into three zones: read as 0 up to 0.8 V, undetermined between 0.8 V and 2.0 V, read as 1 above 2.0 V. An output bar guarantees a 0 up to 0.4 V and a 1 from 2.4 V. The gap is 0.4 V on each side. INPUT (reads as) OUTPUT (guaranteed) read as 1 undetermined read as 0 5 V VIH 2.0 V VIL 0.8 V 0 V 1 sent 0 sent margin 0.4 V margin 0.4 V VOH 2.4 V VOL 0.4 V
Figure 3 — Voltage levels of the 5 V TTL family (worst-case guaranteed values, Texas Instruments SN7400 datasheet). Dashed lines link the input thresholds to the output levels.

Worked example: a gate outputs a 0 at 0.4 V (worst case). A 0.3 V disturbance gives 0.7 V, below 0.8 V: the 0 is read correctly. Conversely, a 1 output at 2.4 V with a 0.5 V disturbance falls to 1.9 V, below 2.0 V: the reading is no longer guaranteed. The guaranteed noise margin here is 0.4 V on each side (0.8 − 0.4 and 2.4 − 2.0).

Key takeaway

A bit is a range of voltage, separated from the other by a forbidden zone. The noise margin makes binary robust. How transistors produce these voltages (TTL and CMOS families, power consumption, compatibility) will be covered in a dedicated article.

07Limits and common misconceptions

  • "A computer only understands 0 and 1" is a simplification. It handles voltages and switches; 0 and 1 are just our way of writing them down.
  • Binary isn't magic. A single bit means nothing on its own: you need a convention (encoding) to know whether it is a number, a letter or a colour.
  • Noise isn't eliminated, it is contained. Beyond the noise margin, errors appear, hence the error-detection and error-correction codes in memories and transmissions.
  • Undetermined states exist. The forbidden zone between VIL and VIH, flip-flops that can hesitate between 0 and 1: the real world is never perfectly binary.
  • The history is more nuanced than the shortcuts. Leibniz was not the first to write numbers in binary (Harriot, Caramuel); it was not he but Bouvet who linked his system to the Chinese hexagrams; and Shannon was not the only one to link Boolean algebra to circuits (Nakashima, Shestakov).

08Conclusion

Binary brings together three things that fit into one another: a number system (from Harriot and Caramuel to Leibniz), a logic (Boole) and a physical implementation (Nakashima, Shannon, Eccles and Jordan, then the transistor). Gates calculate, flip-flops remember, voltages carry it all, and the noise margin makes the whole thing reliable.

What stands out is the gap in time: two centuries separate Leibniz's idea from its use, and none of the pioneers mentioned was aiming for the computer. Understanding binary is therefore understanding how abstract ideas, born elsewhere, become machines when another field (here, electricity) gives them something to run on.

The series continues with three articles: Boolean algebra and learning to calculate, flip-flops, and binary in electronics.

09Glossary

  • Bit: a binary digit, 0 or 1.
  • Boolean algebra: an algebra in which variables are only 0 or 1, with the operations AND, OR, NOT.
  • Byte: a group of 8 bits (256 values).
  • Clock: a regular signal that sets the rhythm of sequential circuits.
  • Encoding: a convention that links a meaning (letter, colour…) to a number.
  • Feedback: sending a circuit's output back to its input.
  • Flip-flop: a circuit with two stable states that stores one bit.
  • Logic gate: a circuit that performs a Boolean operation.
  • NAND, NOR: "NOT-AND" and "NOT-OR" gates, the inverses of AND and OR.
  • Noise: stray electrical disturbances added to the signal.
  • Noise margin: the guaranteed voltage gap between an output level and the matching input threshold.
  • Register: a group of flip-flops storing several bits.
  • Transistor: an electrically controlled switch.
  • Truth table: a table of outputs for every possible input.
  • TTL: a historic family of logic circuits; also the name of a set of voltage levels.
  • XOR: exclusive OR, equal to 1 if the two inputs differ.

Sources

History of binary

  1. Ineichen (Robert) — Leibniz, Caramuel, Harriot und das Dualsystem (in German) — accessed October 2026
  2. Bruderer (Herbert), Communications of the ACM — The Binary System Was Created Long Before Leibniz — accessed October 2026
  3. Encyclopædia Britannica — Gottfried Wilhelm Leibniz — accessed October 2026
  4. History of Information (Jeremy Norman) — Leibniz Expounds on Binary Arithmetic for Computing — accessed October 2026
  5. Royal Academy of Sciences (Leibniz) — Explication de l'arithmétique binaire (reproduction, in French) — accessed October 2026
  6. BibNum / FMSH (Yves Serra) — Le manuscrit « De Progressione Dyadica » de Leibniz (in French) — accessed October 2026
  7. University College Cork — Biographical history: George Boole — accessed October 2026

Eccles, Jordan and the flip-flop

  1. Encyclopædia Britannica — William Henry Eccles — accessed October 2026
  2. Wikipedia — William Eccles (physicist) — accessed October 2026
  3. Wikipedia — F. W. Jordan (based on British civil registration records and on patent GB 148582) — accessed October 2026
  4. History of Information — Eccles & Jordan Invent the Flip-Flop Circuit — accessed October 2026
  5. IEEE Spectrum — Re-creating the First Flip-Flop — accessed October 2026

Shannon and Nakashima

  1. Encyclopædia Britannica — A Mathematical Theory of Communication / Claude Shannon — accessed October 2026
  2. IEEE Information Theory Society — Claude Elwood Shannon — accessed October 2026
  3. Encyclopedia.com — Shannon, Claude Elwood — accessed October 2026
  4. Taylor & Francis — Biographical chapter: Claude Elwood Shannon — accessed October 2026
  5. Shannon (Claude E.), Transactions of the AIEE, vol. 57, no. 12, 1938 — A Symbolic Analysis of Relay and Switching Circuits (Wikipedia overview) — accessed October 2026
  6. IEEJ Transactions on Fundamentals and Materials (Yamada, 2004) — Summary of Nakashima's work — accessed October 2026
  7. Information Processing Society of Japan — Akira Nakashima — accessed October 2026

Voltage levels

  1. Texas Instruments — SN5400, SN54LS00, SN54S00, SN7400, SN74LS00, SN74S00 (datasheet SDLS025D) — accessed October 2026