Eli5 hiw do computers understand binary

21 views
0

I was always fascinated by how computers work and i know that its basically just a bunch of 1 and 0s called binary code hut how do you even get a computer to even understand that in the first place

In: 0

It’s not so much that they “understand” 1 or 0. It’s much more basic than that. In a computer 0 or 1 is often low voltage or high voltage. Computers are just a dumb piece of silicon that we’ve made do calculations by creating complexity from a handful of logic gates.

Everything computers do or “understand” is because they’ve been built/programmed that way.

You’re thinking about it the wrong way, binary is how *we* understand how *computers* work. A computer has no concept of a 1 or 0, all it “knows” is high and low voltage going into its transistors. Each transistor takes a voltage in and opens or closes a switch for another wire depending on that voltage. You then stack ~~trillions~~billions of these transistors in such a way that humans can control the input voltages (typing a key, clicking a mouse, etc) and the layers and layers of transistors feed the correct voltage at the end that we’re looking for. Those final voltages control things like the monitor and speakers.

The computer doesn’t know what it’s doing, all it knows is how to feed voltages through it’s circuits, which we humans represent as 1 (high voltage) or 0 (low voltage)

Edit: apparently it’s billions of them, not trillions

We use numbers, we have 10 of them, and it’s because we have 10 fingers so that seemed like the right number.

For a computer, there’s a wire either has a voltage on it or not. Thus, 1 or a 0. This went along with the way data was stored- a pit on a magnetic media like a floppy disc could be either magnetized north or south (2 states). A punch card either has a punch or not (2 states). So having only two possible digits made sense.

The computer understands it because binary is as native for the computer as decimal (0-9) is for us. It’s like if you take French lessons and find it hard to understand, and then you go to France and you see people talking fluently, and ask them how do they understand it so fast. They understand it because it’s native for them.

Computers are basically built from the ground up to understand binary.

It’s helpful if you think of binary, not as 1’s and 0’s, but ON or OFF. When you’re designing a computer, you’ll have different wires and lines connecting different pieces and depending on whether or not the wire has electricity running down it will affect what the computer is doing. So the hardware is built to say “if the electricity is on for this line, then I’ll do this, but if it’s off, then I’ll do this other thing or do nothing”. When you have a program written in binary, it will be turning these signals on or off depending on what it needs to do.

Computers understand 0s and 1s like abacuses understand whether a bead is up or down.

That is, they don’t.

We humans can move beads on an abacus up or down, and we can flip switches on or off in a computer, but that doesn’t mean the computer or abacus understands what is happening.

The “meaning” that we get from abacuses is interpreting the end results of having moved a lot of beads according to our own rules. And the “meaning” that we get from computers is interpreting the end results of having flipped a lot of switches according to our own rules as well.