How was the first computer programmed? With what? How does it know 1 means yes and 0 means no?

526 viewsOtherTechnology

How was the first computer programmed? With what? How does it know 1 means yes and 0 means no?

In: Technology

23 Answers

Anonymous 0 Comments

The computer doesn’t “know” anything. The “yes” and “no” is our interpretation of the things a computer does.

The most simple example of a computer would probably be a calculator that is able to add things. In computer lingo, that is called an “adder”.

An adder has two inputs where you send it electricity, and two outputs to show the results. The way its designed give the following behaviour:

|Input A|Input B|Output S|Output C|
|:-|:-|:-|:-|
|Off|Off|Off|Off|
|On|Off|On|Off|
|Off|On|On|Off|
|On|On|Off|On|

If the outputs are linked to say an LED light, you can then tell based on looking on those outputs whether none, one or both of the inputs are on. This allows you to do any maths up to 1+1.

If you wanted to do bigger numbers, you can just add more of these adders to count each additional power of two in a similar way to how when you add two numbers on paper, you first add the ones column, then the tenths column, then the hundreds column etc (which are powers of ten).

The important part is that the computer doesn’t “know” what any of this means. We as engineers define what the different things mean. So, we say that the two inputs are the two numbers we want to add, and the two outputs represents the result.

When it comes to more complex things, this all build on this. If you see a red dot on your computer screen, the computer doesn’t “know” what that red dot is. It has just done a bunch of operations similar to above, and then based on that is sending a number to the screen to tell it which coluor it should have.

Edit: Made and fixed a typo in the logic table above /facepalm

edit 2: This got a bit of traction, so wanted to add two quick links.
If you want to have a good understanding of how computers work, from transistors to the internet, I would highly recommend [Crash Course: Computer Science](https://www.youtube.com/watch?v=tpIctyqH29Q&list=PL8dPuuaLjXtNlUrzyH5r6jN9ulIgZBpdo) on YouTube. It’s amazing.

If you want to truly understand how computers work on the most basic level, and want to follow along in building a computer from scratch, nothing is better than [Ben Eaters series on building a 8bit computer on breadboards](https://www.youtube.com/watch?v=HyznrdDSSGM&list=PLowKtXNTBypGqImE405J2565dvjafglHU).

You are viewing 1 out of 23 answers, click here to view all answers.