PDA

View Full Version : The Genie in the Lamp (a.k.a the CPU)


Manny Calavera
11-30-2001, 05:41 PM
Hello all. I have searched through the forum as well as many books on this subject but I'm still at somewhat of a loss. I don't know if it's that I still can't get over just how amazing computers are, more specifically the microprocessor, or that my brain is rejecting the idea so i've come to you all for some clarification. I understand how the computer can perform math by using strings of logic gates. However, I still am having trouble understanding how the computer is instructed. I'm not talking about sitting at a text editor, compiling some code, then watching the magic happen. I mean what is actually going on at the electron level. When the computer is executing instructions are these instructions merely numbers? Are instructions passed to the ALU? Can a series of AND, OR, NOT, etc. operations really be responsible for the death of the Counter-Terrorist I just fragged? Someone enlighten me http://www.PCGuide.com/ubb/smile.gif.

Also. After reading the board for awhile I really have to tip my hat to you all. This place is really a diamond in the rough here in the vast internet. One too many times have I seen some poor soul curious about his machine ask a question on IRC and be ripped apart for his curiosity. I'm glad to see there are still some geeks around who care more about learning/teaching than flaming someone just to inflict pain.

YODA74
11-30-2001, 06:10 PM
Manny,Welcome to PC Guide. and thank you for the incredibly nice intro.

Also. After reading the board for awhile I really have to tip my hat to you all. This place is really a diamond in the rough here in the vast internet. One too many times have I seen some poor soul curious about his machine ask a question on IRC and be ripped apart for his curiosity. I'm glad to see there are still some geeks around who care more about learning/teaching than flaming someone just to inflict pain.

I can see by this one were going to get into Darwins Litte Black Box
this thread will probobly get a little long and will tak some thinking from the forums.This is a little deep for me so i will refresh and let the big guys start first.Again welcome.



