• Tonuka@feddit.org
    link
    fedilink
    English
    arrow-up
    5
    ·
    6 hours ago

    fun facts:

    bit stands for “binary digit”. “byte” is today meant to be 8 bits, but was originally just any arbitrary grouping of bits. SI prefixes are often used incorrectly with bytes: A kilobyte would be 1000 bytes, but is almost always used for 1024 bytes. To solve this, alternative binary prefixes are used: One Kibibyte (kiB) is exactly 1024 byte, and it continues with Gibibyte (GiB) and Tibibyte (TiB)

    • festnt@sh.itjust.works
      link
      fedilink
      English
      arrow-up
      2
      ·
      edit-2
      5 hours ago

      just some corrections:
      Kibibyte is KiB (though Kilobyte is kB, i believe because a capital K in SI is meant for a constant, though KB is used sometimes when people are using it to mean 1024 bytes, but never 1000);
      and TiB is Tebibyte instead of Tibibyte, since it’s a variant of Terabyte (first two letters are the same)

      also another fun fact: windows uses KB, MB, GB, etc with the old 1024 format, and that causes some issues like a 2 TB drive will show up as 1.82 TB in windows, because they’ve procrastinated adding an i to TiB for almost three decades

    • DacoTaco@lemmy.world
      link
      fedilink
      English
      arrow-up
      1
      ·
      edit-2
      5 hours ago

      I didnt think about it, but byte and short and the only names that kinda kept their definition of the number of bits.
      Byte is 8, short is 16.
      And then there is int…
      Its 16 on 16 bit systems and 32 on 32 and 64bit systems
      Long is silly too, it can be 32 or 64, and then there is long long which wth is that even suppose to be.

      Thats why c/c++ systems often ditch ‘int’ or ‘long’ and rather use things like ‘int8_t’, ‘int32_t’ or ‘int64_t’ to explicitly specify the amount of bits