Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!rutgers!mit-eddie!genrad!decvax!decwrl!pyramid!voder!apple!turk From: turk@apple.UUCP (Ken "Turk" Turkowski) Newsgroups: comp.arch Subject: Re: byte order and positional number systems Message-ID: <396@apple.UUCP> Date: Wed, 21-Jan-87 20:47:25 EST Article-I.D.: apple.396 Posted: Wed Jan 21 20:47:25 1987 Date-Received: Thu, 22-Jan-87 04:07:13 EST References: <760@orcisi.UUCP> <2@ipmoea.UUCP> Reply-To: turk@apple.UUCP (Ken "Turk" Turkowski) Organization: Apple Computer Inc., Cupertino, USA Lines: 32 Big or little-endian ordering makes more sense if you think of the numbers being fractions or integers, respectively. On a big-endian system, the most natural way to a number in terms of its digits is as: d d d d d ... -1 -2 -3 -4 -5 The indices are associated with powers of the radix, so here the numbers are considered to be fractions, having a value less than 1. For brevity, we may eliminate the minus signs, or start the digit indexing at 0, so that the following variants exist: d d d d d ... d d d d d ... d d d d d ... 1 2 3 4 5 0 1 2 3 4 -0 -1 -2 -3 -4 Whereas on a little-endian system it is most natural to have the digits indexed in the following [more familiar] way: ...d d d d d 4 3 2 1 0 as is suitable for an integer. For communication purposes, the digit with index closest to 0 is the one that is transmitted first. If the base of the digit is 2, then we have big- or little- endian BIT ordering, whereas if the base of the digit is 256, we have big- or little-endian BYTE ordering. -- Ken Turkowski @ Apple Computer, Inc., Cupertino, CA UUCP: {sun,nsc}!apple!turk CSNET: turk@Apple.CSNET ARPA: turk%Apple@csnet-relay.ARPA