[Haskell-cafe] Re: Endianess
wnoise at ofb.net
Tue May 13 15:33:08 EDT 2008
On 2008-05-13, Jed Brown <jed at 59A2.org> wrote:
>> > Now I'm convinced that little endian is the way to go, as bit number n
>> > should have value 2^n, byte number n should have value 256^n, and so forth.
> It's not that simple with bits. They lack consistency just like the
> usual US date format and the way Germans read numbers.
Yes. I'm saying what should be, not what is. I'm saying one of those
ways is wrong, wrong, wrong. It usually doesn't matter in practice,
because writes to e.g. RAM effectively happen at byte-level or higher,
making the internal labels fairly arbitrary. It matters and can cause
confusion in actual serial protocols, of course, which have been making
a resurgence in recent years, though again, the bit order in these are
well understood. Just possibly wrong.
More information about the Haskell-Cafe