Originally Posted by tlan
the Brains of the computer. All instructions pass thru the CPU for processing. Each process takes ~ one clock cycle. the CPU is rated in Gigahertz, a single hertz is one clock cycle. so a CPU can process billions of cycles per second.
as in the Intel I5 3.4 Ghz thats 3.5 billion cycles per second. or 3.5 billion intructions per second. note: some instructions take more that once cyle to complete. like a simple click of the mouse.
some instructions take more cycles then others
some, like bitwise instructions, can take less (1/3 of a cycle on modern cpus)
then there is the cpus instruction decoder that rearranges them and can send out multiple instructions for processing simultaneously
with that in mind, GHz is not to be taken as a precise speed measurement
clicking a mouse or a keyboard button is kind of a different thing
when you click, things on the motherboard send an interrupt to the cpu saying something like "data on this port, deal with it"
that's where it gets a bit more complicated, especially when usb is involved
check the instruction tables here for latency and throughput
and the microarchitecture pdf for... more info
as for the original question
the cpu is what is called an automaton
more precisely it aims to be a "Turing machine"
(wiki has pages on bout)
a cpu processes data in accordance with its(cpus) state and the data itself
C is fairly close to the instructions a cpu executes, so if you know C you know about half of how a cpu works