Understanding CPU clock signal processing

cpu

Although I have a pretty good background in math/cs, I don't have much experience with circuits and their functionality. I've browsed the internet and looked at some books on integrated circuits, but I still have yet to find an answer to a simple a question: how do CPUs process memory/signals.

A lot of answers tend to reduce to analogy: typically, the answer is of the form "it's like a low of switches." Yeah, yeah, I get that. I understand how a transistor works.

What I'm trying to understand is how these signals are actually relayed in, say, electron form. If I just randomly (and wrongfully) assume it's a pulse of electrons carried along s conducting wire to the transistors, how does this get processed? More directly, how is a binary signal actually read by the cpu?

No need to get complicated with modern cpus: a simple example/computer would be excellent. For direction, let's say we have a bunch of transistors that are storing some level of electrons to represent a simple byte. How is this then passed to a crude cpu? Any links, would be helpful. Sorry if I seem a bit direct: brevity and polish don't always go hand in hand.

Best Answer

Your basic synchronous digital design is a sort of discrete time feedback loop.

One or more registers made of flip-flop like storage elements hold values. These flow onto buses, possibly through path selectors called multiplexers and various combinatorial logic circuits which perform a logical or arithmetic operation on the value represented by some number of signals (typically each signal being a binary digit, or bit). Over a short period of time, the result flowing through the paths and logic to circle back to the inputs of the registers stabilizes. After an interval calculated to safely allow the worst case time needed for this, another active clock edge occurs, which causes one or more of the registers to replace the current values they have been holding with the updated values being fed back to their inputs.

In the case of something like a (synchronous) a counter, the logic circuit sitting between the outputs of the registers and the inputs would add one, so each active clock edge would see the stored value increase by one.

More complicated operations such as performed by a CPU might select two source numbers from a register array from which two locations can be simultaneously accessed through two separate read ports, add them together, and write them back to somewhere in that same register array through a third writing port.