In this lesson, we will learn about data sizes, with a focus on following key points:
- How data is represented in computers.
- Why is it important to know about data sizes?
- Data sizes in computer systems.
You have probably encountered terms professionally or in day to day life like "4GB RAM", "1TB hard drive" or "64GB memory". Likely you encountered these while reading about computer or phone specifications. These concepts represent information regarding data storage and memory on a computer system.
Storing information on computers requires the use of memory. It is not possible to store every and any possible data on computers, there are certainly restrictions. Machines do not have an infinite amount of memory.
To effectively store data on computers, it is important to know how the storage mechanism of computing systems takes place. To utilize computing resources effectively, data sizes are an important understanding. They are units of measurement for computers, which measure how much space your data takes up in the computer.
Memory
To understand storage systems and data sizes in computers, it is important to learn more about memory first.
Computers have two kinds of memories; volatile
and non-volatile
. Volatile memory
is a temporary memory that loses content after a computer restarts.
RAM
(Random Access Memory) is an example of this type of memory. All your unsaved data gets stored onRAM
, which is temporary, and thus, in case of any issues, you lose all this data.Non-volatile memory
is permanent.ROM
is an example of non-volatile memory, which stores programs related to computer boot etc.
Data stored in these memories is limited. A RAM
(as of this writing) commonly has a size of around 4GB to 8GB, and a ROM
ranges from 4MB to 8MB. Let's learn about what these sizes mean in the next section.
How is Data represented in Computers?
Just as you represent the length in its unit of measurement (centimeters, meters, kilometers), computers also have a unit of measurement for their data storage. These are specific to computer systems, as they are defined in binary bits. For computers, you can measure the size of memory using bytes, kilobytes, megabytes, up to petabytes (and even greater)-- with new allocation levels being created.
Bits (b)
The basic unit of all computers is bits
. Bits can store two values, 0
and 1
. The combination of these bits is also known as machine code
. All other units of memory are defined as a combination of these bits (in machine code!). This means that all the data that is stored on a computer is a mere combination of 0s and 1s!
Byte (B)
A byte
is a unit of data storage on computers, made up of 8 bits
. This means that it can store 256
possible binary values, as 28 = 256 (since there are 2 bits, and 8 bits make up 1 byte). A single byte
can represent one character, whether it be a number, letter, or symbol. The below illustration shows how these representations are eventually translated to bit representation. Larger units of memory are now made up of bytes
.

Let's test your knowledge. Fill in the missing part by typing it in.
If a single alphabetical letter is of 1 byte, how many bytes is the word "Monday"?
Write the missing line below.
KiloByte (KB)
You would probably think that since kilo
refers to 1000
, 1 Kilobyte = 1000 bytes. While that is somewhat true, a more accurate value of 1 kilobyte would be 1024 bytes.
This is because computers follow a binary system that is based on the powers of 2
. Therefore, we search for the power of 2 which is closest to 1000. This is 210 = 1024. Thus, 1 KiloByte = 1024 Bytes
. If we express in terms of bits, 1 kilobyte = 8 bits x 1000 bytes = 8000 bits
. Here we approximate the value of 1 kilobyte as 1000 rather than 1024.
Small files (such as low-quality images or text documents) are represented in kilobytes.
Are you sure you're getting this? Click the correct answer from the options.
Suppose a text document that has 10000 words, and each word has 5 letters. What would be the size of the text document in kilobytes?
Click the option that best answers the question.
- 50 KB
- 48.8 KB
- 52.4 KB
- 40 KB
Megabyte (MB)
Megabyte
is greater than a kilobyte and is equal to 1 million bytes
. In terms of kilobytes, 1 megabyte = 1024 kilobytes
. If we want to express a megabyte in bits, again we approximate the million to 106. This means the number of bits for a megabyte would be 8 x 106.
An HD image, a three-minute MP3 audio file, or short, low-resolution video files are stored in megabytes.
Gigabyte (GB)
Giga
refers to a billion. Similar to a megabyte, defining a gigabyte in terms of the previous memory unit will be, 1 gigabyte = 1024 megabytes
. Expressing this in bits would be 8 x 109. A gigabyte is huge, it can even store a full 1 - 1.5 hour HD movie!
Terabyte (TB)
After a gigabyte, the next memory unit is a terabyte
. A terabyte is larger than a gigabyte and thus, 1 terabyte = 1024 gigabytes
. Terabytes take enormous amount of bits for data representation, around 8 x 1012 bits.
Modern hard disk drives or laptops have storage space of around 1 to 2TB. This gives the users a lot of storage space which lasts for a long time.
Petabyte (PB)
Even greater than a terabyte is a petabyte, and this is the last memory unit that we will define in this lesson. 1 petabyte is 1024 terabytes
, which is one quadrillion
. You must be wondering, when are such large storage units used?-- as we usually see units up to terabytes more commonly.
But current technologies employ the use of terribly huge databases, which require even storage capacities in petabytes. One example would be mobile phone networks which transmit over 20 petabytes of data to and from users every day, or Google's servers which process around 24 petabytes of information every day.

