October 25, 2020

AJ Downing Park

Wicked clever technology experts

What Does Gigahertz (GHz) Actually Mean? | by Patrick Divine | The Startup | Sep, 2020

6 min read
How fast is a 2.5 GHz computer and what does that mean? Photo by Christian...

How fast is a 2.5 GHz computer and what does that mean?

Photo by Christian Wiediger on Unsplash

The term “gigahertz” is composed of two parts, “giga” and “hertz”. To understand “gigahertz” we’ll dive into what each of these parts mean separately, and then apply this understanding to what in relation to a computer, and more specifically a computer’s CPU.

Let’s start with the “hertz” part of “gigahertz.”

Frequency is a word we use to describe how often something happens. It is a measure of the “oftenness” of things.

For example,

  • How often (frequently) do you go to the store? Once a week.
  • How often do you brush your teeth? Twice a day.
  • How often do you grab a snack? Once an hour.
  • How often does the clock’s second hand tick? Sixty times a minute.

In the above, the responses were all frequencies. Frequencies are made up of two parts, a count of occurrences and a duration. For example:

One time per hour.

In the above “one” is the count of occurrences and “hour” is the duration. A duration is a period of time like a week, day, month, hour, or second.

So how does this relate to Hertz (Hz)? Well, Hertz is a shorthand to talk about frequency. It specifies the duration component of a frequency.

Hertz (Hz) is a shorthand when talking about frequency. When we use it we don’t have to wonder what the duration part of the frequency is. The duration is always seconds. Since the duration is fixed, we just need to specify the count of occurrences part of the frequency.

A Hertz means:

“times per second”

That’s it. That’s all it means. Here’s a few examples:

1 Hertz (Hz) is:

One time per second is

50 Hertz (Hz) is:

Fifty times per second

1,000 Hertz (Hz) is:

One thousand times per second

Using hertz is nice because you know the frequency is not “times per year,” “per hour,” “minute,” or anything else. With hertz we know we’re talking about “times per second.”

Now that we know what the “hertz” (Hz) part of “gigahertz” (GHz) is we can explore the “giga” (G) part.

In the previous section we had an example that was 1,000 Hz (1,000 times per second). 1,000 is a pretty big number and might be somewhat difficult to use if we had to reference it a lot, but if it was even larger like 1,000,000 Hz (A million times per second), or 1,000,000,000 Hz (A billion times per second)? Wouldn’t we want a better way to deal with these large numbers? With the International System of Units (SI) prefixes, we have a better way.

SI prefixes are an international standard of referring to very large and very small numbers. Some of them we’re familiar with:

  • The “centi” in “centimeter”
  • The “kilo” in “kilometer”

A comprehensive list of the SI prefixes can be viewed here:

Let’s look at some of the prefixes that represent large numbers:

kilo (k) — 1,000 times more than without the prefix

mega (M) — 1,000,000 (million) times more than without the prefix

giga (G) — 1,000,000,000 (billion) times more than without the prefix

tera (T) —1,000,000,000,000 (trillion) times more than without the prefix

Applying this to distances we get:

  • A “kilometer” is 1,000 meters
  • A “megameter” is 1,000,000 (a million) meters
  • A “gigameter” is 1,000,000,000 (a billion) meters
  • A “terameter” is 1,000,000,000,000 (a trillion) meters

Ah, there it is — “giga.” Now we’re on the right track to understand “gigahertz” (GHz).

Let’s combine the “kilo” SI prefix with “hertz”:

  • “kilo”(k) SI prefix — means 1,000
  • “hertz” (Hz) — means “times per second”
  • “kilohertz” (kHz) — means “A thousand times per second.”

If we add a number in front we get:

  • 1 kHz — A thousand times per second
  • 5 kHz — Five thousand times per second
  • 75 kHz — Seventy-five thousand times per second

Exploring these SI prefixes we get:

  • “kilohertz” (kHz) — 1,000 times per second
  • “megahertz” (MHz) — 1,000,000 (a million) times per second
  • “gigahertz” (GHz) — 1,000,000,000 (a billion) times per second
  • “terahertz” (THz) — 1,000,000,000,000 (a trillion) times per second

