GB is metric and it’s easy for us to remember. E.g. 1000 bytes = 1 Kilobyte, 1000 kilobytes = megabyte and so on.
GiB is the binary value. In binary, you have to work in powers of 2. That is… the values double every time (2, 4, 8, 16, 32, 64 and so on…). 1024 bytes = 1 KiB, 1024 KiB = 1 MiB
Since computers work in binary, and 1000 isn’t a number that’s easy to deal with in binary, we use the closest value available to us, 1024. In fact, back in the days when people were only concerned about KBs, they would say that 1000 KB = 1024 KiB.
Of course, we’re now working with TBs rather than KBs. Everything ramps up including the amount of “missing” space an OS reports on a hard drive.
I know windows tries to be helpful and shows you the value of a drive in GB, rather than its GiB value. Ever wonder why a 1TB hard drive appears as ~931GBs? This is why.
Other OSes tend to show you the GiB value since that’s generally a lot more accurate.
An important thing to note about this is that as we go up exponentially the error between GiBs and GBs increases. A kiB is only 2% more than a kB, but a TiB is 10% more than a TB. So using them interchangeably is increasingly misleading.
Also, there are many cases in computers where it doesn’t really make sense to fuss about binary. Like, an HDD is a spinning piece of metal, the number of bits it can store has no binary constraint.
Fun fact: the old 3.5" floppies that were marketed as 1.44 MB were neither 1.44MiBs nor 1.44 MBs, but some weird hybrid mash-up unit.
To expand on this: people sometimes use SI prefixes to refer to 1024 units, but it’s just wrong. A kilometer is 1000 meters, a kilogram is 1000 grams, and so on. If we were to re-define these prefixes for specific disciplines things get much more complicated very quickly.
Computers generally use 1024 because that’s a lot easier to work with. Those are gibibytes (with “bi” in the middle indicating “binary”) or GiB.
Anyone selling you storage will use the SI prefixes (powers of 1000) because that’s technically correct. Those are gigabytes (GB).
Technically, factors of 1000 are correct. Powers of 1024 are used out of programmer laziness or backwards compatibility with spinning disks.
This is why you’re missing over 10% of every new drive you buy, different companies are measuring in different units. The worst part is probably that software is often measuring in GiB, but displaying GB because of familiarity.
RAM is usually GiB even if the label says GB, though, because you need to work in powers of two to make RAM work right.
@skullgiver@LaughingFox It’s not programmer laziness at all, RAM modules’ size has to be of a power of 2 on most platforms because of various assumptions the CPU makes in memory alignment and memory bulk reads for performance reasons. Processors don’t interact directly with the flash dies, so it’s fine for them to be of the size they feel like provided the controller knows what it’s doing.
Anything presented to the end user can just be real numbers. The end user doesn’t give a damn about sector sizes or NAND configuration, want want an estimate of how many cat pictures they can store on their drive.
There is some overhead but you don’t solve that by using 1024 for reporting disk side. The overhead depends on fragmentation and the configuration of the file system when the drive was formatted.
Even on the hardware level, QLC NAND cell will operate in 8KiB pages. The 1024 system based on heads/cylinders/sectors is no longer relevant for most people. Put the exact size in sector compatible bits in the advanced UI but give the users something they can actually use.
Iook I’m not a tech person, I always thought 1 gig was 1024 megabytes?
What is a GiB? I’ve seen it but always wondered.
GB is metric and it’s easy for us to remember. E.g. 1000 bytes = 1 Kilobyte, 1000 kilobytes = megabyte and so on.
GiB is the binary value. In binary, you have to work in powers of 2. That is… the values double every time (2, 4, 8, 16, 32, 64 and so on…). 1024 bytes = 1 KiB, 1024 KiB = 1 MiB
Since computers work in binary, and 1000 isn’t a number that’s easy to deal with in binary, we use the closest value available to us, 1024. In fact, back in the days when people were only concerned about KBs, they would say that 1000 KB = 1024 KiB.
Of course, we’re now working with TBs rather than KBs. Everything ramps up including the amount of “missing” space an OS reports on a hard drive.
I know windows tries to be helpful and shows you the value of a drive in GB, rather than its GiB value. Ever wonder why a 1TB hard drive appears as ~931GBs? This is why. Other OSes tend to show you the GiB value since that’s generally a lot more accurate.
An important thing to note about this is that as we go up exponentially the error between GiBs and GBs increases. A kiB is only 2% more than a kB, but a TiB is 10% more than a TB. So using them interchangeably is increasingly misleading.
Also, there are many cases in computers where it doesn’t really make sense to fuss about binary. Like, an HDD is a spinning piece of metal, the number of bits it can store has no binary constraint.
Fun fact: the old 3.5" floppies that were marketed as 1.44 MB were neither 1.44MiBs nor 1.44 MBs, but some weird hybrid mash-up unit.
To expand on this: people sometimes use SI prefixes to refer to 1024 units, but it’s just wrong. A kilometer is 1000 meters, a kilogram is 1000 grams, and so on. If we were to re-define these prefixes for specific disciplines things get much more complicated very quickly.
Computers generally use 1024 because that’s a lot easier to work with. Those are gibibytes (with “bi” in the middle indicating “binary”) or GiB.
Anyone selling you storage will use the SI prefixes (powers of 1000) because that’s technically correct. Those are gigabytes (GB).
Technically, factors of 1000 are correct. Powers of 1024 are used out of programmer laziness or backwards compatibility with spinning disks.
This is why you’re missing over 10% of every new drive you buy, different companies are measuring in different units. The worst part is probably that software is often measuring in GiB, but displaying GB because of familiarity.
RAM is usually GiB even if the label says GB, though, because you need to work in powers of two to make RAM work right.
@skullgiver @LaughingFox It’s not programmer laziness at all, RAM modules’ size has to be of a power of 2 on most platforms because of various assumptions the CPU makes in memory alignment and memory bulk reads for performance reasons. Processors don’t interact directly with the flash dies, so it’s fine for them to be of the size they feel like provided the controller knows what it’s doing.
Anything presented to the end user can just be real numbers. The end user doesn’t give a damn about sector sizes or NAND configuration, want want an estimate of how many cat pictures they can store on their drive.
There is some overhead but you don’t solve that by using 1024 for reporting disk side. The overhead depends on fragmentation and the configuration of the file system when the drive was formatted.
Even on the hardware level, QLC NAND cell will operate in 8KiB pages. The 1024 system based on heads/cylinders/sectors is no longer relevant for most people. Put the exact size in sector compatible bits in the advanced UI but give the users something they can actually use.