Convert units! GHz - ns - MHz - cycles

I'm getting ready for the unit quiz, and there are two types of conversions that hit me.

Type one: What is the length (in ns) of one cycle on an XXX computer? - In this case, XXX may be at MHz or GHz randomly. I have problems converting tile times. Example:

What is the length (in ns) of one cycle on a computer with a frequency of 50 megahertz (MHz)?

The second type of conversion I have problems with: If the average instruction on the XXX computer requires ZZ cycles, how long (in ns) does the average instruction execute to execute? - As in the previous case, XXX will be either on MHz or on Ghz. For instance:

If the average command on a computer with a frequency of 2.0 GigaHertz (GHz) requires 2.0 clock cycles, how long (in ns) does the average instruction execute?

I do not understand what I am doing wrong in these transformations, but I continue to make mistakes. Any help would be great!

+4
source share
2 answers

I hope my math is correct, I will try.

One Hertz is defined as one cycle per second, so a computer with a frequency of 1 Hz has a cycle length of 10 ^ 9 ns (since nano is 10 ^ -9).

50 Mega = 50 * 10 ^ 6, so 50MHz gives the length (10 ^ 9 ns / (50 * 10 ^ 6)) = 20 ns.

2 Giga = 2 * 10 ^ 9, so 2GHz gives the length (10 ^ 9 ns / (2 * 10 ^ 9)) = 0.5 ns. Two cycles here take 1 ns.

+7
source

Unit for Hz frequency that matches 1/s or s^-1 . To convert from frequency to length (really time), you need to calculate the inverse value: length = 1/frequency .

What is the length (in ns) of one cycle on a computer with a frequency of 50 megahertz (MHz)?

1/(50*10^6 Hz) = 2*10^-8 s = 20*10^-9 s = 20 ns

If the average command on a computer with a frequency of 2.0 GigaHertz (GHz) requires 2.0 clock cycles, how long (in ns) does the average instruction execute?

One cycle: 1/(2*10^9 Hz) = 0.5*10^-9 s = 0.5 ns

Two cycles: 1 ns

+7
source

All Articles