This week we go back in time. Way back. These days I mostly type English into a terminal and an agent writes the code. Still, I like to go deep, down to bare metal, until we almost touch the hardware. And then come back up quickly, because as we all know, hardware sucks. It has ruined so much perfect code, code that turned out to be completely wrong because it had misunderstood the real world.

So this is the first of a few episodes about the ladder from holes in paper to agentic coding. This one stays at the bottom of the ladder, with the metal and the cardboard. I will keep it readable if you are fairly technical but never sat through a computer architecture course. Simplified, but mostly true. Fellow cowboys, the well-actuallys can stay in the holster.

TWO BITS AND A CARRY

A transistor is a switch. Current in, current out, or not. Arrange a few of them so the output depends on the inputs and you get a logic gate. AND is on only if both inputs are on. XOR (exclusive or) is on if exactly one input is on.

Now add two single bits, the way you learned addition in school, but with only 0 and 1 to play with.

0 + 0 = 0,  carry 0
0 + 1 = 1,  carry 0
1 + 0 = 1,  carry 0
1 + 1 = 0,  carry 1   (binary 10, which is 2)

Look at the columns. The sum is XOR. The carry is AND. Two gates, and you have a half adder. Put two half adders together with an OR gate so it can also take the carry from the column to the right, and you have a full adder. Chain 64 of those side by side, each one handing its carry to its neighbor, and you can add two 64 bit numbers. That is grade school addition, done by wires (adder, Wikipedia).

