Calculating Total Number of Program Instructions?

So if a program take 5.7 seconds to execute on a processor with the clock frequency of 1.8 GHz where each instruction take 7 clock cycles, what's the total amount of instructions of the program?

I though I could calculate it like this:

Total number of clock cycles = 5.7 seconds * 1.8 GHz = 10,260,000,000 cycles. Then divide total number of cycles with number of cycles per instructions: 10,260,000,000 / 7 we get 1,466,428,571

But apparently this is wrong? It's part of a quiz and I got this question wrong, wonder why that is?

1
Elena Rostova

Elena Rostova

Lead Health, Wellness & Medical Journalist

Elena Rostova holds a Master's degree in Public Health Journalism. She covers groundbreaking medical research, holistic wellness trends, mental health awareness, and nutritional science.

Share this article