Skip to content
03 of 06From the Caves to AGI

Chapter 2: Mechanize (≈ 1640 - 1956)

Library

Series and technical notes.

You are in From the Caves to AGI · Mechanize.

Watch video, summary and related content

Estimated reading8 min

This chapter explains how humanity went from calculating with physical machines to designing general-purpose computers capable of executing any program. By the end, you will understand why separating instructions from mechanism was the decisive conceptual turn in the history of computing, how Alan Turing defined what it means to compute before any modern computer existed, and how Boolean logic stopped being philosophy and became circuit engineering. No technical background is required, although knowing the previous chapter helps. The story spans three centuries in which every advance reveals that the limit was not hardware, but the question someone dared to ask.

In the previous chapter we saw how humanity learned to represent quantities, relationships and change with symbols. Once those symbols could be manipulated according to rules, the next question almost asked itself: if a procedure is well defined, can a machine execute it?

The answer did not appear all at once. It arrived in layers. First we automated specific operations. Then we learned to encode instructions outside the machine. Later we understood that logic itself could also be expressed mechanically. And finally, we built devices capable of storing programs, executing operations based on conditions, and treating information as a formal quantity.

This chapter follows that path. It is not only the history of how we learned to build computers. It is the history of how we turned abstract procedures into executable processes.


1. From automating calculations to programming procedures

The first calculators: automation is not programming

The Pascaline, built by Blaise Pascal between 1642 and 1644, automated addition and subtraction through geared wheels. A few decades later, Leibniz's Step Reckoner extended the idea and made multiplication and division possible through mechanical repetitions of simpler operations.

The leap mattered, but these were still calculating machines, not computers in the full sense. They executed a specific family of operations. They did not store a general sequence of instructions, could not change their behavior according to intermediate states, and did not clearly separate the mechanism doing the work from the procedure it had to follow.

The limit of mechanical calculators
Pascal and Leibniz built machines that could add and multiply. They calculated, but they could not decide. That leap took another two centuries.
4
2
7
3
1
Ten-position toothed wheels. When one moves from 9 to 0, it advances the next wheel (mechanical carry). Brilliant, but it only knows one operation.
Addition
Subtraction
Multiplication
Conditional logic
Stepped wheel — variable-length teeth
The stepped wheel enables multiplication by repeating mechanical additions. The operator turned the crank the required number of times. More versatile, but still unable to decide.
Addition
Subtraction
Multiplication
Division
Conditional logic
Loops or repetition
The impassable wall: conditional logic
Both machines could calculate if they were told exactly what to calculate. What they could not do was make decisions:
Impossible for either machine
IF result > 100 THEN do A, ELSE do B
This requires reading the result, comparing it and choosing a path. Neither mechanical machine could alter its own execution process.
What was needed
Instructions separated from the mechanism
Jacquard (cards, 1805) · Babbage (Analytical Engine, 1837)
Boolean logic in circuits
Boole (logical algebra, 1854) · Shannon (circuits, 1937)

Jacquard: when instructions separated from the mechanism

The next decisive advance did not come from mathematics, but from the textile industry. The Jacquard loom, developed in 1804-1805, used interchangeable punched cards to control complex weaving patterns. The machine did not "understand" the pattern. It simply executed a sequence of instructions encoded in an external medium.

Here appears an idea that would reshape everything that followed. A machine's behavior can depend on an interchangeable description of steps. This was not yet modern software, but it was a clear precursor to programmability: the mechanism and the instructions stopped being completely fused together.

Babbage and Lovelace: the general machine before it existed

Charles Babbage took that intuition much further with the Analytical Engine. Its design already contains several parts that look familiar today: a calculation unit, separate memory, punched cards for data and instructions, execution that is not strictly sequential, and conditional branching.

The machine was never fully built, but conceptually it was already much closer to a general-purpose computer than to a mechanical calculator. It was not designed for one operation. It was designed to execute different procedures.

In 1843, Ada Lovelace published her famous notes on the Analytical Engine. They contain what is commonly regarded as the first published program for a computational machine: a procedure for calculating Bernoulli numbers. Her deeper intuition was more ambitious still. If a machine can manipulate symbols according to rules, then it is not limited to numbers in the narrow sense. It can operate over any domain that admits a sufficiently precise notation, an idea that anticipates general-purpose computing long before the hardware existed to sustain it.


