-15

I'm very confused regarding the working of a cpu clock.The following questions arise in my mind-

What is the need of a clock in a cpu ?
What does synchronization mean in context of working of a cpu ?
How many instructions can be executed in one cycle ?
Can more than one instruction be executed in one cpu cycle ?

Please explain these concepts using an example, such as addition or multiplication of numbers(or any other complex one) clearly mentioning the various instructions and cycles in which they are performed.

4
  • 4
    Way way to large a question. I suggest read a book on this subject (or multiple books).
    – Hennes
    Jan 4 '16 at 10:07
  • Ok but atleast answer my these small questions :) . Jan 4 '16 at 10:09
  • 4
    Vote to close as "Too broad" Jan 4 '16 at 10:55
  • 1
    Don't cross-post!! You asked essentially the same question on electronics.stackexchange.com an hour after this one. electronics.stackexchange.com/questions/209378/…
    – tcrosley
    Jan 4 '16 at 13:02
-1

1) Basically a CPU's clock keeps everything in the CPU synchronized.

CPUs are digital and like anything else digital, they work on the principle of "on" and "off" - however, transistors take time to fully switch on or off, and if you check for the state of one while it is transitioning, you will get unpredictable results. With a clock signal, we have something that says "by this deadline, this signal should be valid." The other option is to have a second signal that says "I'm done, this signal is now valid" and I think that makes circuits much more complex.

2) Go here for the second answer Informative, Illustrative and easy to understand.

3) Go here for the third

4) The Fourth Very complicated, I say.

AND PLEASE Don't ask so long questions, that is why I gave you links.

11
  • Thanks alot for these informative links. Now only one question I'd like to ask is "does every instruction takes the same amount of time/cycle or it also depends on the type of processor ? " Jan 4 '16 at 12:14
  • @Shivamaggarwal I will give you the answer but can you please accept my answer please... If you liked it. You can edit it by opening your post and clicking the empty 'tick' icon on the left side of my answer. Jan 4 '16 at 12:33
  • @Shivamaggarwal I will research and give you the answer Jan 4 '16 at 12:34
  • I will surely once you give me the answer, or if u assure that you will surely give me the answer Jan 4 '16 at 12:37
  • @Shivamaggarwal I can give you a link about this topic will that be okay? Jan 4 '16 at 12:38
1

What is the need of a clock in a cpu ? => CPU is a sequencial machine, one tick, one cyle, one operation/ task/ job

What does synchronization mean in context of working of a cpu ? => too many things depending on the context, rougly it ensures that information has properly propageted before the next task started

How many instructions can be executed in one cycle ? => it depends on the architecture of the CPU

Can more than one instruction be executed in one cpu cycle ? => yes but, it depends on CPU architecture

as said above, there is plenty good books about that,

1
  • Thanks for the reply :). Also "does every instruction takes the same amount of time/cycle or it also depends on the type of processor ? " Jan 4 '16 at 12:15

Not the answer you're looking for? Browse other questions tagged or ask your own question.