Skip to content
Tech News
← Back to articles

Software, from First Principles

read original more articles

When you use your smartphone or laptop, it is easy to forget the sheer absurdity of the physical reality underneath. Behind that seamless experience lies centuries of effort from physicists, chemists, mathematicians, engineers, programmers, and designers. Inside your device is a slice of literal rock, purified to near perfection and carved with microscopic circuits. By just controlling the flow of electrons inside these circuits, we are able to make the rock calculate, remember, and think for us, sparing us the mental effort. A single operation takes less than a nanosecond, allowing your device to perform billions of calculations in the time it takes you to blink. This all works so seamlessly that, as users, we are spared from all the complexity, freeing us to simply focus on the task at hand.

A microscope photograph of the Intel Pentium II Dixon processor die (1998). Each rectangular region is a distinct functional block responsible for storing data, doing calculations, or activating specific circuits, etched into roughly two square centimeters of silicon. You can even tell memory from logic by eye, the large uniform grid on the left is cache memory (millions of identical storage cells), while the irregular blocks on the right are the computation circuitry. (Source: Wikimedia Commons)

Yet, while we can ignore how it all works underneath, doing so is becoming increasingly difficult as software dominates more of our lives. In fact, the digital world now influences our daily decisions just as much as the physical world. Just as we learn the basics of physics or biology to understand the physical environment, understanding software has become essential to navigate our digital environment. Without this basic literacy, we risk being passively managed or exploited by systems designed to capture our time and attention, preying on the anxieties that stem from not knowing how they work. With this understanding and clarity, we gain the agency to use technology better, make informed decisions about our digital safety, and even build software for our own specific needs.

My aim with this article is to strip away the “magic” in software and computers, showing that understanding how they work is not a privilege locked behind a computer science degree. To do this, I will avoid jargon as much as possible, introducing only the necessary concepts and building them up using first-principles thinking. Under the hood, computing is not a dry list of technical specifications, but a fascinating story of human ingenuity and practical problem-solving, where each new layer builds upon the last. By following this story, you can build clear mental models, gaining better clarity on what happens behind the scenes when you use your device. You’ll understand not just how the technology functions, but also the invisible safeguards built in to protect you. I have kept this article as concise as possible, retaining only the necessary historical context needed to show how these ideas took shape.

Manipulating Physics to Do Our Math

Most of our problem-solving in the world involves mathematical calculations, whether it is predicting the weather, calculating flight paths for planes, or checking the structural integrity of bridges. Originally, “computers” were just rooms full of mathematicians performing these calculations by hand, and some calculations took days. During wartime and the space race, the stakes grew even higher, calculating the trajectories of ballistic missiles and space rockets required solving thousands of complex equations. Since even a minute error could cause a rocket to explode, send a missile off target, or lead to the collapse of a bridge, these calculations had to be verified again and again. This process was very slow, expensive, and error-prone.

The NACA High Speed Flight Station computer room at Edwards Air Force Base (1949). “Computer” was a job title before it was a machine, these mathematicians processed test flight data by hand. (Source: NASA)

There was an urgent need for a machine that could perform calculations reliably and quickly. Scientists searched for physical processes that could simulate counting, and one such early attempt was the mechanical calculator, built from interlocking gears and levers. But it had problems of its own, mechanical parts wear out over time, require constant maintenance, and are fundamentally slow.

A Pascaline (1642), the mechanical calculator invented by Blaise Pascal, at the Musée des Arts et Métiers in Paris. Each dial sets one decimal place, and the result appears in the row of windows above, the same numbered wheels and carry mechanism as the simulator below. (Source: Wikimedia Commons)

The simulator below demonstrates the fundamental building block of the mechanical calculators: a row of numbered wheels, one per decimal place (Hundreds, Tens, and Ones), exactly like the odometer in a car. Adding one turns the Ones wheel forward by one digit. When it rolls over from 9 to 0 , a carry pin engages and pushes the Tens wheel forward by one digit. If the Tens wheel was itself at 9 , its own carry pin engages too, dragging the Hundreds wheel along in the same motion, every wheel meshed through a carry pin turns together.

... continue reading