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
The key thing is that the computer isn’t looking at a single 1 or 0 at a time but 32 or 64 of them at a time. These represent numbers in binary, and when you design a CPU architecture, what you do is define what number corresponds to what command. The wires carrying the number manually go to different places according to your design document to do different commands in the CPU.
Other people build devices like screens and keyboards, and they all take specific numbers corresponding to commands that say “make this pixel red” or “make sure the cpu knows I pressed the f key”. There is a layer of translation (drivers) between the cpu and those devices that allow your computer to work with a variety of devices. For example, if the number 4 corresponds to the 4th pixel from the top on one brand of display vs the 4th pixel from the bottom on another display, they tell the cpu that information. How? More numbers of course!
Latest Answers