When a file is created or extended, disk sectors are assigned to it from the files area in powers of 2, known as ``allocation units'' or ``clusters''. The number of sectors per cluster for a given medium is defined in the BIOS parameter block and can be found at offset 0DH in the disk's boot sector. The IBM family of personal computers uses the following assignments:
| Disk Type | Power of 2 | Sectors/Cluster | |
|---|---|---|---|
| Single-sided floppy disk | 0 | = | 1 |
| Double-sided floppy disk | 1 | = | 2 |
| PC/AT fixed disk | 2 | = | 4 |
| PC/XT fixed disk | 3 | = | 8 |
The file allocation table (FAT) is divided into fields that correspond directly to the assignable clusters on the disk. These fields are 12 bits long in MS-DOS Versions 1 and 2 and can be either 12 bits or 16 bits long in Version 3, depending on the size of the medium (12 bits if the disk contains fewer than 4087 clusters, 16 bits otherwise).
The first two fields in the file allocation table are always reserved. On IBM-compatible media, the first 8 bits of the first reserved FAT entry contain a copy of the media descriptor byte, which is also found in the BIOS parameter block in the boot sector. The second, third, and (if applicable) fourth bytes, which constitute the remainder of the first two reserved FAT fields, always contain 0X0FF. Aside from the first two reserved entries of the FAT, the remainder of the entries describe the usage of their corresponding disk clusters. The contents of the FAT fields are interpreted as follows:
| Value | Meaning |
|---|---|
| (0)000H | cluster available |
| (F)FF0-(F)FF6H | reserved cluster |
| (F)FF7H | bad cluster, if not part of chain |
| (F)FF8-(F)FFFH | last cluster of file |
| (X)XXX | next cluster in file |
Each file's entry in the disk directory contains the number of the first cluster assigned to that file, which is used as an entry point into the FAT. From the entry point on, each FAT slot contains the cluster number of the next cluster in the file, until a last-cluster mark is encountered.
At the computer manufacturer's option, two or more identical copies of the FAT can be maintained by MS-DOS on each volume. All copies are updated simultaneously whenever files are extended or the directory is modified. If access to a sector in a FAT fails due to a read error, the other copies are tried until a successful disk read is obtained or all copies are exhausted. Thus, if one copy of the FAT becomes unreadable due to excessive wear or a software accident, the other(s) might still allow the files on the disk to be salvaged. As part of its procedure for checking the integrity of a disk, the fsck command compares the multiple copies (usually two) of the FAT to make sure they are both readable and consistent.