The 4GB limit on FAT32 drives is primarily due to the way the file system is structured and the limitations of its 32-bit architecture. FAT32, which stands for File Allocation Table 32, is a file system that was developed by Microsoft in the 1990s as an extension of the older FAT16 file system. It was introduced with the release of Windows 95 OSR2 and Windows 98, and it offered several advantages over its predecessor, including support for larger disks and more efficient use of disk space.
One of the key limitations of FAT32 is its maximum file size, which is limited to 4GB. This limitation is a result of the 32-bit architecture of the file system. In a 32-bit system, the maximum value that can be represented is 2^32, which equals 4,294,967,296. This means that the file system is only capable of addressing a maximum of 4,294,967,296 bytes of data. Since a gigabyte is equal to 1,073,741,824 bytes, the maximum file size that can be supported by FAT32 is approximately 4GB.
To understand why this limitation exists, it is helpful to look at how FAT32 stores file information on a disk. The file system uses a table called the File Allocation Table (FAT) to keep track of the allocation status of each cluster on the disk. A cluster is the smallest unit of allocation in FAT32, and it represents a fixed number of sectors on the disk. The size of a cluster can vary depending on the size of the disk, but it is typically 4KB.
The FAT entry for each cluster in the table contains a pointer to the next cluster in the file. To traverse the entire file, the file system starts at the first cluster and follows the chain of pointers until it reaches the end of the file. Each FAT entry is 32 bits in size, which means it can hold a maximum value of 2^32.
Since a cluster is typically 4KB in size, the maximum number of clusters that can be addressed by FAT32 is determined by dividing the maximum value that can be represented by a FAT entry (2^32) by the number of bytes in a cluster (4KB). This calculation gives us 2^32 / 4KB, which equals approximately 1,073,741,824 clusters.
To determine the maximum file size, we multiply the number of clusters by the size of a cluster. In this case, the maximum file size is 1,073,741,824 clusters multiplied by 4KB, which equals approximately 4GB.
It is worth noting that while the maximum file size for a single file on a FAT32 drive is limited to 4GB, the file system itself can support much larger disk sizes. The maximum disk size for FAT32 is approximately 8TB, which is determined by the number of clusters that can be addressed (2^32) multiplied by the size of a cluster (4KB).
The 4GB file size limit on FAT32 drives is a result of the 32-bit architecture of the file system and the way it stores file information using the FAT table. The maximum value that can be represented by a 32-bit field is 2^32, which corresponds to approximately 4GB. While this limitation may be restrictive for certain use cases, FAT32 remains a widely used file system due to its compatibility with various operating systems and devices.