2. When logic became engineering

Boole: giving reasoning an algebraic form

George Boole gave logic an algebraic form in The Mathematical Analysis of Logic and developed it more fully in An Investigation of the Laws of Thought. His contribution was to show that propositions and logical relations could be treated with formal operations.

The value of this step is not only mathematical elegance. It turns logical reasoning into something that can be represented rigorously with symbols. From that point on, thinking logically is no longer only a verbal or philosophical activity; it can be described through discrete, manipulable structures.

Shannon: the bridge between logic and circuits

For decades, Boolean algebra was a brilliant construction with little practical translation. The bridge came from Claude Shannon. In his 1937 master's thesis, later published as A Symbolic Analysis of Relay and Switching Circuits, he showed that Boolean algebra could be applied to the design of switching circuits.

That connection was decisive. The problem was no longer only how to reason about true and false on paper, but how to build physical devices that implement logical operations. This is where digital logic becomes the material basis of modern computing. A logical proposition stops being only a form of thought and becomes a way of wiring a machine.

Logic gates: from thought to circuits
Boole showed that logic is algebra. Shannon showed that this algebra can be implemented with electrical switches. With just three basic gates, any digital circuit can be built.
AND gate
The output is 1 only when all inputs are 1. The switch opens only if two people press at the same time.
A B Q &
Output: 0
Truth table
ABA AND B
000
010
100
111
A · B
Real use: condition selector — the CPU activates an operation only when two conditions are true at the same time.
OR gate
The output is 1 when at least one input is 1. The switch opens if either person presses.
A B Q ≥1
Output: 0
Truth table
ABA OR B
000
011
101
111
A + B
Real use: error detection — an alarm activates if any sensor detects a problem.
NOT gate (inverter)
A single input: it inverts its value. 0 becomes 1, and 1 becomes 0. This is logical negation.
A Q 1
Output: 1
Truth table
ANOT A
01
10
Ā
Real use: complement — NAND = AND + NOT, a building block of modern chips because of its silicon efficiency.
With NAND gates alone (AND followed by NOT), any digital circuit can be built. Modern chips contain millions of NAND-equivalent gate structures.
1-bit adder — combined gates
A + B produces one sum bit (S) and one carry bit (C). Two gates, four possible input combinations.
A B XOR S (sum) 0 A B AND C (carry) 0
ABSC
0000
0110
1010
1101
Chaining 1-bit adders lets us add numbers of any practical width. A CPU contains billions of logic gates built from transistor networks.

Turing: defining what it means to compute

In 1936, Alan Turing published On Computable Numbers, with an Application to the Entscheidungsproblem. His contribution was not to describe a specific machine, but to isolate what is essential in any mechanical process of calculation: reading symbols, writing symbols, changing state, and following finite rules step by step.

The power of this abstraction is enormous. On the one hand, the Turing machine provides a general model of computation. On the other, it makes clear that computation also has boundaries. There is no general procedure capable of deciding, for every program and every input, whether that execution will halt or continue forever. That result, known today as the halting problem, marks one of the most important formal limits in computing.

Optional extension: why we cannot always know whether a program will halt

We are not talking here about an isolated practical case, such as a badly written program that falls into an infinite loop. The claim is much stronger: there is no general method that, given any program and any input, can always decide in finite time whether that execution will halt or continue indefinitely.

The intuition can be misleading at first. In many concrete cases we can reason about termination. We can see, for example, that a counter decreases until zero, or that a recursion has a clear base case. What Turing proves is that no universal verifier can exist that works for every possible program.

The proof starts by assuming that such a general verifier does exist. Imagine a function HALTS(program, input) that always answers correctly:

HALTS(program, input) =
  "yes"  if the program halts
  "no"   if the program never halts

From there we can build another program that uses the verifier and then behaves exactly opposite to what is predicted when it analyzes itself. If the verifier says it will halt, it loops forever. If the verifier says it will not halt, it stops.

PARADOX(x):
  if HALTS(x, x) = "yes":
    repeat forever
  if HALTS(x, x) = "no":
    halt

