This article is more than 1 year old

What the Hell is… an Endian?

There's big ones and there's little ones, y'know

Updated When The Register first started as an email newsletter nearly five years ago, our motto was "The only good Endian is a dead Endian." But readers keep asking us questions such as "What is an Endian"? One of our readers has been good enough to provide us with a clear explanation of the topic. And another reader, has added his comments, which we've now put at the end. Reader Number Three has tipped in too. Thanks David. Er... that's it. Reader One Big Endian and Little Endian refer to how multi-byte operands are laid out in memory. Something like left-to-right versus right-to-left. Either scheme works fine, but any given combination of operating system, application sources, and application data files tend to want only the scheme they were initially programmed for. This is a historical accident of which chip, minicomputer, or mainframe the OS was initially written for. The term comes from Gulliver's Travels, where two warring societies can't stand the fact that their neighbors open up their hard-boiled eggs from the other (wrong) end. Like other recently-designed instruction sets (eg Mips, PowerPC, and recent Alphas), IA-64 supports both big- and little-endian memory conventions so that no OS communities are repelled and locked out by that issue. The hardware is neutral. But the software on top of it, the OS and compilers and utilities and file system and applications and data files, are still all one flavor or the other. PA-RISC's software base is all big-endian, whereas most other announced users of Merced are all little-endian. A side effect of this is that HP won't be sharing any software (even compilers or applications or Unix) with the rest of the Merced-based industry. SGI is now switching from MIPS to IA-64, with IA-32 as a stepping stone, and is consequently forcing its user base to switch from big-endian software conventions to little-endian (or to switch from SGI to HP or Sun). Merced's support for both forms of software endian-ness is important for HP, but this is technically trivial. Reader Two The phrase "endian" comes from a fairly well known (and amazingly short and lucid) paper titled "On Holy Wars and a Plea for Peace" by Danny Cohen of USC. It was published as Internet Engineering Note IEN137 on 1-April-1980, and was in IEEE Computer in October 1981. It was originally written for one of his graduate classes; twenty years old and still relevant. here is the text BTW - you didn't mention that Sun (the great satan of Solaris) is porting to Merced, too, and that Sun is traditionally big endian. Reader Three I can't believe that neither of the readers who sent you big endian/little endian descriptions actually described the difference! It's simply this: If the computer holds a number that's too large to be recorded in one byte, the question is whether the bytes are stored in linear memory with the most significant bits at the beginning and the least significant bits at the end, or vice versa. It's the difference between remembering the number "three hundred twenty-one" as 321 or 123. Each method has certain advantages and disadvantages. Whew! And I thought I'd only use my computer science background on Jeopardy :) ® Other What the Hell is... What the Hell is... Camino and Rambus?

More about

TIP US OFF

Send us news


Other stories you might like