A photo of a cake with 8 candles in a row. The first and fifth candle from the right are lit. The caption reads “Happy 17th Birthday”

  • ZILtoid1991@lemmy.world
    link
    fedilink
    arrow-up
    50
    ·
    6 months ago

    Old man’s last words on his 256th birthday: “Unhandled IntegerU8OverflowException, terminating application.”

        • ITGuyLevi@programming.dev
          link
          fedilink
          arrow-up
          1
          ·
          6 months ago

          I’m not seeing any trailing zeros if that is in little endian, you start little end first and it isn’t limited to a silly 8-bits, it can be used to represent numbers far larger than 255 if continued (though then it wouldn’t be representative of a byte and half the joke would be lost).

          • MaggiWuerze@feddit.org
            link
            fedilink
            arrow-up
            1
            ·
            6 months ago

            If you read from the right (as is implied by calling the result 17), there are 3 trailing zeroes:

            These would usually be omitted when writing like this. The fact they are not makes this 136

            • ITGuyLevi@programming.dev
              link
              fedilink
              arrow-up
              2
              ·
              5 months ago

              I think you missed the point, that I was making, albeit poorly (little endian still requires leading zeros when not transmitting in a byte format, otherwise you don’t know if the first on signal is for 1, 256, 1024, etc.) it’s all good though

              • MaggiWuerze@feddit.org
                link
                fedilink
                arrow-up
                1
                ·
                5 months ago

                How would 3 leading zeros in a byte help coming to the conclusion that this is supposed to be 17?

                I’m generally curious, sice theoretical informatics is already a good few years behind me :D

                • ITGuyLevi@programming.dev
                  link
                  fedilink
                  arrow-up
                  2
                  ·
                  5 months ago

                  In a normal byte format it wouldn’t help, the byte standard breaks off bits into 8 bit chunks and calls them bytes (I’m not trying to explain basics, just putting it there for background), little-endian excels at using the least number of bits to express larger numbers in a stream. If you wanted to send any number from 0-255 you only need 1 byte, for 256-512 you need two bytes (or 16 bits), in little-endian it can be represented in just 9 bits, or up to 1024 in 10 bits, etc.

                  Doesn’t matter for much to many people, but when the number gets big enough you can save a lot of bandwidth.

      • wewbull@feddit.uk
        link
        fedilink
        English
        arrow-up
        2
        ·
        6 months ago

        I was just thinking about what you’d see from the other side of the table.

    • ArrowMax@feddit.org
      link
      fedilink
      arrow-up
      22
      ·
      6 months ago

      Even in decimal, the most-significant digit is to the left. Binary in text form is no exception to this.

      Unless we are talking little-endian, which would start with the least-significant bit.

      • sfbing@lemmy.world
        link
        fedilink
        arrow-up
        2
        ·
        6 months ago

        Anyone who opens their egg on the small end deserves to be removed from our society.

    • yermaw@sh.itjust.works
      link
      fedilink
      arrow-up
      8
      ·
      6 months ago

      Now that you mention it it is pretty fucky, but in every textbook thats tried to teach me counting in binary its gone from right to left.

      • calcopiritus@lemmy.world
        link
        fedilink
        arrow-up
        13
        ·
        6 months ago

        It’s not. Numbers are arranged (both binary and base 10) with the most significant digit on the left.

        Whether you read the number from left to right or right to left is irrelevant and you can choose whichever one you want.

        But it is completely consistent with base 10 (normal numbers).

      • illpillow@lemmy.ml
        link
        fedilink
        arrow-up
        3
        ·
        6 months ago

        Same here. University told me the lowest bit is on the right, the highest on the left. Never questioned it.

    • adb@lemmy.ml
      link
      fedilink
      English
      arrow-up
      6
      ·
      edit-2
      6 months ago

      Binary exists in both big-endianLSb or little-endianMSb. In other words, both directions can be valid.

      As explained below: Endianness is specifically the order of bytes. I was under the impression that it also implied a specific order of bits but anyways, the correct terms for this discussion is Least/Most Significant bit order.

      • CannonFodder@lemmy.world
        link
        fedilink
        arrow-up
        4
        ·
        6 months ago

        Ya, but we pretty much always write it with most significant on the left. The endianness is more to do with the order transmitted when serialized. Or are there cases where people actually write it backwards?

        • adb@lemmy.ml
          link
          fedilink
          English
          arrow-up
          2
          ·
          6 months ago

          The way I see it, if you want to be pedantic about it (it being a joke photo, so potentially unintentionally reversed by the camera, of a cake which is in 3d space and can be seen in both directions) you might as well do it properly and acknowledge that different orders exist for bits.

          Indeed writing conventions are also a good point, however this is not writing. People actually working at bit level are probably more likely to see bits on a scope (so in both LSb or MSb order) than as 1 and 0s written on a piece of paper or a screen.

    • BlackVenom@lemmy.world
      link
      fedilink
      English
      arrow-up
      2
      ·
      6 months ago

      The people saying right to left is normal are either Australian or mirror universe folks.

      At least I thought that until I looked up ascii conversations and then just random converters … How have I forgotten this? The pic is right…

  • Iron Lynx@lemmy.world
    link
    fedilink
    arrow-up
    2
    ·
    5 months ago

    Related: I once got onto my feed a post of a tale of someone who had a child on his 19th birthday, so for his 20th birthday, and the child’s 1st, they had two balloons celebrating their 20th birthdays.

    • Bricked@feddit.orgOP
      link
      fedilink
      arrow-up
      1
      ·
      6 months ago

      The candles are only available in packs of 8. It’s the smallest addressable unit of wax in many cake architectures

      • humanamerican@lemmy.zip
        link
        fedilink
        arrow-up
        1
        ·
        6 months ago

        Last birthday party I was at I just wanted a nibble of cake but they told me I had to take one or more bites.