Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!rutgers!sri-unix!hplabs!sdcrdcf!psivax!nrcvax!minnie!ihm From: ihm@minnie.UUCP (Ian Merritt) Newsgroups: comp.sys.m68k Subject: Big Endian vs Little Endian (was: Intel vs Motorola Byte ordering) Message-ID: <340@minnie.UUCP> Date: Mon, 8-Dec-86 13:21:11 EST Article-I.D.: minnie.340 Posted: Mon Dec 8 13:21:11 1986 Date-Received: Sun, 14-Dec-86 20:29:06 EST References: <1509@ihlpl.UUCP> <1335@hoptoad.uucp> <138@pembina.alberta.UUCP> <791@nike.UUCP> Reply-To: ihm@minnie.UUCP (Ian Merritt) Organization: The Frobboz Magic Dungeon Co., Inc. (Purveyor of bits and bytes) Lines: 81 Keywords: Little endian, Big endian, Intel, Motorola, Holy wars Ian H. Merritt >In article <138@pembina.alberta.UUCP> bjorn@alberta.UUCP (Bjorn R. Bjornsson) writes: >>In article <1335@hoptoad.uucp>, gnu@hoptoad.uucp (John Gilmore) writes: >>> If enough people are apathetic (e.g. don't complain), I will post a >>> great piece, "On Holy Wars and a Plea for Peace", which is the best >>> description of byte ordering problems I've ever seen. ...... >> > ..... >> .... and leaves out some, good arguments >>for the little endian side. I'm not unbiased either, but I certainly >>don't pretend to be. I'll elucidate, if this discussion gets of the >>ground again. >> >> Bjorn R. Bjornsson >> alberta!bjorn > > >I, for one, would like to hear some good arguments for or against >a particular byte ordering. It is my belief that there is no >intrinsic architectural reason for either one. However, I am an >unapologetic big-endian for two reasons: >1) A STANDARD is needed for the benefit of those of us who need >to move BINARY data files between machines of different types, >such as graphics and solids modeling data files; >2) Big Endian is easier to read for English speaking people >because characters and floating point are in the same order as >in English. (Has anyone ever wondered why we don't write 1 Million >as 000,000,1 ?) >But are there any intrinsic reasons for a particular order? Some >people seem to think so. What are they? > > Hugh LaMaster, m/s 233-9, UUCP: {seismo,hplabs}!nike!pioneer!lamaster Sorry to keep retransmitting bits of previous messages, but I believe they are germain to this reply. OK, I'll byte. I disagree that big endian is "easier to read for English speaking people", since characters are usually stored in ascending address byte order regardless of the cascade order of bytes into larger words. Granted that on machines like the PDP-10 where bytes are somewhat of an abstract concept which can be any length from 1 to 36 bits, character ordering can be a bit different, but that machine exists already and no matter what our argument, that's the way it is. That leaves numbers as the other type of data we store. It seems to me that numbers aren't English; they are mathmatical. If this is the case, what point is there in storing them in english order? In a consistently little endian machine, the lower order value is stored in the lower numbered address. Bits are always numbered as powers of two, so to get the value of any arbitrary bit, regardless of the word size, one need merely take two to that power. The counter argument is some mumbo jumbo about right to left ordering of addresses, but that is entirely arbitrary, and as mentioned in Marty Fouts' piece, can be represented in any order desirable to the viewer. I don't think it makes sense to shape the machine architecture just because of what "looks good" in a hex dump. That's what software is for. I would instead choose the little endian form because guarantees that accross the board, bit numbers extend into higher order bytes/words, from the lowest to the highest and always represent a power of two, and that consistently, the low order value is in the low address. This makes programming more straightforward, particularly when operating with data types larger than the machine's basic word size. This, coming from me, may sound ironic, since the Intel line is consistently little endian, and many of you have read my blasts of their microprocessor line. I should annotate this with the comment that given the choice of an otherwise stupid architecture that happens to be consistently little endian, vs a basically clean architecture such as the 68k that's mostly big endian, albeit not completely consistent, I would of course opt for the superior architecture, at the expense of what I consider the superior byte order. In conclusion, I would agree with Hugh LaMaster that this is a topic worthy of some discussion, but only for the sake of enlightment and interesting conversation; not with the expectation of proving any particular point. It's just not that important. -- uucp: ihnp4!nrcvax!ihm