Crossposted from https://programming.dev/post/56336053

nyaaa bytes you

all 6 comments

sorted by: hot top controversial new old
[–] 2 points 4 hours ago

What about word, doubleword, quadword? (though some naming conventions use halfword for 16 bit and word for 32 bit)

  • source
  • [–] 5 points 6 hours ago (2 children)

    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)

  • source
  • hideshow 2 child comments
  • [–] 2 points 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

  • source
  • parent
  • [–] 1 point 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

  • source
  • parent
  • [–] 6 points 20 hours ago

    I'd hate to see a kilobyte. Let alone a megabyte or gigabyte or terabyte or...

  • source
  • [–] 7 points 1 day ago

    Himbxsadecimal

  • source