The problem appears when that program is run on its own code, that is, when we evaluate PARADOX(PARADOX). If the verifier predicts that it halts, then the program enters an infinite loop. If it predicts that it loops forever, then the program halts. Either way, we get a contradiction.

The conclusion is not that we can never prove that a particular program halts. The conclusion is more precise and more important: there is no single automatic universal procedure that solves that question for every case. This is one of the first formal boundaries of computation.

That result changes the tone of the entire discipline. Computing stops being only a promise of unlimited automation and acquires provable limits. Not every difficult problem is simply a matter of more time or more hardware, because some boundaries arise from the mathematical structure of the problem itself.

The Turing Machine: what it means to compute
An abstract model with three elements — tape, head, and rule table — capable of simulating any possible computation. And also of proving which computations are impossible.
📜
Tape
Cells with symbols: 0, 1, or blank. This is the memory.
🔍
Head
It reads, writes, and moves left or right.
📋
Rules (program)
State + symbol read → what to write, which direction to move, new state.
Simulation — add 1 in binary
The machine reads a binary string from right to left and adds 1, propagating the carry. Press Step-by-step or Run.
State: q0 — looking for the end
Step: 0
Rule applied: — (not started)
What it proved
Any mechanical computation process can be described with these three pieces. If an algorithm exists, a Turing Machine can execute it.
The Halting Problem
There is no algorithm that can determine, for every program and input, whether that program will ever terminate. The limits of computation are mathematical, not practical.

Shannon again: measuring information without depending on meaning

In 1948, Shannon changed the framework again with A Mathematical Theory of Communication. This time the focus was not logical circuits, but information as a measurable quantity. The conceptual shift is deep: to build a general theory of communication, a message has to be analyzed without depending on its meaning.

From this come ideas that are central to everything that follows: compression, channel capacity, redundancy, reliable transmission under noise, and the practical notion of the bit as an elementary unit of information. Modern computing does not only need logic and memory. It also needs a precise theory of how much can be represented, transmitted and reconstructed.


3. Bringing the program inside the machine

The stored program: the great conceptual simplification

The next transformation is to move instructions inside the machine itself. The stored-program concept holds that instructions and data can reside in the same memory and be treated under a common encoding.

The idea became associated with the 1945 First Draft of a Report on the EDVAC and, over time, with what is called the von Neumann architecture. The practical effect was enormous. Changing tasks no longer required physically rewiring the machine or replacing external mechanisms. It was enough to change the contents of memory.

Here the separation between hardware and program stops being an external intuition, as in Jacquard, and becomes the organizing principle of the modern computer.

ENIAC, Baby and EDSAC: the computer stops being an idea

It is worth distinguishing the milestones carefully because they are often conflated. ENIAC, completed in 1945, demonstrated that general-purpose electronic computing was physically viable. But reprogramming it was still costly and cumbersome because it depended on panels and wiring.

The Manchester Baby became, in 1948, the first machine to execute a stored program from memory. It was an experimental demonstration, not a stable computing service, but it marked a change of regime.

EDSAC, operational in Cambridge in 1949, turned that principle into a machine useful to real users: the programmable computer as practical infrastructure rather than only an experimental demonstration.

The von Neumann cycle: how the processor executes an instruction
Four phases repeated billions of times per second. The architecture described by this cycle is the basis of almost all current processors.
1
FETCH
2
DECODE
3
EXECUTE
4
WRITE-BACK
Phase 1 — FETCH
Read the instruction
The control unit reads the address in the PC (Program Counter) register, fetches the instruction stored at that memory address, and loads it into the IR (Instruction Register). The PC is incremented by 1 to point to the next instruction.
Active: Memory + Control unit + Registers (PC, IR)
Example — ADD R1, R2 instruction:
PC=42 → Memory[42] → IR = "ADD R1, R2" · PC = 43

Dartmouth: when the question moves from computing to thinking

When John McCarthy, Marvin Minsky, Nathaniel Rochester and Claude Shannon drafted the 1955 proposal for the Dartmouth Summer Research Project on Artificial Intelligence to be held in the summer of 1956, the technical framework was already in place. Symbolic logic, digital circuits, a theory of computation, quantifiable information and programmable electronic computers all existed.

