Xref: utzoo comp.arch:7750 comp.misc:4590 comp.lang.misc:2435 comp.protocols.misc:434 Path: utzoo!utgpu!watmath!clyde!att!rutgers!mailrus!cornell!uw-beaver!microsoft!w-colinp From: w-colinp@microsoft.UUCP (Colin Plumb) Newsgroups: comp.arch,comp.misc,comp.lang.misc,comp.protocols.misc Subject: Re: "big endian" and "little endian" - first usage for computer Message-ID: <182@microsoft.UUCP> Date: 4 Jan 89 22:17:08 GMT References: <170@microsoft.UUCP> <4008@hubcap.UUCP> Reply-To: w-colinp@microsoft.UUCP (Colin Plumb) Organization: Microsoft Corp., Redmond WA Lines: 30 In article <4008@hubcap.UUCP> hutch@delft writes: >Actually, where most little-endian machines screw up is storing the >bits in the byte in the wrong order. It is good to hear that somebody got it >right and stored a one as 100000...0000 rather than 00000001000...000. >(That is what you meant wasn't it?). Note that this implies one >multiplies by 2 by using a RIGHT shift (else there is an inconsistancy >in the little-endian view in the registers)! The Inmos sounds interesting. Sorry, no. Little endian means that if two addressed objects (on the Trasnputer, the smallest object that can be addressed is a byte) are part of the same number, the object (byte) with the lower address is less significant. Note two things: -> There is no ordering implied on bits within bytes; a byte is an atomic object, and you can't say which bit of it comes "first." (Of course, in serial communications, the other site of the Holy War, this is significant.) -> Both big- and little-endian types agree that more significant bits should be to the left, conceptually (the Arabic heritage, remember?); they *don't* agree on whether addresses increase left-to-right (big-endian) or right-to-left (little-endian). See On Holy Wars and a Plea For Peace for more diagrams. A one is stored as 00000000 00000000 00000000 00000001, with the bytes' addresses being base+3 base+2 base+1 base+0. Thus, it is impossible for a byte-addressed machine to store the bits in a byte in the wrong order, unless it has bitfield instructions or some such bit-addressing kludge. -- -Colin (uunet!microsof!w-colinp)