What are computers?

Computers take directions and do them exactly, like investment bankers.

The TL;DR

Computers are special machines that take directions (from software) and do them exactly as ordered, just like investment bankers.

  • Software gives computers instructions (show this! calculate that!) and computers listen to those instructions as best as they can

  • The three main pieces of a computer are CPU, RAM , and Disk

  • Computers work by sending electrical currents through millions of tiny switches

Almost everything you do involves some type of computer, and it’s probably the most important technological invention in human history. So read this.

What are computers?

Almost any technology you interact with – Microsoft Excel, your Honda Odyssey, or your oven – is built out of software and hardware. Software is the instructions, and the hardware takes care of making those instructions actually happen: sort of like a driver and car. Behind the scenes in Microsoft Excel, there are thousands (millions?) of little commands – just like a gear shift or a right turn from a driver – and the computer is how those get done.

Software and hardware diagram

If this model is a bit difficult to wrap your head around, it might be helpful to look at how software and hardware have actually looked over the years. The first computers used punch cards with instructions on them fed into the computer to tell it what to do: add 1 and 2, store that result, and things like that. You know, all that math I still can’t do without a calculator.

card catalog library

Over time, those punch cards (the software) started evolving into gear positions, and then finally digital representations, or what you’d call “code” today. How software communicates with the computer isn’t really important: what matters is the model of computers doing what software tells them to. The history of computers is really long and really boring, and you can read plenty about it elsewhere (because goddamnit, this isn’t a history newsletter).

CPU, RAM, and Disk

Computers work a lot like the way you work. If someone is giving you instructions – your professor in class, your boss at work – what do you need to make sure you actually do them (aside from a raise)?

  • Something to store the instructions that you’re given

  • Something to process the instructions you’re given

That’s it. When your boss tells you to go get their coffee order from Starbucks, you need to (a) process that they want you to go to Starbucks, order their stuff, and bring it back, and (b) remember that they want a Pumpkin Spice Latte With Oat Milk Laced With Cocaine. It turns out that computers work pretty much the same way.

Elements of a computer diagram

In practice, there are three main pieces of any computer: one is for processing and two are for storage.

CPU stands for Central Processing Unit , and it’s what tries to understand and execute your software’s instructions. It does basic stuff like arithmetic and logic (if this do that, etc.), which we’ll dive into more when we explore what code is. A lot of computers also have a GPU (Graphics Processing Unit), which does the same thing as a CPU but is built for specific tasks.

Disk doesn’t stand for anything (it’s a word), and it’s where you store almost everything on your computer. Things like files, software programs, and settings are stored on your disk; it’s generally for long term storage, because it’s kind of slow to access. Most new laptops use SSD (Solid State Drives, where information is stored on chips), but for most of digital computing history, we used HDD (Hard Disk Drives, where information is stored on magnetic disks).

RAM stands for Random Access Memory, and it’s the remedy to Disk being slow: it’s much faster “memory” that computers use for things like intermediate storage (storing the result of a calculation temporarily). The more you can store in RAM, the faster your computer can process things. The downside: it’s much more expensive than disk, and anything stored in RAM gets deleted when you shut down your computer.

🚨 Confusion Alert

Even though RAM is really storage, people often refer to it as part of a computer’s processing function. That’s because adding RAM does make your computer faster; but that’s not direct, it’s because more RAM enables your CPU to work faster.

Nice, but this is all theoretical: the way that computers actually work in practice is so f*cking crazy that it’s hard to believe.

How computers actually work

Computers break down all software instructions into a simple yes or no and use microscopic electrical signals and gates to process and store those instructions. It’s pretty wild.

  • All software instructions can be broken down into a series of binaries – yes/no, or one/zero (if this doesn’t make sense, that’s fine!)

  • Computers use tiny things called transistors to__ represent those ones and zeros__

  • Electrical signals flow through those transistors, executing on the software’s instructions

Let’s go back to our driver / car example. When you want to make a right turn, that’s an instruction – but there are a few actual tasks that you need to do to make that instruction happen, like braking, putting on your turning signal (like we all always do), and turning the wheel. Even those tasks can be broken down further – braking relies on a whole braking system, turning signals rely on a whole signal system, etc. The basic idea is that every instruction can be broken down into continually smaller and smaller tasks, until those tasks are just ones and zeros.

How a computer works diagram

🤔 Undefined Terms

If you’re not sure about what software instructions actually are and what it means to break them down into basic tasks, that’s OK! We’ll cover that in another post when we talk about binary and compilers.

It took me months to wrap my head around this for the first time, and the truth is that these aren’t really critical details for being smart with computers (a lot of software developers don’t know this stuff either). But the general ideas are useful because they explain some of the concepts that you might see recurring in your day job. A few examples:

  • Companies have made a shit ton of money manufacturing computer chips (CPUs). You’ve probably heard of Intel, Qualcomm, and Hewlett Packard: they have a combined market cap of $400B

  • You might have heard of Moore’s Law – Gordon Moore (former Intel CEO) predicted that we’d get so much better at manufacturing these little transistors that we’d be able to double how many we can fit on a chip every couple of years

  • Transistors (also called semiconductors) are made out of a silicon compound, which is why Silicon Valley is called what it is. All of the early transistor manufacturers were created there, like Fairchild and Intel

If you’re interested in learning more about how computers work and what transistors are, Jon Gertner wrote a great book about it.

“Computers” in conversation

“It looks like you’re having issues because you’re maxing out your RAM”

Some applications (like Chrome, or Slack) use up so much RAM for processing (remember though, RAM isn’t a processor) that you run out and can’t do anything else. Stop doing that, Chrome and Slack. Stop it.

“How many GhZ is your CPU?”

CPU speed is measured in GhZ (Gigahertz, very futuristic sounding). My current MacBook Pro generates 3.1 of them, and the first 1.0 GhZ computer was built in 2000.

“This software just isn’t compatible with your laptop’s operating system

Your computer isn’t able to interpret the instructions that the software is giving to it. This can happen for a bunch of reasons, and one is a mismatched operating system , but more on that in another post.

“Honestly bro, even wonder if our brains are just giant computers?”

Don’t smoke too much weed.

Terms and concepts covered

Software
Hardware
CPU, processor
RAM, memory
Disk, SSD, HDD
Binary
Transistors, semiconductors

Further reading