The novelty was no longer asking whether a machine could calculate. That part was beginning to be settled. The new question was whether processes such as learning, abstraction, language use or problem solving could also be described precisely enough to be executed by a machine.

AI did not emerge in a vacuum. It emerged when general computation stopped being an aspiration and became a real foundation on which something more ambitious could be imagined.

From gears to the universal computer
Three centuries of attempts to mechanize thought. Each era solves a different problem: first the machine, then the theory, finally the union of both.
Mechanical era
1642 – 1805
Machines that calculate, but without a program
Theoretical era
1836 – 1948
What can be computed, and its limits
AI is born
1945 – 1956
Machine + program + intelligence hypothesis

4. What this period left in place

By 1956, humanity no longer only knew how to represent the world with symbols. It knew how to build machines that manipulated those symbols automatically, repeatedly and generally. We had gone from automating specific calculations to designing devices capable of executing programs, implementing logic, storing instructions and operating on quantifiable information.

That change transforms everything. From this point on, the central question will no longer be how to mechanize calculation, but how to make a machine adjust its behavior from experience, data and objectives. That is the starting point of the next chapter.

Next chapter

Chapter 3 — Learn → — How a machine can improve from data: from the perceptron and expert systems to the deep-learning revival before 2012.


5. References

Core sources
Key Source Brief description
R1 Britannica — Pascaline Pascal's calculator and its actual capabilities.
R2 Britannica — Step Reckoner Leibniz's machine and the extension of mechanical arithmetic.
R3 Britannica — Jacquard loom Punched cards and automated sequences.
R4 Britannica — Analytical Engine Babbage's design, cards, memory and conditional control.
R5 Computer History Museum — Ada Lovelace The 1843 notes, Bernoulli numbers and the idea of programming.
R6 Project Gutenberg — Boole, An Investigation of the Laws of Thought Classic text on algebraic logic.
R7 MIT DSpace — Shannon, A Symbolic Analysis of Relay and Switching Circuits The bridge between Boolean algebra and circuits.
R8 Turing (1936) — On Computable Numbers Turing machine, computability and limits.
R9 Shannon (1948) — A Mathematical Theory of Communication Foundations of information theory.
R10 Britannica — Stored-program computer The stored-program principle.
R11 Computer History Museum — First Draft of a Report on the EDVAC Key document in the spread of the stored-program model.
R12 Britannica — ENIAC The first major general-purpose electronic computer.
R13 Computer History Museum — Manchester Baby First execution of a program stored in memory.
R14 Britannica — EDSAC First stored-program computer with regular practical use.
R15 Stanford / John McCarthy — Dartmouth proposal Foundational text for the 1956 summer project.

Frequently asked questions

What is the difference between automating and programming? Automating means mechanically reproducing a specific fixed operation, as the Pascaline did with geared addition. Programming means separating the mechanism that operates from the procedure it has to follow, so that the same machine can execute different procedures without physically rewiring anything. That separation is the conceptual shift from calculator to computer, and Babbage had already anticipated it in the design of the Analytical Engine decades before hardware existed that could sustain it.

What did Turing demonstrate with the Turing machine before computers existed? He showed that it was possible to isolate what is essential to any mechanical process of calculation—reading symbols, writing symbols, changing state and following finite rules—and at the same time showed that this structure has formal limits. The halting problem is not a practical hardware limitation but a mathematical result: no general procedure can always decide whether any arbitrary program will halt or continue indefinitely.

Why was it so important for instructions and data to share the same memory? Because it turned changing a task into a change of content rather than a change of physical structure. Before stored-program computing, reprogramming a machine like ENIAC could require days of rewiring panels. Under the von Neumann principle, it is enough to change what is stored in memory, which makes general-purpose computers possible: the same physical architecture can execute radically different programs.

What real problem did the stored-program computer solve that earlier calculators could not? Calculators mechanized specific predefined operations, useful for repetitive calculations but unable to adapt their behavior to intermediate states or execute conditional logic. A stored-program computer such as EDSAC in 1949 allowed real researchers to present a problem, describe it as instructions stored in memory, and obtain results without rebuilding anything physical, turning computing into reusable practical infrastructure.

Keep learning
Next chapterLearnFrom the Caves to AGI