Let's test your knowledge. Fill in the missing part by typing it in.
Suppose you have a movie file of 1.5GB. What will be the size of this file in KB?
Write the missing line below.
Summary
To understand the memory structure and performance of the system, knowledge about data sizes is necessary. The memory units discussed in this lesson with their example usages are summarized in the table below.
Unit | Bytes (Powers of 2) | Example Usage |
---|---|---|
Bits | 2 | Machine Code |
Bytes | 8 | A single character |
Kilobytes | 1024 | Text document |
Megabytes | 1024^2 | MP3 audio files, video files |
Gigabytes | 1024^3 | Movies |
Terabytes | 1024^4 | Hard disk drives |
Petabytes | 1024^5 | Google servers |
One Pager Cheat Sheet
- We will learn about data sizes and their importance to effectively use computing resources
in this lesson
. - It is important to become familiar with
volatile
andnon-volatile
memory, typicallyRAM
andROM
respectively, as they have limited sizes ranging from 4MB to 8GB. - Data is stored and measured in computers using
binary bits
with units ranging frombytes
up topetabytes
and beyond. - All
data
, no matter its form, is stored as combinations of0s
and1s
(inmachine code
) on a computer. - A
byte
is a unit of data storage made up of8 bits
, allowing it to store256
binary values, representing a single character, number, letter, or symbol. - The word "Monday" requires
6 bytes
of memory due to each character being represented by 1 byte. - While it is commonly thought that 1 Kilobyte = 1000 bytes, computers follow a binary system which means that 1 KiloByte = 1024 Bytes, which can be further represented as 8 bits x 1000 bytes = 8000 bits.
- The size of the text document in kilobytes is equal to 10,000 words multiplied by 5 letters per word and 1 byte per letter, divided by 1024, which equals 50 KB.
- A Megabyte (MB) is equal to
1 million bytes
or1024 kilobytes
, and is expressed in bits as 8 x 106, with HD images, audio and short video files typically stored in megabytes. - A gigabyte (GB) is equivalent to
1024 megabytes (MB)
, or 8 x 109 bits and is capable of storing a full 1 - 1.5 hour long HD movie. - A
terabyte
(TB) is larger than agigabyte
and provides a storage capacity of up to 8 x 1012 bits, allowing modern hard disk drives or laptops to have storage spaces of up to 1 to 2TB. - Today, large databases require capacities of
petabytes
, like mobile phone networks which transmit up to 20 petabytes of data and Google's servers which process 24 petabytes of information every day. - 1 GB is equivalent to 1,000,000 KB or 1,024 MB, so multiplying 1.5 GB by 1,000,000 (in decimal) or 1,024 (in binary) gives us 1,500,000 KB (in decimal) or 1,572,864 KB (in binary).
- Knowledge of
data sizes
is necessary to understand the memory structure and performance of a system, with variousunits
ranging frombits
topetabytes
used to store different elements such asmachine code
,characters
,documents
,audio and video files
,movies
, andhard disk drives
.