what is a computer?

There are a few ways to answer that question:

These are all correct (except the last one, which I made up). So which one do we use?

What we really care about is actually building a computer. So let’s focus on a narrower question: what does a computer do?

example

When you want to watch a video on your phone, something like this happens:

  • You search for the video by name. Your phone reads what you typed.
  • Your phone transforms that data into a piece of data representing the video.
  • Your phone outputs the data as a video.

This read-transform-output process is one way of thinking about computers. A computer is an object that:

  • reads input from the user
  • transforms that input into some kind of answer
  • outputs the answer in a way the user can understand

This isn’t a rigorous or complete definition of a computer, but it’s a good start.

programs

Wait a second. Under our definition, isn’t a cooking pot a computer?

  • It reads in a bunch of ingredients
  • It transforms the ingredients
  • It outputs delicious soup

The missing component is programmability — the ability to change behaviour based on a program, which is a list of instructions. A cooking pot will always behave the same way; you can’t turn it into a toaster by writing “toaster” on the side.

flexibility

What about an oven with multiple settings, like “fan”, “rice cooker”, “defrost” etc? That sounds like changing behaviour. Does that count as a program, and does that make an oven a computer?

When we talk about programmability, we need a certain level of power or flexibility. It’s not enough to just choose between different settings, or adjust the duration of cooking. A computer needs to be able to do things like “check whether this condition is true”, or “remember this value, and check it later”.

goal

So to build a computer out of roons, we’ll need to build a pattern that can:

  • read our inputs
  • transform that information into some kind of result, in accordance with a program we can change in flexible ways
  • output the result in a way we can read

In the next tutorial, we’ll start tackling these tasks.

continue