how do computers work?

Started by
22 comments, last by save yourself 19 years, 6 months ago
to the post above me: thank you fow the work you put in to that post, I do know how to add in binary and do stuff like that. you pionted it out at a very low level, but why does the computer add that? why isnt it just a circut with electricity in it?
Advertisement
I think you're asking about this from an electrical engineering perspective, so I will try to help.

Each of the millions of little switches in your computer is a tiny transistor. There are three "wires" that hook into a transistor, called the base, the collector, and the emitter. When the wire to the base is powered, it "opens" the gate and allows electrons to flow on the other two wires, making a "1". When the base isn't powered, it makes a "0".

Collections of transistors are used to make logic gates, which are the basic building blocks of all computers and programmable logic devices. For instance, if you want to check an "and", then you feed source 1 into the base of transistor one, connect transistor one's emitter to transistor 2's collector (which is called a "series" connection), and connect source 2 to the base of transistor 2. If the feed from source 1 and source 2 are both on, current will be able to travel through both transistors, and the result will be 1. If either or both sources are off, then the result will be 0. For an OR gate, you would connect the transistors in parallel by connecting the two transistors' emitters and collectors together, and attaching a source to each gate. If one or both of the sources is on, then the electricity can flow through, if neither is on, it can't, and you get a 0 result. The third type is a NOT gate, which also involves a resistor.

From AND, OR, and NOT, you can do every logic function there is.

-fel

~ The opinions stated by this individual are the opinions of this individual and not the opinions of her company, any organization she might be part of, her parrot, or anyone else. ~
Quote:Original post by dan1088352
to the post above me: thank you fow the work you put in to that post, I do know how to add in binary and do stuff like that. you pionted it out at a very low level, but why does the computer add that? why isnt it just a circut with electricity in it?


It is many circuits with electricity flowing through them.

Technically it is not adding, the flows of currents (for the input) is causing gates to change the other flows of courent (for the output), in a way which would be considered adding, base 2.

From,
Nice coder
Click here to patch the mozilla IDN exploit, or click Here then type in Network.enableidn and set its value to false. Restart the browser for the patches to work.
I have two pieces of advice: 1.) understand the 1-bit binary half-adder; 2.) read a book.

You're not going to grasp it from this forum. As has been pointed out, you're asking a Computer Engineering problem (which is a mixture of electrical engineering, itself an offshoot of chemistry, and mathematics).
It looks like this is the book you need:
Code: The Hidden Language of Computer Hardware and Software
Charles Petzold's latest book, Code: The Hidden Language of Computer Hardware and Software, crosses over into general-interest nonfiction from his usual programming genre. It's a carefully written, carefully researched gem that will appeal to anyone who wants to understand computer technology at its essence. Readers learn about number systems (decimal, octal, binary, and all that) through Petzold's patient (and frequently entertaining) prose and then discover the logical systems that are used to process them. There's loads of historical information too. From Louis Braille's development of his eponymous raised-dot code to Intel Corporation's release of its early microprocessors, Petzold presents stories of people trying to communicate with (and by means of) mechanical and electrical devices. It's a fascinating progression of technologies, and Petzold presents a clear statement of how they fit together.

The real value of Code is in its explanation of technologies that have been obscured for years behind fancy user interfaces and programming environments, which, in the name of rapid application development, insulate the programmer from the machine. In a section on machine language, Petzold dissects the instruction sets of the genre-defining Intel 8080 and Motorola 6800 processors. He walks the reader through the process of performing various operations with each chip, explaining which opcodes poke which values into which registers along the way. Petzold knows that the hidden language of computers exhibits real beauty. In Code, he helps readers appreciate it. --David Wall


read some of the reviews and I think you'll agree.
[size="2"]Don't talk about writing games, don't write design docs, don't spend your time on web boards. Sit in your house write 20 games when you complete them you will either want to do it the rest of your life or not * Andre Lamothe
You are all wrong!!!

Computers work because an evil wizard once wanted to punish all kids in a nearby town for thorwing eggs at his evil tower during the nights. So he created this evil contrapment to lure the kids into something self destructive instead. And ever since the kids became computer nerds and left him alone.

So in short...

HOW: Evil black magic
WHY: To enslave all kids for eternity


EDIT:
-----
PS. In case you wonder, i was very tired when i wrote this. I have now managed to rest for a while and realized that it was a tad silly. So just disregard this post. I wont remove what i wrote since i dont aprove of changing posts when posted.

[Edited by - Allmight on October 23, 2004 8:17:22 AM]
-------------------------------------------------Founder and DirectorAllSoft Studios
I read a book once called How Computers Really Work - that was very good for this.
[sub]Now I'm radioactive! That can't be good![/sub]
Felisandria's response was probably what you were looking for. Here is a page I found searching google that explains basically how transistors function and has a few links to specific logic gate diagrams. You can look at those for each case of base voltage, and see how they do in fact produce the inverting, NAND, and NOR functions. Most designs try to stay away from using resistors in gates though, because they are very large compared to the other components.

And just so you can appreciate the scale, I believe the P4 extreme edition has ~178 million transistors.

If you want an even more detailed explination on the physics of transistors (how EXACTLY does a channel form when a voltage is applied to the gate), you can just google 'transistor physics' and get pretty much whatever you need.
I just remembered someone who I can talk to, he is a systems programmer, he built a computer in college from scratch. if he doesnt know it no one does, I am serious when I say that. but I will check out the links\books I got here, thanx
Quote:Original post by save yourself
If you want an even more detailed explination on the physics of transistors (how EXACTLY does a channel form when a voltage is applied to the gate), you can just google 'transistor physics' and get pretty much whatever you need.
Actually, you want to look up diodes, specifically NPN and PNP junction diodes, and semiconductors. This will eventually lead you down the wonderful path of a discussion of electron site vacancies and doping, at which point you'll talk about electrovalence and all that lovely atomic chemistry stuff.

It all depends on how much detail you want to get into. It's interesting, but it's challenging to teach and learn because so much knowledge is incestuous in terms of reference. Concepts are not so much prerequisites of each other as they are co-requisites, which is why university curriculums struggle to effectively teach these things to students.

This topic is closed to new replies.

Advertisement