------------------
Treading,Troden,Trails
HERE (http://www.davematthewsband.com)

Whyzman
12-01-2001, 09:27 AM
Hello Manny,

In answer to your question regarding numbers and the CPU, I would say you are correct. The CPU is at is foundation not much more than an extremely dense (that could be taken differently http://www.PCGuide.com/ubb/biggrin.gif) concentration of electrical switches either open or closed represented by the 1's or 0's we've become so familiar with.

The strings of 1's or 0's and their meaning in the "real" world would be linked to the particular interpretation of the program being used. Kinda like the assigments of 1's and 0's that make up the functions on the keyboard.

I have heard it said that the CPU is the brain of the computer. I would say this is a misnomer. Even the "if then, and, not, take place outside of the CPU itself in whatever program. It, the CPU, does not "think."

That's my take on it. I remember years back in a class trying to perform a simple addition problem with this "computer" that had the old telephone operator cables. It was just an electronic maze of open or closed circuits. The real "brains" behind it was the one trying to figure out where to plug the wires into next! http://www.PCGuide.com/ubb/rolleyes.gif I just stood there and watched! http://www.PCGuide.com/ubb/biggrin.gif



------------------
May all your dealings in life be win/win!

Whyzman

Manny Calavera
12-01-2001, 01:23 PM
Thanks yoda and whyz for your input.

So Whyzman the CPU does not already know every instruction that a program can throw at it? I thought the CPU had all knowledge of what operations it can perform and that a program just calls upon the ones it needs?

I am reading howstuffworks.com(great site) again and maybe it's starting to clear some stuff up for me(and hopefully you to). My interpretation is that all the data/instructions comes into the external data bus(how it can decipher data from instructions is beyond me)and the instructions are passed to the instruction decoder. The instruction decoder breaks things down into smaller pieces because the x86 architecture is still CISC with a smidge of RISC mixed in. Then the different registers are used to perform the desired operations on these smaller pieces. So essentially the CPU instructions are nothing more than bit patterns used to operate the registers? So the registers are the real "brains" behind the operation? Ouch...brain...hurting heh http://www.PCGuide.com/ubb/smile.gif

Anyway here is the link http://www.howstuffworks.com/microprocessor.htm/printable

YODA74
12-01-2001, 02:19 PM
this here will give you a little more info on cpu and how it performs.
http://www.pcguide.com/ubb/Forum1/HTML/000259.html

------------------
Treading,Troden,Trails
HERE (http://www.davematthewsband.com)

Jumby
12-01-2001, 05:59 PM
And now we have to contend with the new "living organism" chips. My God, what next?

Manny Calavera
12-01-2001, 11:20 PM
yeah exactly Jumby I want to master computers as much as I can so that the day they rise up to defeat the humans I will be able to put up a fight http://www.PCGuide.com/ubb/wink.gif.

Thanks again Yoda. That link didn't answer too much for me but it was an interesting read http://www.PCGuide.com/ubb/smile.gif. I'm taking a digital logic/design course next semester or the semester after that. The end project is being able to design a chip that will recognize correct change in a pop machine, so I'm hoping that'll take some instructing and will make it more clear. Always been the hands on type.

not_fred
12-02-2001, 12:05 AM
Hey Manny - tried to post yesterday, but the server kept saying 'no'.

Actually, there are no numbers in the computer at all. Everything is pure on or off. The idea of numbers being in the computer is our interpretation. It all has to do with being on or off.

Example: When you press a key on a keyboard, you are closing a switch. Usually, there are 11 pulses. The first drops the voltage in the wire to signal the CPU that a character's code is coming. The next 7, each lasting about 9 microseconds (ms), are the code itself; 'A' is a high voltage lasting about 9 ms, followed by 45 ms (for a sub-total of 5 pulses of 9 ms each) at low voltage, then a high voltage pulse. The CPU translates that (again with a series of pre-set switches) into a sequence of voltage instructions to the monitor's electron beams and their steering devices, which display a particular pattern on the screen. The other three of the 11 pulses (I only described 8 above), are basically used to let the CPU know that the series has ended. As a whole, a computer is nothing but a large number of such pre-defined sequences, each executed on when the right trigger is pulled.

[This message has been edited by not_fred (edited 12-02-2001).]

Paleo Pete
12-02-2001, 12:40 AM
The numbers are on the hard drive. Data on a hard drive is stored as ones and zeros. 1 being "ON" and zero being "OFF". How does the CPU tell the difference?

MAGIC!! http://www.PCGuide.com/ubb/biggrin.gif

------------------
Support the right to keep and arm bears.
Note: Please post your questions on the forums, not in my email.

Computer Information Links (http://www.dreamwater.com/paleopete/computer.htm) has been moved, please update your bookmarks.

ranchdog
12-02-2001, 06:28 AM
Pull the trigger on the MAGIC.

pete.... Are you sure there aren't Little People running around inside that box posting sticky notes ?

I keep hearing little voices saying : help me... help me

http://www.PCGuide.com/ubb/biggrin.gif

------------------
......Indecision may or may not be my problem......
...... Kickin' A Rock....

iisbob
12-02-2001, 07:00 PM
The really depressing thing is that when you boil it all down; the CPU in today's fastest system is still nothing more than a calculator!! http://www.PCGuide.com/ubb/tongue.gif

Just a really,really fast one! Remember that the first CPu was bult just for a calc! The 4004 if i recall correctly, and the goal was to give accountents a faster adding machine!

Today's CPU's contain internal instruction sets that let them "pre-empt " certain basic functions that you normally perform, the newest Athlon'sand Pentiums are starting to include advanced "pre-cognitive " instruction sets that say " well, he's done this 4 out of 5 times before, so the 6th time he'll probably do it again! " Increasing the response time just a little bit more.

I say give it 20 years or so and HAL will be a practical reality. kinda scary.



------------------
iisbob
""I was gratified to be able to answer promptly, and I did. I said I didn't know."
Mark Twain

YODA74
12-02-2001, 07:30 PM
Almost sounds like a slot machine calculating odds. http://www.PCGuide.com/ubb/cool.gif

------------------
Treading,Troden,Trails
HERE (http://www.davematthewsband.com)

not_fred
12-02-2001, 09:37 PM
ranchdog -

That seems really unfair. I spent the whole dadgum Sunday sitting with my ear pressed to the box trying to hear those little people you mentioned. Tell me you were just kiddin'. I can't believe your little people would be that much better than mine. Not fair at all.

Manny Calavera
12-02-2001, 10:23 PM
Thanks all for the responses. I especially liked freds version. I see that you are an engineer in your profile. Mind if I ask what field of engineering you are in? I'm a college freshman and am hoping to also become an engineer(either Computer Systems Engineer or Electrical Engineer). All the math that you have to take has me kind of spooked though http://www.PCGuide.com/ubb/frown.gif. I'm not the greatest at math by nature but I can pick it up pretty quick if I spend enough time with it. Any advice http://www.PCGuide.com/ubb/smile.gif?

Sorry if I'm too off topic http://www.PCGuide.com/ubb/frown.gif

------------------
Ha Ha-Nelson Muntz

[This message has been edited by Manny Calavera (edited 12-02-2001).]