How do computers KNOW what zeros and ones actually mean?

1.90K views

Ok, so I know that the alphabet of computers consists of only two symbols, or states: zero and one.

I also seem to understand how computers count beyond one even though they don’t have symbols for anything above one.

What I do NOT understand is how a computer knows* that a particular string of ones and zeros refers to a number, or a letter, or a pixel, or an RGB color, and all the other types of data that computers are able to render.

*EDIT: A lot of you guys hang up on the word “know”, emphasing that a computer does not know anything. Of course, I do not attribute any real awareness or understanding to a computer. I’m using the verb “know” only figuratively, folks ;).

I think that somewhere under the hood there must be a physical element–like a table, a maze, a system of levers, a punchcard, etc.–that breaks up the single, continuous stream of ones and zeros into rivulets and routes them into–for lack of a better word–different tunnels? One for letters, another for numbers, yet another for pixels, and so on?

I can’t make do with just the information that computers speak in ones and zeros because it’s like dumbing down the process human communication to the mere fact of relying on an alphabet.

In: 264

47 Answers

Anonymous 0 Comments

I think the answer you’re looking for comes down to hardware interfaces. Not sure if this can be ELi5, but maybe ELi15:

I’m going to skip over the parts you already know: 0 and 1 is actually “on and off” on the transistors, and that a string of them means things like a letter, a different (higher) number, or a pixel on a game.

So how does it know if a random string of 01101010 is a pixel, the number 202, a letter, or part of the physics calculation to a game?

This comes down to transistors and circuitry. If you’re aware of AND, OR, NOR, gates, resistors, capacitors, etc.. you know that you can build entire systems using circuit components. Computers are just extremely complex versions of those things.

So where is the jump from 0 and 1s -> complex circuitry like a computer take place? Well this comes down to things like the BIOS (Basic Input and Output System), the operating system, and the firmware and drivers.

Again, without going into the details, people in the past have figured out that certain combination of AND/OR/NOR gates and signals would allow you to convert data (0 and 1s) into a pixel, or interface with keyboard, or turn it into an audio signal. These things people figured out in the past then get packaged up and turned into BIOS firmware, drivers, or part of the operating system.

So now that we’ve established ways to interface with a computer and all the physical interface stuff is abstracted (pre-packaged and invisible to the upper layers), we can do more from here. Computing is literally layers upon layers upon layers of abstraction, until you get near the top where a computer programmer can edit human readable code and compile (un-abstract) it back down to machine code.

Obviously there’s a lot more to this, this is an ELI15 after all, but hopefully it’s enough bridge that unknown magical mystery clouding in your head.

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