Conina said:
They shouldn't have used base-10-prefixes (kilo, mega, giga, tera, peta, exa...) for base 2 units in the first place. It all went wrong when lazy programmers thought, 1024 is "close enough" to 1000. |
It's actually base 16 for anything to do with file / memory addressing
1 KiB = 1,024 bytes = 0x400 (4 * 16^2)
1 MiB = 1,048,576 bytes = 0x80000 (8 * 16^4)
1 GiB = 1,073,741,824 bytes = 0x40000000 (4 * 16^7)
1 TiB = 1,099,511,627,776 bytes = 0x10000000000 (1 * 16^10)
And in computer turns you have
Byte/Char 1 byte (0-15)
Short 2 bytes (0-255)
Int/Long 4 bytes (0-65,535) = 64 KB
Long Long/Double 8 bytes (0-4,294,967,296) = 4GB
Long Double 16 bytes (0-18,446,744,073,709,551,616) = 16 EB (Exa Bytes) or 16,384 PB (Peta Bytes)
Long Doubles are mostly used for floating point and hence computers didn't like drives over 4 GB at first, Long Long being the max to address file locations.
Lesson, don't let computer nerds make up names ;)
Yeah it's all just picking the numbers 'close enough' to the decimal system.







