ihm@minnie.UUCP (Ian Merritt) (12/08/86)
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
paula@bcsaic.UUCP (Paul Allen) (12/12/86)
The question of how to order the bytes of a word must be a religious one. Where else but in the context of religion do you find such radically opposite opinions? I am basically non-religious, but I sure have a point of view about endedness! Here is the way I see it: The machine is there to serve me. I work best when things read left to right. I write numbers with the high order digit on the left. I want my machine to show me numbers that way. If the machine stores strings and numbers consistently in the same way, then it will have no problem displaying data in the way I want to see it. A little-endian machine stores the bytes of a string left-to-right and the bytes of a number right-to-left. Since a hex dump program has no knowledge of what type of data it is displaying, it cannot reverse the bytes of numbers for me. (And I'm not sure that I want it to, anyway!) So a little-endian machine whose purpose is to serve me forces me into mental gyrations just to interpret what it is saying! Baloney! Other things being equal, I will always choose a big-endian architecture like the 68000. It's just easier to deal with. Gee, this line of reasoning is so clear, so intuitively obvious. I wonder how it would look carved into a stone tablet? I know! I'll start a church! :-) :-) :-) -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Paul L. Allen | "Look out, men! He's armed!" Boeing Advanced Technology Center | "I've got a cheese grater, POB 24346 M/S 7L-44, | and I'm not afraid to use it!" Seattle, WA, USA 98124 | "Don't make it any harder (206) 865-3207 | on yourself, kid! Drop it!" ...!uw-beaver!ssc-vax!bcsaic!paula | "Eat mozzarella, copper!"