1. Differences in Disk Data Organization Structure
In general, the FAT32 and fat16 file systems do not change much. The file system still divides the Logical Disk Space into DBR boot zone, File Allocation Table (FAT), and root directory table (FDT) and Data zone (Data zone ). But there are the following differences:
· Fat16 has only one DBR and only occupies the logic 0-sector. The DBR in FAT32 has an additional copy starting from the logic 0-sector (XX-pillar, 0-header, and 1-sector) and logic 6 sectors (XX column, 0 header, 7 sectors ).
· FAT32 has a reserved sector between the DBR copy and fat1, while fat16 does not.
· Fat1 in the fat16 file system starts from the logic 0 sector (yy column, 1 header, 1 sector; fat1 in the FAT32 file system starts from the logic 32 sector (yy column, 1 header, 33 sectors.
Data Organization Structure of the two file systems 6-13
Figure 6-13 Data Organization Structure of the file system
2. Difference in DBR Structure
In FAT32, DBR not only has one more copy, but also the BPB parameters starting from the offset 0bh and some corresponding address representation methods. See table 6-15.
Table 6-15 address parameter allocation table in DBR of fat16 and FAT32 file systems
Offset |
Bytes |
Fat16 |
FAT32 |
0b--0ch |
2 |
Number of bytes per slice |
Number of bytes per slice |
0dh |
1 |
Number of sectors per cluster |
Number of sectors per cluster |
0e--0fh |
2 |
Number of reserved sectors |
Number of reserved sectors |
10 h |
1 |
Fat count |
Fat count |
11--12h |
2 |
Number of root directory registration items |
|
13--14h |
2 |
Total number of disk sectors |
|
15 h |
1 |
Magnetic media type description |
Magnetic media type description |
16--17h |
2 |
Number of sectors in each fat table |
|
18--19h |
2 |
Number of sectors per track |
Number of sectors per track |
1a--1bh |
2 |
Number of heads |
Number of heads |
1c--1fh |
4 |
Number of hidden sectors before the current Partition |
Number of hidden sectors before the current Partition |
20--23h |
4 |
|
Total number of sectors of A Logical Disk |
24--25h |
2 |
|
Number of sectors in each fat table |
27--2ah |
4 |
Fat16 format disk serial number |
|
2b--35h |
11 |
Fat16 volume name |
|
36--3ah |
5 |
Fat16 disk format flag |
|
43--46h |
4 |
|
FAT32 format disk serial number |
47--51h |
11 |
|
FAT32 volume name |
52--56h |
5 |
|
FAT32 disk format flag |
3. Differences between fat tables
Similar to fat16, FAT32 still saves two identical FAT file allocation tables.
· Fat16 system cluster numbers are represented by 16-bit binary numbers, ranging from 0002h to ffefh Available Cluster numbers (defined separately from fff0h to ffffh, used to represent bad clusters and end-of-file clusters ), each Logical Disk can have up to 65518 ffedh clusters.
· The FAT32 system cluster number is represented by a 32-bit binary number, which ranges from H to fffffeffh. Use 32-bit binary for the usage of each cluster:
Unallocated Cluster -- zero
Bad cluster-specific value
Allocated cluster-non-zero value (the last cluster of the file is ffffff0fh)
The file system divides and manages the storage space of the Data zone by cluster, and the cluster is the basic unit of space allocation and recovery. That is, a file always occupies several clusters. The remaining space of the last cluster used by the file will not be used, but will be wasted. From the table 6-16, we can see that using FAT32 in logical partitions of hard disks with the same capacity is much smaller than using fat16, greatly reducing the waste of space.
Table 6-16 relationship between Logical Disk capacity and cluster size in fat16 and FAT32 Modes
Fat16 |
FAT32 |
Logical Disk capacity |
Number of sectors per cluster |
Logical Disk capacity |
Number of sectors per cluster |
16--128mb |
4 |
& Lt; 260 MB |
1 |
128--256mb |
8 |
260--8 GB |
8 |
256--512mb |
16 |
8-16 GB |
16 |
512--1024mb |
32 |
16--32gb |
32 |
1024--2048mb |
64 |
> 32 GB |
64 |
4. Differences between FDT tables and directory items
(1) The FDT in the root directory of the fat16 file system is part of the system zone. It is a fixed area and a fixed size. It is the 32 sectors followed by the fat table partition and stores a maximum of 512 directory items.
The root FDT in FAT32 is no longer a fixed area or size. It adopts the same management method as the sub-directory FDT, and the number of files in the root directory is no longer limited by a maximum of 512. However, a directory item still occupies 32 bytes. It can be a file directory item, a subdirectory item, a volume label item (only available in the root directory), a deleted directory item, and a long file name directory item.
(2) The Directory items of fat16 have been described in detail in table 6-6. In the FAT32 directory item, the unused 10 bytes are reserved under fat16 with a new definition, as shown in Table 6-17.
Byte location |
Fat16 |
FAT32 |
0--7 bytes |
Indicates the file name. |
Indicates the file name. |
8-10 bytes |
Indicates the file extension. |
Indicates the file extension. |
11 bytes |
File Attributes |
File Attributes |
12--13 bytes |
Reserved unused |
It is used only for long file name directory items and stores the corresponding short file name directory byte checksum and so on. |
14--15 bytes |
File Creation Time |
16-17 bytes |
File creation date |
18--19 bytes |
Latest file access date |
20--21 bytes |
16-bit high for the first cluster number of the file |
22-23 bytes |
File Creation Time |
Last file modification time |
24--25 bytes |
File creation date |
Latest file modification date |
26--27 bytes |
First cluster ID of the file |
Low 16-bit file first cluster number |
28--31 bytes |
File Size |
File size (in bytes) |
Table 6-17 contents and meanings of directory items of fat16 and FAT32
Several parameter values of the file directory items in table 6-17, such as "File Creation Time", "file creation date", and 11th-byte file attributes, see the description after 6-6.