Units of Measure in Computing

Learn about how computer features are measured and compared!

Computers are digital. This means that they operate on numbers, be it photos, music, or text documents; everything within a computer is represented as a number, and all operations are some form of arithmetic.

In this article we’ll go over the most important measures of these numbers.

Data representation and storage

It all starts with a bit (the binary digit), which makes up the smallest unit of data for computers. Being a binary value, this unit can only have one of two values: 0 or 1, usually to represent if an electronic signal is on or off.

All data on the computer is represented in this binary notation. For example, the number 228 can be represented as 11100100 in binary, and a lowercase j can be represented as 01101010 in the ASCII encoding standard. These groupings of 8 bits are so common that it has a special name, a byte.

Bytes serve as the more common unit that a person may come across, usually with unit prefixes to represent more workable amounts of data:

Value Name (Abbreviation) Example
1000 Bytes Kilobyte (kB) A typical email (~2kB)
10002 Bytes Megabyte (MB) A novel (~1.5MB) or 1 song (~5MB)
10003 Bytes Gigabyte (GB) A 1080p movie (5GB)
10004 Bytes Terabyte (TB) Entire major libraries
10005 Bytes Petabyte (PB) All the data held by a major tech company

Measuring storage performance

These file sizes lead into the importance of storage performance. If hard drives only had a speed of 1 megabyte per second (MBps), then the example song above would take 5 seconds to load before playing! No user would consider that acceptable!

Luckily, modern drives are much faster than that. The storage of most devices today are solid state drives. For portable devices such as phones, they are usually able to read files at about 1500 MBps and write new files at 500 MBps. Desktop devices are able to reach read and write speeds of over 5000 MBps!

Special types of storage

While these speeds can be very fast, there is a special type of short-term storage, Random Access Memory (RAM), that is used for intermediate storage of values and is even faster! The speed of these types of storage is typically around 20,000 MBps! Much faster than any type of long term storage!

However these numbers only cover sequential throughput. Throughput is the total amount of data that can be transferred during a given amount of time. Another important measure is latency, the amount of delay before that transfer of data begins. This is helpful when many small files need to be transferred and the data seeking and accessing processes needs to be repeated many times.

Here is where RAM truly shines; newer devices usually have latency of around 10 nanoseconds, while even the fastest of solid-state drives (SSDs) have latency times of a few microseconds, or almost 1000 times slower!

Measuring Internet performance

These types of data speeds don’t apply to just storage devices. It is true for any appliance that transfers data.

Internet bandwidth and latency are measured the same way. However, instead of representing the speed of a specific device, measures of Internet devices consist of the entire “pipe” that attempts to bring the data to a device.

Everything from the speed of the server providing the data, the miles of cables connecting it to an Internet service provider (ISP), and all of the similar connections until it reaches the desired device make up this measure. Most importantly, these speeds are decided by the slowest device along the entire chain. Even if a consumer owns the fastest routers and computers, if the server is an ancient turtle connected with shoestring to the Internet, the entire connection will be slow.

Measuring computational performance

All this data brought to the computer needs to be processed by the central processing unit (CPU). Each CPU has a clock speed for determining how quickly it can do computations. This is commonly about 3.5GHz or 3.5 billion operations per second, and will likely stay around that number for the foreseeable future to physical limitation in the durability of silicon.

Therefore, a more important measure going forward is the number of cores a CPU contains. Each core within a CPU can do one computation at a time. Therefore a CPU with four cores can simultaneously do four times as many computations as a CPU with one core. So need to make a computationally heavy task four times faster? Just get a processor with four times as many cores! For well-threaded programs it’s really that simple.

Graphical processing units (GPUs) are similarly measured to CPUs, as they are both devices focused on computations. However, with the GPU’s different goal of computing graphics comes different implementations. They tend to have many more computational cores (up to 80!), but with much slower clock speeds (around 2GHz).

Measuring electricity usage

One thing all these devices have in common is their hunger for power. This energy is measured in watts and differs based on how powerful the device is; more powerful devices tend to use more energy.

This is an important measure because over time the cost of electricity can eclipse the cost of the actual device. So much so that it is common for servers to be completely replaced by newer models not because of speed improvements, but because of improvements in power consumption.

Power consumption has other effects as well. All of the energy taken in by a device is dissipated as heat, so more powerful devices will typically need complex cooling solutions to best maintain performance.

Wrapping up

Great work on making it to the end of this article! Here is what we learned:

  • Throughput is the total amount of data that can be transferred in a given amount of time.
  • Latency is the amount of delay before that transfer of data begins.
  • The smallest unit of data is the bit, and the performance of any data transfer, be it long-term storage devices, short-term RAM, or Internet devices is measured in the throughput and latency of this data.
  • Both CPUs and GPUs have similar measures for computation performance. Each is made up of cores that can do one operation at a time, and these cores have set clock speeds that determine how often they can perform these operations.
  • The energy devices use is measured in watts. The greater the wattage, the greater the amount of heat the device creates. Electricity costs can be a substantial part of the cost over the lifetime of the device.

Author

Codecademy Team

'The Codecademy Team, composed of experienced educators and tech experts, is dedicated to making tech skills accessible to all. We empower learners worldwide with expert-reviewed content that develops and enhances the technical skills needed to advance and succeed in their careers.'

Meet the full team