Article View: comp.std.misc
Article #101Re: Binary data formats
From: Esmond Pitt
Date: Mon, 04 Dec 1989 06:54
Date: Mon, 04 Dec 1989 06:54
31 lines
1557 bytes
1557 bytes
In article <4021@hydra.gatech.EDU> gg10@prism.gatech.EDU (Galloway, Greg) writes:
>
>Problem:
>
>* Integer data (to my knowledge) only consists of two types:
>
> - Big-endian, or Intel-type: Most significant byte first (16 or 32 bit)
> - Little-endian, or Motorola-type: Least significant byte first
(A) This seems to be back to front. LSB-first is big-endian, from the
point of view of memory addresses.
(B) I may be the 10,000th person to state this, but there is also the
issue of 'short' order within a 'long', which is either {LSW,MSW} or
{MSW,LSW}. Permute this with the byte order and you get 4
combinations, at least 3 of which (I believe) are seen in practice:
{LSW{LSB,MSB},MSW{LSB,MSB}} /* 'big-endian' */
{MSW{LSB,MSB},LSW{LSB,MSB}} /* no instances known to me */
{LSW{MSB,LSB},MSW{MSB,LSB}} /* PDP-11 */
{MSW{MSB,LSB},LSW{MSB,LSB}} /* VAX, Intel */
For 64-bit data there are 8 possibilities, and so on ...
--
Esmond Pitt, Computer Power Group
ejp@bohra.cpg.oz
--
Esmond Pitt, Computer Power Group
ejp@bohra.cpg.oz
Technical Details
Message-ID:
<221@bohra.cpg.oz>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!watserv1!watmath!att!rutgers!usc!samsung!munnari.oz.au!murtoa.cs.mu.oz.au!ditmela!yarra!bohra!ejpReferences:
<4021@hydra.gatech.EDU>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!watserv1!watmath!att!rutgers!usc!samsung!munnari.oz.au!murtoa.cs.mu.oz.au!ditmela!yarra!bohra!ejp From: ejp@bohra.cpg.oz (Esmond Pitt) Newsgroups: comp.std.misc Subject: Re: Binary data formats Keywords: file formats, binary, integer, floating-point Message-ID: <221@bohra.cpg.oz> Date: 4 Dec 89 06:54:52 GMT References: <4021@hydra.gatech.EDU> Reply-To: ejp@bohra.cpg.oz (Esmond Pitt) Organization: Computer Power Group, Melb, Australia Lines: 31