Dec. 11th, 2021

jaggedwolf: (Default)

ramble on a computering topic of your choice (via [personal profile] queenlua)

because that one doc still cracks me up, let's talk about endianness.

Let's say we're storing a 32-bit integer in a computer. It'll get stored as four 8-bit bytes, each with its own address in memory. Endianness is whether it's the most significant byte (big endian) or the least (little endian) significant byte stored at the smallest memory address. These images from Wikipedia probably illustrate it best:

As you can imagine, this decision doesn't matter within the same computer since it's going to be using that one format for reading or writing. Matters when transmitting, but there are defaults and ways of specifying formats, and so on. Honestly, I hadn't really thought about it since covering the topic in systems stuff, this literally never comes up in my day-to-day.

Then I read Gulliver's Travels for the first time this year. And get to the whole egg dispute between the little-endians and big-endians and go haha what a coincidence, and go wait, that's too convenient.

Because the byte-storage format was indeed named after the egg dispute in this note written in 1980, with a title of ON HOLY WARS AND A PLEA FOR PEACE and an appropriately dramatic first sentence of "This is an attempt to stop a war. I hope it is not too late and that somehow, magically perhaps, peace will prevail again."

I also enjoy that at the end of this note, Cohen points out that byte-storage endianness is orthogonal to egg-cracking endianness. Everyone can crack eggs their own preferred way, but Cohen thinks people ought to pick the same single format for their data. (Am now imagining an argument that the actual disagreements Swift were satiring are closer to bytes than eggs, pfft).

Profile

jaggedwolf: (Default)
jaggedwolf

Style Credit

Page generated Aug. 14th, 2025 08:42 pm
Powered by Dreamwidth Studios