Two questions

Gord

Junior Member
Aug 7, 2004
21
0
0
Okay, first question. How is it possible to run an electric current through a piece of metal (edit for clarity: I realize that a CPU is, in fact, a whole bunch of pieces of metal) and have it perform computations? Something to do with the current's variations, or the time it takes to travel to various parts of the CPU, or the energy loss during said travel, or what?

Second question, how did we ever get said piece of metal (i.e., CPU) to understand human arguments like 'if,' 'else' and 'when'?

I realize there's probably a glaringly obvious answer to both of these that I'm just too dumb to figure out, so go easy on me.
 

TuxDave

Lifer
Oct 8, 2002
10,571
3
71
Originally posted by: Gord
Okay, first question. How is it possible to run an electric current through a piece of metal (edit for clarity: I realize that a CPU is, in fact, a whole bunch of pieces of metal) and have it perform computations? Something to do with the current's variations, or the time it takes to travel to various parts of the CPU, or the energy loss during said travel, or what?

Second question, how did we ever get said piece of metal (i.e., CPU) to understand human arguments like 'if,' 'else' and 'when'?

I realize there's probably a glaringly obvious answer to both of these that I'm just too dumb to figure out, so go easy on me.

There are 'switches' that you can 'open and close'. So to implement a basic logic function, imagine this.

........B
A ----/ ------ Out

The switch closes with B is powered. So the 'out' terminal is powered when both A AND B are powered. Hence.. the 'and' function. The CPU just has a whole bunch of different structures and together they can interpret instructions.
 

Cogman

Lifer
Sep 19, 2000
10,283
134
106
an interesting thought, but the first computer did not use electricity, and the first computer programmer did not use code. Instead, he used rope . Help me on this guys, the name slips me, but he was on the history channel, Famous greek inventer. also invented automatic doors and the first steam engine (a ball that spins around when heated). I cant think of his name though.
 

Matthias99

Diamond Member
Oct 7, 2003
8,808
0
0
an interesting thought, but the first computer did not use electricity, and the first computer programmer did not use code. Instead, he used rope . Help me on this guys, the name slips me, but he was on the history channel, Famous greek inventer. also invented automatic doors and the first steam engine (a ball that spins around when heated). I cant think of his name though.

For the first device really resembling a computer, you'd be talking about Charles Babbage, an English inventor back in the 19th century. The device he built was the 'Analytical Engine', an early mechanical calcuator. He also designed plans for (but was never able to build, due to both a lack of funding and inadequate technology at the time) the 'Differential Engine', which would have been a fairly sophisticated device capable of doing advanced mathematics and computing logical operations. There's been a project in recent years at some British university (Cambridge, maybe?) to build one, or at least *part* of one (the whole thing would have been monstrously huge, due to the scales you have to work at with mechanical parts).

You might also want to look up Ada Lovelace, a contemporary of his, and one of the first programmers. The computer language "Ada" (widely used by the DOD) is named after her. Boole is another interesting person; he formalized Boolean Logic, the basis of modern computing theory. Much of their work went unused until the mid-20th century, when vacuum tubes (and later transistors) made electronic computers feasable.

You can go back further than this if you want to just talk *algorithms* -- things like the Sieve of Aristothenes, and other mathematical constructs described by the Greeks, are early examples of algorithm design. Not sure which "famous Greek inventor" you're talking about, though.
 

CTho9305

Elite Member
Jul 26, 2000
9,214
1
81
Originally posted by: Gord
Okay, first question. How is it possible to run an electric current through a piece of metal (edit for clarity: I realize that a CPU is, in fact, a whole bunch of pieces of metal) and have it perform computations?
Do you understand how to do arithmetic (adding and subtracting numbers) in binary? If not, read this and post (or private message me) if any of it doesn't make sense.

Once you understand that, and Boolean logic, you might find Binary addition using logic gates interesting.

Something to do with the current's variations, or the time it takes to travel to various parts of the CPU, or the energy loss during said travel, or what?
In modern CPUs, values are encoded as either high voltage (~1.5 volts), or low voltage (0 volts). A given wire can be high or low, and data storage elements can record a high or low value.