Ah, there it is — “gigahertz.” Now we’re on the right track to understand “gigahertz” (GHz) in relation to computer processors, CPUs.

We’re ready now. We know that a Gigahertz (GHz) means:

A billion times per second

Cool. So we know that something is happening a billion times per second — but what? For that we look to a computer’s central processing unit (CPU) — the “brain” of the computer. This is the component of a machine that executes the instructions written in computer programs.

Before we move forward, let’s define three types of instructions. The distinction will be important shortly.

  • Code—These are instructions written by a computer programmer in a programming language.
  • Processor Instructions (Opcodes) — These are the instructions that are generated from a programmer’s “code” that can be understood by a computer’s processor.
  • Processor Instruction Sub-Steps — These are the instructions that a processor follows for every processor instruction (opcode) it receives.

So, a programmer writes code, which is converted into processor instructions, which when received by the processor is carried out as a sequence of sub-steps.

For example, a programmer writes code to increment a number X by 1, which is translated into processor instructions (Opcode of INC X), which when received by the processor is recognized as a series of sub-steps. The sub-steps for this processor instruction might be something like:

  1. Retrieve the value from the address that X is located and place in a short-term memory location
  2. Load the value 1 into another short-term memory location
  3. Add the values in both short-term memory locations
  4. Load the result into the original memory location of X

So, in this example the programmer’s 1 code instruction was translated into 1 processor instruction which was in turn carried out as 4 processor instruction sub-steps. With this we now understand that there are different levels of instructions which, as more granularity is introduced, will expand.

So, now we can say the following:

A 1 gigahertz (Ghz) computer can process a billion processor instruction sub-steps per second.

To emphasize, it is neither the code instructions produced by the programmer, nor the processor instructions generated from the programmer’s code that we’re talking about. The instructions we’re referring to are the processor instruction sub-steps.

Each processor instruction sub-step is carried out during one of the CPU’s “clock cycles,” which is like a pulse of action. So, equivalently:

A 1 gigahertz (GHz) computer completes a billion clock cycles per second.

Here 1 GHz is said to be the CPU’s “clock rate” or “clock speed.” The clock “ticks” with a pulse of action 1 billion times per second.

Pretty neat right? So, that 2.5 GHz processor of yours can process 2.5 billion processor sub-steps each and every second. Wow, that’s pretty impressive. And that’s just with one core.

Right, so modern computers have processors with multiple cores. Each “core” is like a mini-processor. So, a 4 core 2.5Ghz processor has 4 mini-processors within it, each of which can process 2.5 billion processor instruction sub-steps per second at the same time as the others. If software is written accordingly, all four cores can be utilized, resulting in:

10 billion processor instruction sub-steps (4 x 2.5 billion = 10 billion) per second

Wow. Your CPU is pretty impressive.

When a CPU has higher clock frequency, as we’ve seen above it means that more processor instruction sub-steps can be handled per second. The higher the clock frequency, the greater the steps processed per second. When a lot of steps are processed quickly, a programs execution as a whole is faster. When running computationally intensive programs, like a video game, a swift CPU is much appreciated.

When someone asks “how fast is your computer?” they’re talking about the CPU’s clock rate. Now you know you can say, “oh, my computer can process 2.5 billion processor sub-steps per second, and 10 billion per second when using all cores.”

Just kidding — Say “2.5GHz”

A “hertz” (Hz) means “times per second” and “giga” (G) is a SI prefix that means “a billion.” When the term “hertz” is used with a computer’s CPU processor it is in reference the number of “clock cycles.” A 2.5Ghz processor completes a clock cycle 2.5 billion times per second. This equates to the execution of 2.5 billion processor instruction sub-steps in one second for a single core. With 4 cores in use that number would be 10 billion. Super impressive.

I hope this article was helpful!

Thanks!
Patrick

Ajdowningpark.com Copyright © All rights reserved. | Newsphere by AF themes.