The adder has no idea what code is. It does not read anything. There is not even binary inside the chip, only current. Binary is the story we tell about the current. Subtraction is addition in disguise (flip the bits and add one, called two's complement), so one circuit covers both. The guy who connected Boolean logic to electrical circuits was Claude Shannon, in his 1937 master's thesis (MIT).

THE ONLY PARTY TRICK

The CPU (central processing unit) is the engine of a computer, the part that does the actual computing. Anything you have ever seen on a screen, on your phone, your PC, your smart TV, the cat videos, the work emails, and yes, even your incognito tab, came out of a CPU, or its big muscular cousin the GPU. And the adder is basically all a CPU can do. It is the tiniest piece of computation there is, and everything else is adders chained together in clever ways. It is the only party trick the machine knows.

We already saw subtraction, which is adding with flipped bits. Multiplication is adding many times, with the bits shifted over between rounds (binary multiplier, Wikipedia). Division is the same thing backwards. All of it is adding.

You can see the price tag in the old machines. ENIAC, 1945, did about 5,000 additions per second, but only 357 multiplications and 38 divisions (ENIAC, Wikipedia). Same tubes, just more additions. Many classic chips, like the Intel 4004 and 8080, the 6502 (Commodore 64, Apple II, NES) and the Z80, had no multiply instruction at all. You wrote the shift and add loop yourself. Modern chips still do the same thing, they just throw a big pile of adders at it, so it takes a few clock ticks instead of a hundred.

As an old car mechanic, I find this deeply satisfying. No magic, just one simple part copied a ridiculous number of times. And yes, here comes the agentic coding tie-in, I can't help myself. The GPUs running the models are carpets of multiply-add units, and every single token your agent prints in the terminal is billions of these shift and add tricks. Your fancy agent is a very large pile of grade school math.

THE FIRST CPU

So how do you get from an adder to a CPU? Add memory and a reader. A flip-flop is two gates wired into each other, so it locks into 0 or 1 and holds it. Put 64 of them side by side and you have a register, a little box holding one number. Every instruction the chip knows (load, add, compare, jump) is a fixed pattern of bits. A decoder, just another pile of gates, looks at the pattern and opens the right paths, say register A and register B into the adder and the result into register C. A counter points at the next instruction, and a clock ticks it all forward. Fetch, decode, execute, repeat, billions of times per second. That loop is a CPU. Everything your computer does is that loop wearing a costume.

And this is the part to take home. C++, Rust, Python, pick your favorite, it all ends up as those bit patterns, called machine code. The compiler is a translator, and it throws away everything that was there for you. Your inline comments, your pretty docstrings, your variable names, how many lines you put in each file. The CPU never sees any of it and does not give a flying fuck. It gets bit patterns and pushes current through the adder.

Before 1971 a CPU was a cabinet, or a room. ENIAC used 17,468 vacuum tubes and weighed around 30 tons. Later machines got transistors and shrank to the size of a few fridges, but the CPU was still a pile of boards wired together.

Then came a calculator. In 1969 a Japanese company, Busicom, asked Intel to build a set of about twelve custom chips for a new desktop calculator. Ted Hoff at Intel thought that was a lot of chips and suggested something else. One general purpose chip that runs a program, plus memory chips holding that program. Stan Mazor worked out the instructions with him, Federico Faggin did the actual chip design, largely by hand, and Masatoshi Shima from Busicom worked with him on the logic. The result was the Intel 4004, launched on 15 November 1971 as "a new era of integrated electronics" (Intel, Intel 4004, Wikipedia).

The numbers are cute. 2,300 transistors, 740 kHz, 16 pins, and it worked with 4 bits at a time. Four bits hold the numbers 0 to 15, which is one decimal digit with some room to spare. Perfect for a calculator, useless for most else. And remember the party trick. The 4004 had no multiply instruction, so the calculator chip multiplied by adding in a loop, one digit at a time. Very on brand.

The best part is the business side. Busicom owned the rights to the design. Intel's Robert Noyce bought them back by returning Busicom's 60,000 dollars, so Intel could sell the chip to everyone. Busicom took the money and went back to selling calculators. Intel went on to sell CPUs for the next fifty years. I bet someone at Busicom still has nightmares about that meeting. For scale, the 4004 had 2,300 transistors, and the chip in your phone has around 19 billion.

HOLES IN PAPER

Now let's go even further back, to a time where programs did not live on chips or disks, but in cardboard. The idea is older than electronics. In 1804 Joseph Marie Jacquard built a loom controlled by a chain of punched cards. Hole means lift this thread, no hole means don't. A hole or no hole is a bit, so in a way one of the first programmable machines made fabric.

Herman Hollerith took the idea to the US census. The 1880 census took about eight years to tabulate by hand, and the country was growing so fast that the next one risked being outdated before it was counted. For 1890 Hollerith punched each person onto a card and built electric tabulators to count them, and it finished years faster (Hollerith, Wikipedia). His company later merged into what became IBM. The size of the card, 7 3/8 by 3 1/4 inches, is said to come from the dollar bills of the time, so the existing money boxes and cabinets could store them. Historians argue about that one, but my tinfoil hat says it checks out.

In 1928 IBM settled on the format that won. 80 columns of holes. One column holds one character, so one card holds one line of 80 characters (punched card, Wikipedia, Columbia University's card history).

A card is not code. It is storage, the paper ancestor of a USB stick. What the holes meant depended on who read them. A stack of cards, called a deck, could hold program text for a compiler, data records for a program, or finished machine code ready to be loaded. Programmers typed their code on a keypunch, a typewriter that punched holes instead of printing, one card per line. The original editor. No vi-vi-vi, no Emacs pinky, no undo. A typo meant throwing the card away and punching a new one, which is still less work than maintaining a Neovim config. Or, fine, my init.el. The editor war had not even started yet. Everyone used the same editor, and everyone hated it equally. Then they carried the deck to the computer room, handed it to an operator, and came back the next morning to a printed listing telling them there was a typo on line 43. Feedback loop, overnight. Today we get grumpy when a build takes two minutes.

And then there was the horror story every programmer of that era knew. Dropping the deck. A thousand cards on the floor, in random order, and a long night ahead. Now you might think, Lars, did you have one too many again? Why am I reading about people dropping dollar bill sized cards on the floor half a century ago, making it rain, literally? Bear with me, this is where your line length comes from. To survive a drop, people punched a sequence number into the last 8 columns of every card, 73 to 80, so a sorting machine could put the deck back in order. That left 72 columns for the actual code. Remember 72.

WHERE OUR 80 CHARACTERS COME FROM

FORTRAN, the first widely used high level language (more on it next episode), grew up on these cards, and its fixed format is the card's fossil. Columns 1 to 5 for a line label, column 6 to mark a continued line, 7 to 72 for the code. The last 8 belonged to the floor.

When screens replaced cards, they copied the card. IBM's 3270 terminal, the VT100 from 1978 and the original IBM PC text mode all showed 80 characters per line (VT100, Wikipedia). Nobody wanted to reformat a whole company's worth of card based programs and printouts just because the paper turned into glass.

And it never left. Open a fresh terminal and count the columns, odds are 80. Python's style guide, PEP 8, says 79 characters (PEP 8). The Linux kernel style guide still prefers 80 (kernel coding style), even after Linus himself grumbled about it in 2020 and the checker tool was relaxed to 100. Git commit messages are wrapped at 72, the same 72 that FORTRAN allowed for code. So the next time your linter yells at you about line length, know that it is enforcing the width of a 1928 piece of cardboard, the size of a 19th century dollar bill. Spend two grand on an ultrawide monitor, and you still wrap your code at 80 because of a money box from the 1800s.

NEXT EPISODE

That was the bottom of the ladder. Gates that add, a loop that multiplies, a calculator chip that became the first CPU, and a piece of cardboard that still decides how wide your code is. Next episode we climb. Machine code, assembly, the first compilers, FORTRAN, and the old fight between people who wrote everything by hand and the tools that promised to do it for them. If that fight sounds familiar in 2026, it should.

Thanks for "listening" to my yap, see ya next week.