Skip to content
DevMeme
6642 of 7590
LowLevelProgramming Post #7277 · source on Telegram

Big-Endian vs Little-Endian Comic Showing Reversed Byte Order Communication

Description

A four-panel black and white comic titled 'BIG-ENDIAN OR LITTLE-ENDIAN'. An i32 character (representing a 32-bit integer) encounters a BE (Big-Endian) character whose speech is reversed: 'ME! EXCUSE ME! EXCUSE' and 'PROCESSOR? CENTRAL THE TO WAY THE ME TELL YOU COULD LOST. I'M'. In the third panel, i32 points and says 'THERE' and BE responds 'MUCH! VERY YOU THANK'. In the final panel, i32 says 'BRR... I CAN'T BELIEVE SOMEONE LIKES TO USE THESE FREAKS' as the BE character walks away. The comic brilliantly illustrates byte order differences by having the big-endian character speak with reversed word order

Comments

31
Anonymous ★ Top Pick The real nightmare isn't big-endian vs little-endian -- it's middle-endian PDP-11 byte order, which speaks like Yoda having a stroke
  1. Anonymous ★ Top Pick

    The real nightmare isn't big-endian vs little-endian -- it's middle-endian PDP-11 byte order, which speaks like Yoda having a stroke

  2. Anonymous

    This is why ntohl() exists: to translate from the sensible network big-endian to the chaotic-neutral little-endian freak show running on your x86 machine

  3. Anonymous

    Sure, the little-endian guy looks ridiculous, but wait until your cross-platform network packet hits prod and you realise the bytes have been break-dancing all along

  4. Anonymous

    After 20 years of debugging network protocols, I've concluded that endianness debates are just a clever distraction from the real problem: nobody remembers to call htons() until production crashes at 3 AM when your distributed system tries to talk to that one legacy SPARC server accounting refuses to decommission

  5. Anonymous

    When you're at a systems programming conference and realize the little-endian folks are just big-endian people who've been reading memory addresses backwards their whole career

  6. Anonymous

    You haven’t truly shipped cross‑platform until your magic 0xDEADBEEF shows up as 0xEFBEADDE on the lone ARM node and everyone insists the wire format is “obvious.”

  7. Anonymous

    Clap clap: little-endian processors hyping LSB-first, one byte at a time

  8. Deleted Account 10mo

    ym tsenoh noitcaer ot siht noitamrofni

  9. @TheFloofyFloof 10mo

    At my work we store a flammable liquid and oxidizer next to each other

    1. @mihanizzm 10mo

      Controlable self-destruction protocol

    2. @NickNirus 10mo

      bro works in a videogame istg

      1. @TheFloofyFloof 10mo

        We also store two chemicals next to each other that combust when combined

        1. @GarySKS 10mo

          I admire your self-control

          1. @TheFloofyFloof 10mo

            What's fun is the only thing stopping a fire every day is trust that the water washed all of chemical a out of the pitcher before grabbing chemical b

        2. @tokimonatakanimekat 10mo

          Rocketry?

          1. @TheFloofyFloof 10mo

            CIP/SIP. CIP caustic and Perisan A Used for cleaning and sanitizing the internals of the cider packing equipment (procarb, canner, hoses)

  10. @SamsonovAnton 10mo

    Either endianness has its pros and cons, depending on task. 🕊

  11. @abel1502 10mo

    Human languages use big-endian numbers nowadays only because our numeric system is of arabic origin, and they write right-to-left

    1. @hy60koshk 10mo

      It's much more useful to know the number of largest position first. Like when you see a price on an item: let's say you wanna buy some thing and anything under $219 suits you. You enter a shop, see that the item of interest is 3 figures and starts with 1, and you're like "Nice, I'm buying it", without proper acknowledgement of other two positions. And if you see it start with 3 or 4, you discard the purchase without the need to acknowledge two other positions. Or if you see it's $28?, it's too expensive and is discarded without the acknowledgement of the last digit. Now, when we buy the thing in cash, we need to find the corresponding coins or bills to pay. And again, it's much more convenient to start with greater numbers.

      1. @abel1502 10mo

        The key thing here is that uyou first need to see that it has 3 figures. This means you need a linear pass over the entire number before you canuse the first digit for comparison. There is no performance benefit to doing this in big-endian over little endian, since you'll be going over the entire number once anyway

        1. @abel1502 10mo

          Starting with the most significant part provides an advantage when it is immediately labeled with its magnitude: for instance, "one thousand three hundred twenty five"

          1. @abel1502 10mo

            So I agree that it makes sense in spoken numerals (and this is why most languages, to my knowledge, say numbers this way -- but also, these systems have nothing to do with arabic numerals, so my original point still stands)

        2. @hy60koshk 10mo

          it doesn't matter, I'll have to do that pass in both BE and LE, unless we add the number length at the start. But, I can _skip the acknowledgement_ of the figures. I don't read the whole 3453664, I just read 3,XXX,XXX, and only cognate the other 453,664 if I will see it necessary (except the case when I know beforehand that that's necessary).

          1. @abel1502 10mo

            You may do the same in little endian: XXX,XXX,3

            1. @abel1502 10mo

              In general, numeric operations like addition and multiplication are more efficient in little endian (since they don't require a preliminary linear pass and go in the natural direction), while others like subtraction (hence comparison) and division are as efficient, because they required a linear pass (to align the less significant edge) in big endian as well

            2. @hy60koshk 10mo

              Truth. But then we go back to the point that that would contradict the spoken order: even tho we can fast-forward the written text, we cannot do the same with speech, and it's more convenient to say the larger parts first. And my point is, we would have had the numbers written like this anyway. Babylonian and Roman systems had tens before ones (set aside the Roman subtraction that got set the other side). But I cannot disagree that Arabic origin did come in handy here.

              1. _ 10mo

                Are number written in little endian in arabic languages ?

                1. @azizhakberdiev 10mo

                  don't we already use arabic numericals?

                2. @azizhakberdiev 10mo

                  now that I think about it, there's no rule for numbers to be written right to left. In fact, the main reason why Arabian script is little endian because the letters are designed to connect towards left, similarly to our cursive where letters have tails on the right

  12. bur del lago 10mo

    this comic would've been peak if you could like mirror the image and still make sense

  13. @abel1502 10mo

    Now, obviously habit is an important factor -- there's a huge penalty to switching to a different format, which far outweighs any potential benefits -- but in principle, I stand by my point that little-endian is, mathematically, the natural notation

Use J and K for navigation