In binary, or base 2, a bit (one binary digit) can be either 0 or 1, so 6-bits will allow a maximum value of: 11 1111 [Note: There's a very good reason for arranging binary numbers in as many groups of four digits as possible; which will soon be revealed].
The decimal
equivalent for this number is found by summing up each power of 2
from right to left, i.e., from the least significant digit, to most significant
digit, as follows:
20 + 21
+ 22 + 23
+ 24 + 25
= 1 + 2 + 4 + 8 + 16 + 32 = 63.
To convert this binary number to hexadecimal, i.e., base 16, we simply separate the binary number into four digits for each hex digit (0-F): Thus, 11 1111(base 2) becomes: 3F in hex. [ For more detailed information on Hexadecimal see: Hexa What? ]
A 1-byte hexadecimal number contains a maximum value of 255 decimal. However, if we begin counting with the number 0 (zero), e.g., as the first address where data is stored in memory (or the LBA sectors on a hard disk), we have one more location than normally allowed by just the hex number FFh alone: We have 256 addresses!
A 10-bit binary number cannot exceed: 11 1111 1111 or 3FFh or 1023 decimal. But, the maximum number of Cylinders we can reference in 10 bits is 1024, if we begin counting from zero.
NOTE: In the Table below, the column labeled "Using Zero" indicates whether or not the number we're counting up to begins with zero for the "Max. Count" we've listed:
Bits
|
Bytes
|
Words
|
Max.
Hex Number
|
Maximum
Count
|
Examples
|
Using
Zero |
6
|
|
|
3F
(63)
|
63
|
CHS Sector
Count
|
|
8
|
1
|
|
FF
(255)
|
(See:
Note 1)
256
|
CHS Head
Count
|
Yes
|
10
|
|
|
3FF
(1023)
|
1024
|
CHS
Cylinder Count
|
Yes
|
16
|
2
|
1
|
FFFF
|
(2)
65,535
|
Hex
Word
|
|
24
|
3
|
|
FF
FFFF
|
16,777,215
|
|
|
28
|
|
|
FFF
FFFF
|
(3)
268,435,456
|
BIOS
Sector Count
|
Yes
|
32
|
4
|
2
|
FFFF
FFFF
|
(4)
4,294,967,295
|
Hex
Double Word
|
|
48
|
6
|
3
|
FFFF
FFFF FFFF
|
(
Note 5 )
|
New
BIOS Sector Count
|
Yes
|
64
|
8
|
4
|
FFFF
FFFF FFFF FFFF
|
(
Note 6 )
|
Hex
Quad Word
|
|
Note 1: Although the maximum number of "Heads" could have been 256 (since this count does begin with zero), there was a programming error in MS-DOS which limits the number of heads to only 255. Thus, the limits on the values for CHS tuples inside partition tables is: (1023, 254, 63).
Note 2: The first FAT16 partitions were limited to only 32 MiB in size. This comes from the fact they could handle only 0h through FFFFh ( 65,536 ) sectors. If you multiply that by 512 bytes per sector, the exact size is: 33,554,432 bytes, or exactly 32 binary MegaBytes.
Note 3: For many computers today, the BIOS still uses 28-bits to count sectors, which limits the machine to handling drives no larger than 137 GB: If you multiply 268,435,456 sectors by 512 bytes per sector, you'll get a limit of: 137,438,953,472 bytes (or exactly 128 GiB -- binary GigaBytes).
Note 4: When partitioning drives larger than 128 GiB, its partitions can still be recorded in the same 16-byte long Partition Table entries that PCs have been using since MS-DOS 2.00 was introduced, because both the Starting and Total sectors counts (which are the only values an OS or a utility program uses when a partition extends beyond 1024 cylinders) are stored in 32-bits. This gives them a maximum count of: 4,294,967,296 sectors, for a drive size of: 2,199,023,255,552 bytes (or exactly 2,048 GiB).
Note 5: The very latest BIOS chips make use of 48-bits to count the number of LBA blocks an HDD can store data on. This allows computers to handle drives with 281,474,976,710,656 sectors, for a maximum drive size up to: 144,115,188,075,855,872 bytes (or exactly 134,217,728 GiB, 131,072 TiB and 128 PiB). For those who don't know, those last two numbers are binary TeraBytes and PetaBytes.
Note 6: A 64-bit (or 8-byte) hex number, sometimes called a "Quad Word," has a maximum value of: 18,446,744,073,709,551,615. This is the largest exact Hexadecimal number the built-in Windows 2000/XP Calculator program can handle. That goes from Kilo- (10^3) to Mega- (10^6) to Giga- (10^9) to Tera- (10^12) to Peta- (10^15) to 18.4+ ExaBytes (18.4 x 10^18) or exactly 16 binary ExaBytes! But that's just getting started if you want to discuss really big numbers! You can read about Zetta- and Yotta- and some proposed future names for numerical prefixes, here: 256-bit CPUs.
The Starman's Realm Index Page