Why spell a clock rate out in full hertz

Data sheets, firmware headers and configuration files frequently want a frequency as an integer number of hertz. A microcontroller library may accept 16000000 for a 16 MHz crystal, and a radio driver may expect 2400000000 for a 2.4 GHz carrier. Marketing material, by contrast, prints GHz because it is short. This page does the translation so that a value read from a spec sheet can be typed into code without counting zeros. It also helps when you document a design and want the unabbreviated number next to the friendly one, so a reader can check that the two agree.

Nine places of difference

One gigahertz is 1,000,000,000 Hz. The page computes Hz = GHz × 1,000,000,000, a shift of nine decimal places. The SI Brochure defines the hertz as the unit of frequency equal to one cycle per second and lists giga as 10 to the power 9. The default 10 GHz returns 10,000,000,000 Hz. The example 1.2 GHz returns 1,200,000,000 Hz, and 0.5 GHz returns 500,000,000 Hz. Because the factor is a power of ten, results are exact for inputs with up to twelve significant digits, and the calculation involves no rounding on the page.

Frequencies you can look up

Several values come up repeatedly. A Wi-Fi network on the 2.4 GHz band uses 2,400,000,000 Hz as a nominal figure, and the 5 GHz band corresponds to 5,000,000,000 Hz. The GPS L1 signal sits at 1,575.42 MHz, which is 1.57542 GHz, or 1,575,420,000 Hz. A domestic microwave oven typically operates near 2.45 GHz, which equals 2,450,000,000 Hz. A processor at 3.5 GHz completes 3,500,000,000 cycles each second. Each conversion is a decimal shift, and it is worth checking the unit on a source figure before you rely on it, since a MHz value mistaken for GHz is off by a factor of 1,000.

Reading the answer back

Choose hertz as the source and gigahertz as the target to reverse the shift. A frequency of 2,450,000,000 Hz returns 2.45 GHz, and 1,575,420,000 Hz returns 1.57542 GHz. This is the direction needed when a log file or an instrument prints hertz and you want a number you can say aloud. Instruments commonly show nine or ten digits, so grouping them in threes before you convert prevents slips: 2,450,000,000 has three groups after the first, which marks the billions. Read the first group as the GHz integer part, and the next groups as fractions.

Period and cycle time follow from hertz

Once you have the frequency in hertz, the period is its reciprocal. At 1,000,000,000 Hz the period is one nanosecond. At 3,500,000,000 Hz it is about 0.2857 nanoseconds, and at 10,000,000,000 Hz it is 0.1 nanosecond. Light travels about 30 centimeters in one nanosecond, which is why board designers at these frequencies worry about trace lengths measured in millimeters. This page does not compute periods itself, but the integer hertz value is the input you need for that division. Keep the full integer when you use it, since rounding to a few digits changes the period noticeably. A signal at 2,450,000,000 Hz has a period of about 0.408 nanoseconds, which corresponds to a wavelength in free space near 12.2 centimeters, found by dividing the speed of light by the frequency. That wavelength is why microwave oven cavities and Wi-Fi antennas have dimensions of a few centimeters.

Hertz versus cycles of other kinds

Hertz counts cycles per second of something periodic. It is not interchangeable with bits per second or transfers per second. Gigabit Ethernet over copper signals at 125 million symbols per second on each of four wire pairs, and each symbol carries more than one bit, so the line frequency and the data rate are different numbers. A communication channel of 2.4 GHz does not carry 2.4 billion bits per second. It carries a signal whose carrier oscillates 2.4 billion times each second, and the data rate depends on the modulation. This page converts the oscillation count only. Do not use it to estimate throughput.

Rounding and tolerance

Real oscillators are specified with tolerances. A crystal marked 16 MHz at plus or minus 20 parts per million can be off by 320 Hz. A processor clock changes with load and power state, so 3.5 GHz means a nominal or boost figure rather than a fixed one. Converting a nominal value to hertz gives a nominal hertz value. If you need a measured frequency, use a counter reading and convert that. The page keeps the digits you give it, and the question of how many are meaningful belongs to your measurement and your instrument calibration. For firmware settings, use the exact nominal integer, and for reports, round to the digits your instrument justifies.

Using integers in code

In software, store frequencies as integer hertz when you can. A 32-bit unsigned integer holds up to 4,294,967,295, which is about 4.29 GHz, so a 5 GHz value overflows it and needs a 64-bit type. That limit explains why some older libraries break when given a modern clock rate. This page shows the exact integer you would pass, so you can check whether your type is wide enough. Use 64-bit integers or floating point when values may exceed the 32-bit range, and keep the unit in the variable name, for example clock_hz. Signed 32-bit integers top out at 2,147,483,647, about 2.15 GHz, so even a 2.4 GHz value overflows them. Tests that feed 2,400,000,000 and 5,000,000,000 through your code will reveal the limit before a user does. Parsing is another weak point: a function that reads text into a 32-bit integer may silently wrap or return an error for these strings.

Configuring a radio or sensor from a data sheet

A data sheet for a short-range radio module may list its carrier as 2.4 GHz and ask for the center frequency in hertz, or as a register that counts in some fixed step. The first step is the same in both cases: write the carrier in hertz without abbreviations. One Bluetooth Low Energy advertising channel sits at 2,402 MHz, which is 2.402 GHz and 2,402,000,000 Hz. Another sits at 2,426 MHz, or 2,426,000,000 Hz, and a third at 2,480 MHz, or 2,480,000,000 Hz. Entering each in gigahertz and reading the hertz value gives the integers to pass to a driver. The register step size and layout are described in the vendor manual, and this page does not model them.