• xenoclast@lemmy.world
    link
    fedilink
    English
    arrow-up
    16
    arrow-down
    2
    ·
    18 days ago

    It bothers me it’s not in 4 bit “bytes” even though I know it’s just a convention for computers

    • finitebanjo@lemmy.world
      link
      fedilink
      English
      arrow-up
      1
      ·
      17 days ago

      You can do all of math in binary, it isn’t just for computers. In fact, the proof for “Russian Peasant Multiplication” was written in binary.

      • ziggurat@lemmy.world
        link
        fedilink
        English
        arrow-up
        1
        arrow-down
        2
        ·
        edit-2
        17 days ago

        So you can do all mathematical operations in binary, but you can’t represent all numbers in binary like 0.3, which is a repeating number, and had the same issues as a number like 1/3 in decimal where you can’t avoid rounding errors

        It’s worth noting that 1/3 is also a repeating number in binary. 0.01010101…

        While 0.3 is in binary 0.0100110011001100…

        • finitebanjo@lemmy.world
          link
          fedilink
          English
          arrow-up
          2
          ·
          edit-2
          17 days ago

          I’m not sure what sort of point you think you’re making but 0.0100110011 in binary is only 0.065% off from 0.3, but how often would you organically encounter 0.3?

          Many fractions in decimal are also repeating numbers or very long trailing numbers, I especially encounter a lot when working with time which is base 60.

    • tetris11@lemmy.ml
      link
      fedilink
      English
      arrow-up
      9
      ·
      edit-2
      17 days ago

      Twos complement (invert the bits then add one), so its -15 days.

      Otherwise 00000 and 10000 would paradoxically both equal 0 and make bitwise equality checks very difficult.