• cobysev
    link
    fedilink
    English
    arrow-up
    172
    ·
    5 months ago

    For anyone who doesn’t want to do the conversion, that’s 17 days.

      • swag_money
        link
        fedilink
        English
        arrow-up
        2
        ·
        5 months ago

        what’s the general rule for translating negatives from binary? did you just do like 17 - 2 • (-1) or something?

        • Yardy Sardley@lemmy.ca
          link
          fedilink
          English
          arrow-up
          5
          ·
          5 months ago

          I used what known as 2’s compliment. Take the complement (flip all the bits - here that would give you 01110 which is 14) then add 1.

          • swag_money
            link
            fedilink
            English
            arrow-up
            1
            ·
            5 months ago

            thanks for the explanation! could you express it as a NOT operation plus one? like is that how it would be processed at a low level?

            • computergeek125
              link
              fedilink
              English
              arrow-up
              2
              ·
              edit-2
              5 months ago

              My low level is a tad rusty from when I learned the C side in school, but if I recall the not operator resolves as a single Boolean (0 or 1 in true C), whereas compliment comes back as however many bits you put in - a not operation per bit.

              In C, the not operator is ! and the compliment operator is ~

    • chuckleslord
      link
      fedilink
      English
      arrow-up
      57
      ·
      5 months ago

      It also has a max of 31 days possible. Which has… implications.

      • Trainguyrom@reddthat.com
        link
        fedilink
        English
        arrow-up
        16
        ·
        5 months ago

        Among many other duties I manage the safety and claims database for an outsourced industrial cleaning company and let me tell you, some of the plants my company works struggle to make it a week without an accident, meanwhile some will go years without an accident. We also have one plant which had its last accident during the Bush Administration. Its absolutely wild how much safety can vary from one industrial facility to another

          • PumpkinSkink
            link
            fedilink
            English
            arrow-up
            3
            ·
            5 months ago

            This is actually how chromatography works. The mobile phase is 0.1% formic acid and 0.3% blood of the innocent.

            • Cenzorrll
              link
              fedilink
              English
              arrow-up
              2
              ·
              5 months ago

              blood of the innocent

              Well, We work with what we have.

    • Phoenixz@lemmy.ca
      link
      fedilink
      English
      arrow-up
      41
      arrow-down
      1
      ·
      5 months ago

      Unless it’s a signed integer, then it’s -1 and they’re expecting something…