Understanding file sizes (Bytes, KB, MB, GB, TB, PB, EB, ZB, YB)
Computer Memory
Computer memory is the hardware part of the computer that is used to store data. So,
The storage device in a computer is called computer memory. Memory is a hardware part that is physically present in a computer. There are various types of memory available based on the use cases.
1. Cache memory
Cache memory is a kind of temporary memory that stores the data which is frequently or recently used. If you notice whenever you visit any web page, if you accept cookies, then your activity on that page is considered as frequent and stored in cache memory.
Cache memory works as an alternative to CPU as each time CPU execution is too costly, so if there is data that is frequently used, that is stored in cache memory. So whenever there is a requirement for the data, the OS gets the data directly from cache memory instead of the CPU.
It keeps the CPU free and reduces the load on the CPU. It is a very fast memory as compared to other types of memory.
2. Primary/Main Memory
Primary Memory is also known as RAM (Random Access Memory) or ROM (Read Only Memory). It stores the data and program which is currently running on the computer. It is also called volatile memory because whenever a device is turned off, the data present in this memory is also lost. But without a primary memory, computer cannot execute any program.
3. Secondary Memory
Secondary memory is also referred to as non-volatile memory because data is permanent in this memory until the user deletes it by its choice. It is also called external memory as it does not transfer data directly to the CPU.
Examples of secondary memory are memory cards, hard disks, compact disks, etc.
These memory devices are cheaper than the primary memory, and if the device is switched off, then this memory doesn’t delete its data.
As we know, memory in a device is divided into blocks, and each block has a unique memory address. The size of each block may or may not be the same. But the size capacity has different units, which we will discuss further.
Data in the computer is nothing but a series of 0s and 1s; with the help of 0s and 1s, we can store every bit of information in computer memory. Each digit (0 or 1) is known as a bit. 4 bits combined is called a nibble, and 8 bits is called Byte.
Due to only 2 digits (0 and 1), information is stored in binary format. So the maximum value in a byte can be (28-1), which is 255(11111111), and the minimum is 0(00000000) (unsigned).
Any file size or memory occupied is calculated in bytes, and then there are the following units generated from bytes:
1. KB
KB means KiloByte. We generally refer to the word ‘Kilo’ for 1000. But here, Kilo means 210. This means 1024 bytes of information can be stored in 1-kilobyte size.
2. MB
MB is known as MegaByte, which means 220 bytes of memory. The mega term is used for 106, which is 1000 kilobytes. So, in general, 1000 KB(1024 more accurate) is also known as 1MB.The images in jpg or png format or songs have the size in units of MBs.
3. GB
GB means GigaByte, which means 230 Bytes or nearly (1000,000,000 bytes) if we consider 1KB ~ 1000 Bytes and 1MB~1000KB. Giga term is used for 109. We can find the size of hard-disks or RAM size in devices in units of GB.
4. TB
TB stands for TeraByte, which means 240bytes as tera term refers to 1012.
So it means, 1TB is nearly equal to (1000,000,000,000 bytes).
1TB is equal to 1000GB(~1024GB). Nowadays, many hard disks are used which have the storage capacity of units of teraBytes.
5. PB
PB stands for Peta Bytes which means 250 or 1015 bytes. 1000 TB is equal to 1PB. Generally, huge servers have storage capacity in the units of PBs.
6. EB
EB stands for ExaByte, which means 260 bytes or 1018 bytes. 1000 PB is equal to 1EB. This storage is so huge that creating the server of this unit will be very difficult and costly.
7. ZB
ZB stands for Zetta Bytes, meaning in 1ZB, there are 270 bytes or nearly 1021 bytes.
1000 EB is equal to 1ZB. Collectively the whole world’s data can be referred to in a few ZBs.
8. YB
YB stands for YottaByte, which means 1YB will have 280 bytes or nearly 1024 bytes.
1000 EB is equal to 1YB.