Question Locked

How Do CPU's Read Data/Instructions?

0 helpful
12 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
Assembly language, as I've heard, is the language of microprocessors. You write it, it gets "assembled" into binary and the CPU reads it. How does this work? CPU's are simply made of silicon and some conductive metal, aren't they? How does the CPU know what a 1 or a 0 is? Perhaps it's because 0 is off and 1 is on, and impulses flow that way...but how does the computer know how to turn this off and on by "reading" binary? There has to be some sort of magic going on.

12 replies

by thechas

To understand how the CPU converts raw binary data into actions, you need to learn basic electronics.

The silicon in the CPU is at the basic level a vast array of electronic (transistor) switches. Imagine millions of light switches that are interconnected in ways to respond when specific other light switches are turned on and off.

Step back to one of the first "hobbyist" computers, the Altair.
To program the Altair you set one bank of switches for the memory address in binary, with on as a "1" (high) and off as a "0" (low), and another bank of switches with the binary data to be stored in that memory location. You then pressed another switch to write the data to the memory address. If you programmed each byte of data correctly into memory, you could then run your program.

The CPU and memory do the same thing. Only on a much faster and more autonomous level.

All of the "magic" of computers and other modern electronic devices are pure applied physics.

You might try this web site for learning electronics:

http://www.openbookproject.net/books/socratic/

Here is a video on using an Altair computer.

http://www.youtube.com/watch?v=vAhp_LzvSWk

Chas

by sanks4545

Thanks dude, exactly what I was looking for! Now, the only thing left is to become an awesome electrical engineer.

by charles bundy

Roll over!

At it's heart a processor fetches and executes instructions. There is nothing specific to electronics or electricity to realize this never ending cycle (see Alan Turing, Joseph Jacquard and Charles Babbage)

by charles bundy

The CPU defines nothing :) You use transistors to control current flow. The mechanical equivalent is a bucket attached to a lever which turns on water. Water flowing means 1 no water means 0. Or switch it around :). Anyway poke a hole in the bucket. Pour water in faster than it flows out the hole and eventually the weight of the water turns on the spigot (which is spring loaded to turn off automatically). No water into bucket and eventually leakage causes the bucket to lighten and turn water off. You now have the basic mechanical switch to build a computer.

by tony hopkinson

Processors don't "understand" any of it.
They "understand" two different voltages, in TTL (Transsitor to Transistor logic, that's about 0 and about 5. On or off true or false, 1 and 0 (or sometimes 0 and 1 ...)
Assuming you don't want to learn quantum mechanics. :P. Make a start with basic transistor theory, then skip over to basic logic cuircuits and boolean algebra.
Then a long with clock circuits you have the basic tools to understand this at this level. Mind you you don't have to know how logic circuits are implemented to get how they are used.
Best bet is to wind the clock back and look at this stuff before we learnt how to put a million transistors in something the size of your thumb.

by oh smeg

Tried to explain what a PN Junction on a Silicon Wafer is or how Silicon is Doped to Form a series of PN Junctions.

Of course 3D Silicon Wafers are even more complex to try to explain to someone dot versed in High End Silicon Technology.

I still prefer The Chas's explanation though it's easier for a Nontechnical Person to try to understand. ;)

Col

by charles bundy

Aww can't we thrown around CMOS and MOSFET?

I like the Chas document, but also felt like it needed to be said that computation isn't really tied to any physical representation e.g., electrical versus mechanical or even biological (just like Tony said "get back to basics")

by hal 9000

Back to basic's :^)

Once I was asked to describe a LED to a guy in it's most basic form. You should try it sometime it???s not as easy as it sounds. ;)

The basic description of a LED is a Light without a Filament though the Actual PN Junction is the Filament so it???s not quite correct but the nontechnical Enduser will understand that. ;)

Col

by charles bundy

I love MAKE magazine :) I will add that light is produced when energy is released by electrons 'falling' into positive areas. Think about that when Collin demonstrates H.J. Round's cat whisker experiment which wound up being the first documented L.E.D.

http://vimeo.com/2284258

by oh smeg

I worked my way through Uni fixing sewing machines

And I still use Sewing Needles today for testing .repairing electronics. They are the most useful device ever invented and very few understand just how technical that they actually are.

I still have a One Make Sewing Machine Needle Book here with over 2,000 pages of different needle types and that is just types not different sizes.

I just love it when I???m told that a Sewing Needle is Blunt as they are made that way. What they user means is that they are now too blunt to work properly. ;0

Col

This discussion is closed to new replies.