Second question, how did we ever get said piece of metal (i.e., CPU) to understand human arguments like 'if,' 'else' and 'when'?
A sample program might be:
print "Enter a number."
input num
if num < 10 then
print "Your number was less than ten"
else
print "Your number was more than nine".
What the CPU actually does for the "if" is take your number, and subtract 10 from it. If your number was less than ten, the result will be negative, and as you (hopefully) know from the binary arithmetic page above, a negative number has a 1 in the top bit position. The CPU has a blob of logic that picks the next instruction to execute, so we just send that top bit to that logic, and using a "multiplexor" controlled by the signal, it can pick either the first "print" statement or the second one as the next instruction. (This is a simplified explanation, but I think it's accurate).

Computers don't really "understand" anything - they just take in a stream of instructions and execute them in order until they hit an "if", and then something like what I just described controls which instruction is executed next.

I realize there's probably a glaringly obvious answer to both of these that I'm just too dumb to figure out, so go easy on me.
I couldn't understand it for a few years after initially deciding I wanted to learn about CPUs, and I was wondering from ~6th to 11th grade.... so it took me a while to figure out . At some point, something clicked, and it became incredibly obvious to me. I think the main realization is that computers don't think, and while they seem complicated, a basic CPU is actually VERY simple.




Originally posted by: TuxDave
There are 'switches' that you can 'open and close'. So to implement a basic logic function, imagine this.

........B
A ----/ ------ Out

The switch closes with B is powered. So the 'out' terminal is powered when both A AND B are powered. Hence.. the 'and' function. The CPU just has a whole bunch of different structures and together they can interpret instructions.

That's not a good way to describe an AND function, because you can't do it that way in a real circuit. In real circuits, every wire has to be connected to either power (high) or ground (low). In your circuit, your output will either be high (if A and B are high), or "floating" (connected to neither). A floating node can end up anywhere - high, low, or in between. The next gate in your circuit could see any possible input. That's a bad thing. A real AND gate might be implemented with a NOT gate and a NAND, as poorly described here.
 

TuxDave

Lifer
Oct 8, 2002
10,571
3
71
Originally posted by: CTho9305


Originally posted by: TuxDave
There are 'switches' that you can 'open and close'. So to implement a basic logic function, imagine this.

........B
A ----/ ------ Out

The switch closes with B is powered. So the 'out' terminal is powered when both A AND B are powered. Hence.. the 'and' function. The CPU just has a whole bunch of different structures and together they can interpret instructions.

That's not a good way to describe an AND function, because you can't do it that way in a real circuit. In real circuits, every wire has to be connected to either power (high) or ground (low). In your circuit, your output will either be high (if A and B are high), or "floating" (connected to neither). A floating node can end up anywhere - high, low, or in between. The next gate in your circuit could see any possible input. That's a bad thing. A real AND gate might be implemented with a NOT gate and a NAND, as poorly described here.

Oh geez, give me a break. The person doesn't know what circuits are and I'm not about to explain logic to him using proper pass transistor gate logic. I figure my simplified circuit would get the point across.

Plus, you are only partially correct. AND gates using NOT/NAND blocks are true if you're restricted to using inverting logic circuits such as static cmos, dynamic, whatever. If building a pass transistor AND block, you can do it in one stage at the expense of additional loading on the prior gates. For example:


.............B
A -----/----------|
........................|------ Out
Gnd -----/------|
............B'
 

grooble

Junior Member
Jul 26, 2004
9
0
0
sale-70-410-exam    | Exam-200-125-pdf    | we-sale-70-410-exam    | hot-sale-70-410-exam    | Latest-exam-700-603-Dumps    | Dumps-98-363-exams-date    | Certs-200-125-date    | Dumps-300-075-exams-date    | hot-sale-book-C8010-726-book    | Hot-Sale-200-310-Exam    | Exam-Description-200-310-dumps?    | hot-sale-book-200-125-book    | Latest-Updated-300-209-Exam    | Dumps-210-260-exams-date    | Download-200-125-Exam-PDF    | Exam-Description-300-101-dumps    | Certs-300-101-date    | Hot-Sale-300-075-Exam    | Latest-exam-200-125-Dumps    | Exam-Description-200-125-dumps    | Latest-Updated-300-075-Exam    | hot-sale-book-210-260-book    | Dumps-200-901-exams-date    | Certs-200-901-date    | Latest-exam-1Z0-062-Dumps    | Hot-Sale-1Z0-062-Exam    | Certs-CSSLP-date    | 100%-Pass-70-383-Exams    | Latest-JN0-360-real-exam-questions    | 100%-Pass-4A0-100-Real-Exam-Questions    | Dumps-300-135-exams-date    | Passed-200-105-Tech-Exams    | Latest-Updated-200-310-Exam    | Download-300-070-Exam-PDF    | Hot-Sale-JN0-360-Exam    | 100%-Pass-JN0-360-Exams    | 100%-Pass-JN0-360-Real-Exam-Questions    | Dumps-JN0-360-exams-date    | Exam-Description-1Z0-876-dumps    | Latest-exam-1Z0-876-Dumps    | Dumps-HPE0-Y53-exams-date    | 2017-Latest-HPE0-Y53-Exam    | 100%-Pass-HPE0-Y53-Real-Exam-Questions    | Pass-4A0-100-Exam    | Latest-4A0-100-Questions    | Dumps-98-365-exams-date    | 2017-Latest-98-365-Exam    | 100%-Pass-VCS-254-Exams    | 2017-Latest-VCS-273-Exam    | Dumps-200-355-exams-date    | 2017-Latest-300-320-Exam    | Pass-300-101-Exam    | 100%-Pass-300-115-Exams    |
http://www.portvapes.co.uk/    | http://www.portvapes.co.uk/    |