Unit Conversions! Ghz - ns - MHz - cycles
I am preparing for a units quiz and there are two kinds of conversions that have me stumped.
Type one: What is length (in ns) of one cycle on a XXX computer? - In this case, XXX can be some MHz or Ghz, randomly. I am having trouble converting the cyles times. Example:
What is length (in ns) of one cycle on a 50 MegaHertz (MHz) computer?
The second type of conversion I have trouble with: If the average instruction on开发者_Python百科 a XXX computer requires ZZ cycles, how long (in ns) does the average instruction take to execute? - Like the previous case, the XXX will either be some MHz or Ghz. For example:
If the average instruction on a 2.0 GigaHertz (GHz) computer requires 2.0 cycles, how long (in ns) does the average instruction take to execute?
I don't understand what I am doing wrong in these conversions but I keep getting them wrong. Any help would be great!
I hope to have my math correct, I'll give it a try.
One Hertz is defined as one cycle per second, so a 1 Hz computer has a 10^9 ns cycle length (because nano is 10^-9).
50 Mega = 50 * 10^6, so 50MHz yields a (10^9 ns / (50 * 10^6)) = 20 ns cycle length.
2 Giga = 2 * 10^9, so 2GHz yields a (10^9 ns / (2 * 10^9)) = 0.5 ns cycle length. Two cycles here take 1 ns.
The unit for frequency is Hz
which is the same as 1/s
or s^-1
. To convert from frequency to length (really time) you have to compute the reciprocal value: length = 1/frequency
.
What is length (in ns) of one cycle on a 50 MegaHertz (MHz) computer?
1/(50*10^6 Hz) = 2*10^-8 s = 20*10^-9 s = 20 ns
If the average instruction on a 2.0 GigaHertz (GHz) computer requires 2.0 cycles, how long (in ns) does the average instruction take to execute?
One cycle: 1/(2*10^9 Hz) = 0.5*10^-9 s = 0.5 ns
Two cycles: 1 ns
精彩评论