The FAT filesystem was created by Bill Gates and Marc McDonald in 1977 for managing disks in Microsoft Disk BASIC. In August 1980 Tim Paterson incorporated FAT into his 86-DOS operating system for the S-100 8086 CPU boards; the filesystem was the main difference between 86-DOS and its predecessor, CP/M.
The name originates from the usage of a table which centralizes the information about which areas belong to files, are free or possibly unusable, and where each file is stored on the disk. To reduce the management complexity, disk space is allocated to files in contiguous groups of hardware sectors called clusters. The maximum possible number of clusters has dramatically increased over time, and the number of bits required to identify a cluster is used to name the successive major versions of the format. The FAT standard has also evolved in several ways where backward compatibility with existing software has been preserved.
This initial version of FAT is now referred to as FAT12. Designed to be a filesystem for floppy disks, it had a number of limitations - no support for hierarchical directories, cluster addresses were “only” 12 bits long (which limited cluster count to 4096 and made the FAT code manipulating a bit tricky) and the disk size was stored as a 16-bit count of sectors, which limited the maximum partition size to 32MB.
In 1984 IBM released the PC AT, which featured a 20 MB hard disk. Microsoft introduced MS-DOS 3.0 in parallel. Cluster addresses were increased to 16-bit, allowing for a greater number of clusters (up to 65,517) and consequently much greater file-system sizes. However, the maximum possible number of sectors and the maximum (partition, rather than disk) size of 32 MB did not change. Therefore, although technically already “FAT16”, this format was not yet what today is commonly understood under this name.
Finally in November 1987, Compaq DOS 3.31 introduced what is today called the FAT16 format, with the expansion of the 16-bit disk sector index to 32 bits. The result was initially called the DOS 3.31 Large File System.
In 1988 the improvement became more generally available through MS-DOS 4.0 and OS/2 1.1. The limit on partition size was now dictated by the 8-bit signed count of sectors-per-cluster, which had a maximum power-of-two value of 64. With the usual hard disk sector size of 512 bytes, this gives 32KB clusters, thereby fixing the “definitive” limit for the FAT16 partition size at 2 gigabytes. On magneto-optical media, which can have 1 or 2KB sectors, the limit is proportionally greater.
Much later, Windows NT increased the maximum cluster size to 64KB by considering the sectors-per-cluster count as unsigned. However, the resulting format was not compatible with any other FAT implementation of the time, and it generated massive internal fragmentation.
In order to overcome the volume size limit of FAT16, while still allowing DOS real-mode code to handle the format without unnecessarily reducing the available conventional memory, Microsoft decided to implement a newer generation of FAT, known as FAT32, with cluster counts held in a 32-bit field, of which 28 bits are currently used.
In theory, this should support a total of approximately 268,435,456 (2^28) clusters, allowing for drive sizes in the range of 8 terabytes with 32K clusters, but the boot sector uses a 32 bit field to limit volume size to 2^32 sectors (2TB on a hard disk with 512 byte sectors).
The maximum possible size for a file on a FAT32 volume is 4GB minus 1 byte (2^32 - 1 bytes).