Most programming books and lectures begin with treating the computer as if it were a magical box that should be taken for granted. Eventually, a good student will discover that a computer is no more logically complicated and a series of strings and switches, but making this step is nearly impossible with most readily available equipment. For that we need two years of courses at a university.

What if this weren’t the case? What if the computer were treated with even less deference than we would give Hello World?

Of course, computer languages are complicated monsters. Let’s take a look at HelloWorld written in Java.

`package net.saga.tutorial.helloWorld`

class HellowWorld {

public static void main(String args[]) {

System.out.println("Hello World!");

}

}

Holy shit that is a lot of code. Worse, how do you even begin to explain what it actually means? Now let’s look at MIPS Assembly instead.

`add $2, 1, 1`

This code adds one and one and stores it in register 2. This is much simpler than the Java example, and it brings us closer to demystifying the computer. Maybe, however, we can make this even simpler. What if we remove the computer all together?

Let’s say we have a battery, two switches, and a light. Let’s call the first switch A, the second B, and the light bulb $2. When a switch or light is off we will give it a value of 0. When one is on, it will have the value one. So, we have two switches turned off, and the light is off; in other words, zero plus zero is zero. If we turn on switch A the light comes on, and we have 1 + 0 = 1. If instead of A, we switch on B, we have 0 + 1 = 1. So with out a computer we have implemented our MIPS instruction.

What happens when we turn both switches on in a three way switch? The light goes out. Since we all know that 1 + 1 = 2 our analogy must be broken. This is wrong. Our analogy and the thought experiment is still how computers work; the mistake we made was assuming that 1 + 1 = 2. Modern computers use **binary counting** not decimal. Therefore, one plus one does not equal two. One plus one, in binary, equals ten. Since we only have one digit in our display (the light), we see only the **least significant number**, zero. The tens digit, one, is simply lost. What our switch and light example is is an implementation of a one bit adder.

From here we can explore the binary number system as well as the circuitry of an adder. This will of course be a future lesson.