The general algorithm for calculating hard disk integer partitions is: partition size = (partition size - 1) × 4 + 1024 × partition size.
If you follow the hard disk partition integer G calculation formula: (X-1)*4 + 1024*X = Y, where X is the value of the integer partition you want to get, the unit is G; then Y is what you should enter when partitioning Number, the unit is M, for example, 40GB = (40-1)*4 + 1024*40 = 41116MB.
According to this calculation method:
5G = 5136MB;
10G = 10276MB;
15G = 15416MB;
20G = 20556MB;
30G = 30836MB;
40G = 41116MB;
Within 30G, enter the above data. For example, if you enter 10276 for 10G, it will display exactly 10.00GB in Windows Explorer, and it will display 10.04GB in the management tool-disk management interface. If it is 40G, you enter 41116, then in Windows Resources The manager shows exactly 40.01GB.
Therefore, the above calculation formula is not very accurate.
The most accurate algorithm for hard disk partitioning is as follows (from Internet search):
Hard drives generally have 255 heads and 63 sectors, so the size of each cylinder is:
512byte x 255 x 63=8225280bytes=7.84423828125 MB
If you want to divide 40GB, then you need 40x1024MB=40960MB
The required number of cylinders is 40960÷7.84423828125=5221.66
Taking an integer is 5222 cylinders
The number of M that should be divided is 5222x7.84423828125=40962.6123046875MB
Regardless of the digits after the decimal point, add 1, which is 40963MB, and Windows considers it to be 40GB.
This method is common to NTFS and FAT32.
Attached below are the precise calculation results in 10GB increments from 10GB to 200GB:
10GB = 10245MB;
20GB = 20482MB;
30GB = 30726MB;
40GB = 40963MB;
50GB = 51208MB;
60GB = 61444MB;
70GB = 71681MB;
80GB = 81926MB;
90GB = 92162MB;
100GB = 102407MB;
110GB = 112644MB;
120GB = 122888MB;
130GB = 133125MB;
140GB = 143362MB;
150GB = 153606MB;
160GB = 163843MB;
170GB = 174088MB;
180GB = 184324MB;
190GB = 194561MB;
This precise partition result is displayed as an integer in the management tool-disk management interface and Windows Explorer. 10G is 10.00GB, 20G is 20.00GB, and 40G is 40.00GB.