Re: A very quick, informal survey

From: Paul Hsieh (qed_at_pobox.com)
Date: 04/12/04


Date: 11 Apr 2004 20:21:36 -0700

Steven O. <null@null.com> wrote:
> I write documentation. The company I'm working for is developing a
> product that transmits data from one computer to another, and the
> order or sequence of data transmission is important.
>
> We need to specify whether the data transmission and storage is
> Big-endian or Little-endian. I've argued that, in addition to stating
> which it is, we need to explain what these terms mean. The
> programmers claim that any programmer worth their salt will know what
> these terms mean.

First of all your programmers are correct. However, that doesn't mean
you should not document it. The problem is that what Big-endian means
is dependent on the assumed word size. For example, if all your basic
data words are 16 bits, then Big-endian just refers to swapping the
high and low bytes. In 32-bits, it swaps the byte pairs, then
half-word pairs. In 64-bits it would reverse the 8 bytes.

If you do everything in Little-endian, then you should just say "its
all Little-Endian". Little-endian is always obvious and never suffers
from the ambiguities described above. If its Big-endian, then like
IBM, you have to painstakingly describe all the low level data formats
and which endian applies to each.

So whether or not the programmers are right depends entirely on which
convention you chose with your product.

> So, question:
> Do you know what the difference is between Big-endian or
> Little-endian?

I am a programmer with value > my salt. :)

> And if you are willing to share: What's your level of education
> (B.A./B.S, M.A./M.S, etc.)?

Masters in Mathematics.

> And were your studies formally in computer science, or did you study
> some related field (math, physics) instead? Or did you study
> something totally unrelated, like history?

I have a joint major in Math and comp sci, but I did not learn any of
this in school.
 

--
Paul Hsieh
http://www.pobox.com/~qed/
http://bstring.sf.net/


Relevant Pages

  • Re: RIFF subchunks
    ... the assumption that programmers won't need the details. ... Intel microprocessors always support little-endian addressing. ... RISC microprocessors can be configured for either big-endian or little- ... For a little-endian configuration, the least ...
    (microsoft.public.win32.programmer.mmedia)
  • Re: A very quick, informal survey
    ... > order or sequence of data transmission is important. ... > programmers claim that any programmer worth their salt will know what ... > Do you know what the difference is between Big-endian or ...
    (comp.programming)
  • Re: A very quick, informal survey
    ... > I write documentation. ... > order or sequence of data transmission is important. ... > programmers claim that any programmer worth their salt will know what ... > Do you know what the difference is between Big-endian or ...
    (comp.programming)
  • Re: A very quick, informal survey
    ... > order or sequence of data transmission is important. ... Many programmers who claim they understand these terms don't understand the ... programming experience (starting with pdp11 assembler as it happens). ...
    (comp.programming)
  • Re: A very quick, informal survey
    ... > order or sequence of data transmission is important. ... This is why most programmers don't write good end-user documentation, ...
    (comp.programming)