Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!ll-xn!cit-vax!ames!amdahl!amdcad!tim From: tim@amdcad.UUCP (Tim Olson) Newsgroups: comp.sys.m68k Subject: Re: Intel vs Motorola Byte ordering Message-ID: <13957@amdcad.UUCP> Date: Thu, 4-Dec-86 17:15:32 EST Article-I.D.: amdcad.13957 Posted: Thu Dec 4 17:15:32 1986 Date-Received: Fri, 5-Dec-86 04:48:50 EST References: <1509@ihlpl.UUCP> <1335@hoptoad.uucp> <138@pembina.alberta.UUCP> <791@nike.UUCP> Reply-To: tim@amdcad.UUCP (Tim Olson) Organization: Advanced Micro Devices, Sunnyvale, California Lines: 34 In article <791@nike.UUCP> lamaster@pioneer.UUCP (Hugh LaMaster) writes: >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? I think a major reason why many microprocessors are little-endian is that they have an 8-bit ancestory, and to perform multi-precision arithmetic efficiently, they must index from the least-significant byte to the most significant. However, this is less of a problem with larger word size microprocessors, since multi-precision aritmetic is not used as much past 16 or 32 bits. One benefit of big-endian byte ordering on large (32-bit or more) wordsize machines is possible fast lexicographical comparison of character data with the use of integer compare instructions. Since the "direction" of MSB to LSB (B = byte) is the same as MSb to LSb (b = bit) strings may be compared a word at a time instead of byte-by-byte. (That is, as long as you use a sane character encoding, not something like the CDC display-codes ;-) -- Tim Olson Advanced Micro Devices "byte ordering preferences expressed in this article do not necessarily represent the views of this station or its management"