Generally, computers provide many different types of storage systems. The different types of storage systems in a computer can be arranged in a hierarchy according to speed and their
costs as shown in Figure 1.12. In this figure, as we move down the hierarchy, the cost to store a bit generally decreases, whereas the access time generally increases.
The smallest unit of data that can be stored in a computer is a bit. A bit will have the value ‘0’ or ‘1’ . A large collection of such ‘0’s or ‘1’s is what makes up data in a computer.
Smallest Unit - 1 bit
8 bits - 1 byte
1024 bytes - 1 kilobyte (KB)
1024 kilobytes - 1 megabyte (MB)
1024 megabytes - 1 gigabyte (GB)
1024 gigabytes - 1 terabyte
The capacity of a particular storage device and the space taken up by a file are always measured using these units.