Understanding file sizes | Bytes, KB, MB, GB, TB, PB, EB, ZB, YB - GeeksforGeeks (2023)


Memory of a Computer is any physical device that is capable of storing information whether it is large or small and stores it temporarily or permanently. For example, Random Access Memory (RAM), is a type of volatile memory that stores information for a short interval of time, on an integrated circuit used by the operating system.

Memory can be either volatile or non-volatile. Volatile memory is a type of memory that loses its contents when the computer or hardware device is switched off. RAM is an example of a volatile memory i.e. why if your computer gets rebooted while working on a program, you lose all the unsaved data. Non-volatile memory is a memory that keeps its contents saved even in the case of power loss. EPROM((Erasable Programmable ROM) is an example of non-volatile memory.

Characteristics of Main Memory

  • Known as the main memory.
  • Semiconductor memories.
  • Faster than secondary memories.
  • A computer cannot run without the primary memory.
  • It is the working memory of the computer.
  • Usually volatile memory.
  • Data is lost in case power is switched off.

Units of Memory

A computer processor is made up of multiple decisive circuits, each one of which may be either OFF or ON. These two states in terms of memory are represented by a 0 or 1. In order to count higher than 1, such bits (BInary digiTS) are suspended together. A group of eight bits is known as a byte. 1 byte can represent numbers between zero (00000000) and 255 (11111111), or 28 = 256 distinct positions. Of course, these bytes may also be combined to represent larger numbers. The computer represents all characters and numbers internally in the same fashion.

In practice, memory is measured in KiloBytes (KB) or MegaBytes (MB). A kilobyte is not exactly, as one might expect, of 1000 bytes. Rather, the correct amount is 210 i.e. 1024 bytes. Similarly, a megabyte is not 10002 i.e. 1, 000, 000 bytes, but instead 10242 i.e. 1, 048, 576 bytes. This is a remarkable difference. By the time we reach to a gigabyte (i.e. 10243 bytes), the difference between the base two and base ten amounts is almost 71 MegaByte.

Both computer memory and disk space are measured in these units. But it’s important not to confuse between these two. “12800 KB RAM” refers to the amount of main memory the computer provides to its CPU whereas “128 MB disk” symbolizes the amount of space that is available for the storage of files, data, and other types of permanent information.

(Video) Capacity Estimation: How much storage twitter requires? - Part - 1

Types of various Units of Memory-

  • Byte
  • Kilo Byte
  • Mega Byte
  • Giga Byte
  • Tera Byte
  • Peta Byte
  • Exa Byte
  • Zetta Byte
  • Yotta Byte


In computer systems, a unit of data that is eight binary digits long is known as a byte. A byte is a unit that computers use to represent a character such as a letter, number, or a typographic symbol (for example, “h”, “7”, or “$”). A byte can also grasp a string of bits that need to be used in some larger units of application processes (e.g., the stream of bits that composes a visual image for a program that represents images or the string of bits that composes the machine code of a computer program).
A byte is abbreviated with a big “B” whereas a bit is abbreviated with a small “b”. Computer storage is generally measured in multiples of the byte. For example, a 640 MB hard drive holds a nominal 640 million bytes – or megabytes – of data. Byte multiples are made up of exponents of 2 and generally expressed as a “rounded off” decimal number. For example, two megabytes or 2 million bytes are actually 2, 097, 152 (decimal) bytes.

The Conflict

Once a KiloByte was considered truly massive at a time. Some felt that writing 210 was a bit unwisely and also might also confuse others. 1,024 bytes appeared to be slightly awkward, and for ease of use, the kilobyte began to be referred to simply as 1,000 bytes of data and just ignore the left 24 Bytes. The majority might assume that the KiloByte is just 1, 000 Bytes of data but that’s not the case. This was done as the people with no knowledge of binary will not get the extra 24 bytes of storage.

As time passed, and we started to use MegaByte (MB), it became harder to neglect 24 KB of data, but not hard enough. when GigaByte was started to use it became very hard to ignore 24 MB of storage. Now imagine ignoring 24 GB or even 24 TB of data.

The Solution

Since it was hard to ignore such a large amount of data, they started to call KB as 1024 Bytes, 1 GB as 1024 MB, etc. But now it was too late, people now know that the KB was 1, 000 Bytes and not 1, 024 Bytes. An effort was set by the American organization NIST (National Institute of Standards and Time) and the International Electrotechnical Commission (IEC) to resolve the issue.

(Video) Benda Tak Terduga yang Jadi Bank Data Masa Depan

As it was very difficult to make small modifications as it tends to big changes to the world of science and technology, it was decided in 1998 that “kibibyte (KiB)” would be used to signify 1,024 bytes while that the KiloByte would be retained solely for 1,000 bytes. Similarly “mebibyte (MiB)” would be used to represent 1,048,576 bytes while megabyte (MB) still referred to 1,000,000 bytes.

Unfortunately, it seems that the actions of these regulators have not helped to clarify the difference between the kilobyte and the kibibyte. The fact that the word “kilobyte” has simply become too deep-rooted in international culture.


The kilobyte is the smallest unit of memory measurement but greater than a byte. A kilobyte is 103 or 1, 000 bytes abbreviated as ‘K’ or ‘KB’. It antecedes the MegaByte, which contains 1, 000, 000 bytes. One kilobyte is technically 1, 000 bytes, therefore, kilobytes are often used synonymously with kibibytes, which contain exactly 1, 024 bytes (210).
Kilobytes are mostly used to measure the size of small files. For example, a simple text document may contain 10 KB of data and therefore it would have a file size of 10 kilobytes. Graphics of small websites are often between 5 KB and 100 KB in size. Individual files typically take up a minimum of four kilobytes of disk space.


One megabyte is equal to 1, 000 KBs and antecedes the gigabyte (GB) unit of memory measurement. A megabyte is 106 or 1, 000, 000 bytes and is abbreviated as “MB”. 1 MB is technically 1, 000, 000 bytes, therefore, megabytes are often used synonymously with mebibytes, which contain exactly 1, 048, 576 bytes (220).
Megabytes are mostly used to measure the size of large files. For example, a high-resolution JPEG image might range in size from 1-5 megabytes. A 3-minute song saved in a compressed version may be roughly 3MB in size, and the uncompressed version may take up to 30 MB of disk space. Compact Disk’s capacity is measured in megabytes (approx 700 to 800 MB), whereas the capacity of most other forms of media drives, such as hard drives and flash drives, is generally measured in gigabytes or terabytes.


One gigabyte is equal to 1, 000 MBs and precedes the terabyte(TB) unit of memory measurement. A gigabyte is 109 or 1, 000, 000, 000 bytes and is abbreviated as “GB”. 1 GB is technically 1, 000, 000, 000 bytes, therefore, gigabytes are used synonymously with gibibytes, which contain exactly 1, 073, 741, 824 bytes (230).
Gigabytes, are sometimes also abbreviated as “gigs, ” and are often used to measure storage device’s capacity. e.g., a standard DVD drive can hold 4.7 GBs of data. Storage devices that hold 1, 000 GB of data or more are measured in terabytes.

(Video) Format String Attack | Exploit Development #Desafio02 Beco do Exploit #VM29 - Pegasus 1


One terabyte is equal to 1, 000 GBs and precedes the petabyte(PB) unit of memory measurement. A terabyte is 1012 or 1, 000, 000, 000, 000 bytes and is abbreviated as “TB”. 1 TB is technically 1 trillion bytes, therefore, terabytes and tebibytes are used synonymously, which contains exactly 1, 099, 511, 627, 776 bytes (1, 024 GB) (240).
Mostly the storage capacity of large storage devices is measured in TeraBytes. Around 2007, consumer hard drives reached a capacity of 1 TeraByte. Now, HDDs are measured in Terabytes e.g., a typical internal HDD may hold 2 Terabytes of data whereas some servers and high-end workstations that contain multiple hard drives may even have a total storage capacity of over 10 Terabytes.

Peta Byte

One petabyte is equal to 1, 000 TBs and precedes the exabyte unit of memory measurement. A petabyte is 1015 or 1, 000, 000, 000, 000, 000 bytes and is abbreviated as “PB”. A petabyte is lesser in size than a pebibyte, which contains exactly 1, 125, 899, 906, 842, 624 (250) bytes.
Most of the storage devices can hold a maximum of a few TBs, therefore, petabytes are rarely used to measure memory capacity of a single device. Instead, PetaBytes are used to measure the total data stored in large networks or server farms. For example, Internet Giants like Google and Facebook store more than over 100 PBs of data on their data servers.

Exa Byte

One exabyte is equal to 1, 000 PBs and precedes the zettabyte unit of memory measurement. An exabyte is 1018 or 1, 000, 000, 000, 000, 000, 000 bytes and is abbreviated as “EB”. Exabytes are lesser than exbibytes, which contain exactly 1, 152, 921, 504, 606, 846, 976 (260) bytes.
The exabyte unit of memory measurement is so large, that it is not used to measure the capacity of storage devices. Even the data storage capacity of the biggest cloud storage centers is measured in PetaBytes, which is a fraction of 1 EB. Instead, exabytes measure the amount of data over multiple data storage networks or the amount of data that is being transferred over the Internet for a certain amount of time. E.g., several hundred exabytes of data is transferred over the Internet every year.

Zetta Byte

One zettabyte is equal to 1, 000 exabytes or 1021 or 1, 000, 000, 000, 000, 000, 000, 000 bytes. A zettabyte is a little bit smaller than zebibyte that contains 1, 180, 591, 620, 717, 411, 303, 424 (270) bytes, and is abbreviated as “ZB”. One zettabyte contains one billion TBs or one sextillion bytes which means it will take one billion one terabyte hard drives to store one zettabyte of data. Generally, Zettabyte is used to measure the large amounts of data and all the data in the world is just a few zettabytes.


Yotta Byte

One yottabyte is equal to 1, 000 zettabytes. It is the largest SI unit of memory measurement. A yottabyte is 1024 ZettaBytes or 1, 000, 000, 000, 000, 000, 000, 000, 000 bytes and is abbreviated as “YB”. It is a little bit smaller than yobibyte, which contains exactly 1, 208, 925, 819, 614, 629, 174, 706, 176 bytes (280) bytes.

1 yottabyte contains one septillion bytes which are exactly the same as one trillion TBs. It is a very large number that humans can evaluate. There is no practical use of such a large measurement unit because all the data in the world made of just a few zettabytes.

Some Misconceptions

The size on a disk with one KB is 1024 Bytes although it signifies 1, 000 Bytes of data. It’s just the old standard everyone remembers.

The download speed Kbps is 1, 000 Bits per second, not 1, 024 Bits per second.

Tabular Representation of various Memory Sizes

NameEqual ToSize(In Bytes)
Bit1 Bit1/8
Nibble4 Bits1/2 (rare)
Byte8 Bits1
Kilobyte1024 Bytes1024
Megabyte1, 024 Kilobytes1, 048, 576
Gigabyte1, 024 Megabytes1, 073, 741, 824
Terrabyte1, 024 Gigabytes1, 099, 511, 627, 776
Petabyte1, 024 Terabytes1, 125, 899, 906, 842, 624
Exabyte1, 024 Petabytes1, 152, 921, 504, 606, 846, 976
Zettabyte1, 024 Exabytes1, 180, 591, 620, 717, 411, 303, 424
Yottabyte1, 024 Zettabytes1, 208, 925, 819, 614, 629, 174, 706, 176

My Personal Notesarrow_drop_up

(Video) 297. How Many bytes a pointer variable occupies? | C Programming in Telugu


What is KB KB MB GB TB? ›

KB, MB, GB - A kilobyte (KB) is 1,024 bytes. A megabyte (MB) is 1,024 kilobytes. A gigabyte (GB) is 1,024 megabytes. A terabyte (TB) is 1,024 gigabytes.

What is the order of file sizes? ›

File Sizes
  • Bit. A bit is a smallest unit of data, which holds either 1 or 0 (or on/off). ...
  • Byte. A byte is a sequence of 8 bits. ...
  • Kilobyte. A kilobyte is equal to 1024 bytes. ...
  • Megabyte. A Megabyte is 1024 kilobytes. ...
  • Gigabyte. A Gigabyte is 1024 megabytes. ...
  • Terabyte. A Terabyte is 1024 gigabytes. ...
  • bps. means one bit per second. ...
  • Bps.

Which is bigger MB or KB or GB or TB? ›

A terabyte is bigger than a gigabyte. A terabyte is equal to 1,024 gigabytes (GB), which itself is equal to 1,024 megabytes (MB), while a megabyte is equivalent to 1,024 kilobytes.

What are the 8 types of bytes? ›

Understanding file sizes | Bytes, KB, MB, GB, TB, PB, EB, ZB, YB - GeeksforGeeks.

Which is smaller TB or KB? ›

1 MB is 1,024 kilobytes, or 1,048,576 (1024x1024) bytes, not one million bytes.
ARCHIVED: What are bits, bytes, and other units of measure for digital information?
1 kilobyte (KB)1,024 bytes
1 megabyte (MB)1,048,576 bytes
1 gigabyte (GB)1,073,741,824 bytes
1 terabyte (TB)1,099,511,627,776 bytes
1 more row
Jan 18, 2018

What is higher KB or GB? ›

Computer file sizes:

Largest - Gigabyte (GB) Larger - Megabyte (MB) Large - Kilobyte (KB)

What are the file sizes in order from smallest to largest? ›

Computer Storage Units Smallest to Largest
  • Bit is an eighth of a byte* ...
  • Byte: 1 Byte. ...
  • Kilobyte: 1 thousand or, 1,000 bytes. ...
  • Megabyte: 1 million, or 1,000,000 bytes. ...
  • Gigabyte: 1 billion, or 1,000,000,000 bytes. ...
  • Terabyte: 1 trillion, or 1,000,000,000,000 bytes. ...
  • Petabye: 1 quadrillion, or 1,000,000,000,000,000 bytes.
Mar 27, 2009

What are the list of data sizes? ›

Decimal units such as kilobyte (KB), megabyte (MB), and gigabyte (GB) are commonly used to express the size of data. Binary units of measurement include kibibyte (KiB), mebibyte (MiB), and gibibyte (GiB).

How do I list files by size order? ›

To sort files by size, use the option -S with the ls command. Mind it, it's capital S for sorting. That's good but you can make it better by adding the -h option. This option makes the output of the ls command displays the file size in human readable formats.

What is the biggest memory size? ›

A yottabyte is the largest unit approved as a standard size by the International System of Units (SI). The yottabyte is about 1 septillion bytes -- or, as an integer, 1,000,000,000,000,000,000,000,000 bytes. The storage volume is equivalent to a quadrillion gigabytes (GB) or a million trillion megabytes.

Which unit out of kB MB GB TB is the largest? ›

Terabyte (TB)

A terabyte, or TB, is the largest commonly available data storage unit. Few commercial-grade products will be sold that boast more than a few terabytes of storage at a maximum. A terabyte is equal to 1,000 gigabytes, and a tebibyte is equivalent to 1,024 gibibytes.

How many kB is considered a large file? ›

Table of approximate file sizes
bytesin units
30,00030 kB
100,000100 kB
500,000500 kB
1,000,0001 MB
12 more rows

What are 4 bits called? ›

The smallest unit of binary information, equal to a single 0 or 1. Two bits are called a crumb, four bits are called a nibble, and eight bits are called 1 byte.

What is GB vs TB vs PB? ›

Giga- means 1,000,000,000; a Gigabyte is a billion bytes. Tera- means 1,000,000,000,000; a Terabyte is a trillion bytes. Peta- means 1,000,000,000,000,000; a Petabyte is 1,000 Terabytes. Exa- means 1,000,000,000,000,000,000; an Exabyte is 1,000 Petabytes.

What is the full form of ZB? ›

The meaning or full form of ZB is "ZettaByte".

Which one is bigger KB or MB? ›

A megabyte has approximately 1,000 (or 1,024 to be precise) kilobytes.

Is A GB bigger than a MB? ›

1 GB (GigaByte) is equal to 1024 MB (MegaByte). As a result, a Gigabyte is 1000 times bigger than a Megabyte (MB).

Which is bigger TB or MB? ›

So how many gigabytes or megabytes are in a terabyte? 1 terabyte (TB) equals 1,000 gigabytes (GB) or 1,000,000 megabytes (MB).

Is 1 KB a lot of data? ›

One kilobyte (KB) is a collection of about 1000 bytes. A page of ordinary Roman alphabetic text takes about 2 kilobytes to store (about one byte per letter). A typical short email would also take up just 1 or 2 kilobytes.

Is A KB less than a MB? ›

The short answer is yes, MB is bigger than KB. In fact, an MB is 1,024 times bigger than a KB, which means that 1 MB equals 1,024 kilobytes. To understand this on a deeper level, let us compare KB and MB in terms of bit. A bit is the smallest unit of information in the digital world.

How big is a GB of data? ›

A gigabyte is equivalent to the following standard measurements: 1,000 megabytes (decimal) or 1,024 megabytes (binary); 1,000,000 kilobytes (decimal) or 1,048,576 kilobytes (binary); and. 1,000,000,000 bytes (decimal) or 1,073,741,824 bytes (binary).

What are the different file size units? ›

A file size is frequently expressed in bytes, kilobytes (kb) or megabytes (mb). A byte generally represents a single character, digit , or symbol (including a space) of data. Each byte is composed of 8 bits.

How are file sizes measured? ›

File sizes are always measured in bytes. A byte is a sequence of 8 bits (and remember, a bit is the smallest piece of digital information, 0 or 1).

What are file size prefixes? ›

Kilo, mega, giga, tera, peta, exa and zetta are among the binary prefixes used to denote the quantity of something, such as a byte or bit in computing and telecommunications. Sometimes called prefix multipliers, these prefixes are also used in electronics and physics.

What are the different data types and its size and range? ›

In this article
Type NameBytesRange of Values
short2-32,768 to 32,767
unsigned short20 to 65,535
long4-2,147,483,648 to 2,147,483,647
unsigned long40 to 4,294,967,295
21 more rows
Aug 3, 2021

How big is a googolbyte? ›

Sizes of Data Units. Then there is the hypothetical "Googolbyte" which would be a number of bytes equal to a 10 followed by 100 zeroes.

What does size of data type mean? ›

The size is typically about 32-bits or 4 bytes on a 16/ 32-bit compiler. Yet, it varies depending on what compiler we are using. There is no specification of the data types sizes according to the C standard, except the character.

How do I arrange the order of files? ›

How to Organize Folders and Files in Windows
  1. Click to highlight the folder or file to move.
  2. Click the Home tab. ...
  3. Move the folder or file by clicking Move to. ...
  4. Click Choose location if the desired folder isn't listed. ...
  5. Choose the destination folder, and then click Move.

How do you arrange data in a specific order? ›

Select a cell in the column you want to sort. On the Data tab, in the Sort & Filter group, click Sort. In the Sort dialog box, under Column, in the Sort by or Then by box, select the column that you want to sort by a custom list. Under Order, select Custom List.

What are the four ways to sort a list of files? ›

Ways of sorting files

Sorts alphabetically by the name of the file. Sorts by the size of the file (how much disk space it takes up). Sorts from smallest to largest by default. Sorts alphabetically by the file type.

Which file size is the largest? ›

Computer Storage Units Smallest to Largest
  • Petabye: 1 quadrillion, or 1,000,000,000,000,000 bytes. ...
  • Exabyte: 1 quintillion, or 1,000,000,000,000,000,000 bytes. ...
  • Zettabyte: one sextillion or 1,000,000,000,000,000,000,000. ...
  • Yottabyte: 1 septillion, or 1,000,000,000,000,000,000,000,000 bytes.
Mar 27, 2009

What is the smallest byte? ›

File sizes are always measured in bytes. A byte is a sequence of 8 bits (and remember, a bit is the smallest piece of digital information, 0 or 1).
A small file.
byte #characterbinary
1H0100 1000
2e0110 0101
3l0110 1100
4l0110 1100
2 more rows

How much is a zettabyte? ›

One zettabyte is approximately equal to 1,000 exabytes or 1 billion terabytes.

What is 1000 TB called? ›

Peta- means 1,000,000,000,000,000; a Petabyte is 1,000 Terabytes.


1. A collection of 8 bits is called ?
(Upadhyay Technology)
2. How MEMORY LEAK slows down your Android Phone!? | #TCT_RAM_Series 23
(Technocrat Telugu)
3. which of the following is the smallest unit of data in computer science ?
(Upadhyay Technology)
4. Lecture 01 Introduction and Course Plan
(RBI Exam Preparation)
5. Part 7 | Binary & Decimal System | Conversion | C Programming (Telugu) | Navi's Pros
(Navi's Pros)
6. Lecture 01 Introduction and Course Plan
Top Articles
Latest Posts
Article information

Author: Arline Emard IV

Last Updated: 04/06/2023

Views: 5369

Rating: 4.1 / 5 (72 voted)

Reviews: 87% of readers found this page helpful

Author information

Name: Arline Emard IV

Birthday: 1996-07-10

Address: 8912 Hintz Shore, West Louie, AZ 69363-0747

Phone: +13454700762376

Job: Administration Technician

Hobby: Paintball, Horseback riding, Cycling, Running, Macrame, Playing musical instruments, Soapmaking

Introduction: My name is Arline Emard IV, I am a cheerful, gorgeous, colorful, joyous, excited, super, inquisitive person who loves writing and wants to share my knowledge and understanding with you.