• LaughingFox@lemmy.world
    link
    fedilink
    English
    arrow-up
    5
    arrow-down
    1
    ·
    1 year ago

    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.

    • cjf@feddit.uk
      link
      fedilink
      English
      arrow-up
      12
      ·
      edit-2
      1 year ago

      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.

      • Pxtl@lemmy.ca
        link
        fedilink
        English
        arrow-up
        9
        ·
        edit-2
        1 year ago

        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.

      • FooBarrington@lemmy.world
        link
        fedilink
        English
        arrow-up
        4
        ·
        1 year ago

        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.

      • Alonely0 🦀@mastodon.social
        link
        fedilink
        arrow-up
        0
        ·
        1 year ago

        @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.