Re: A very quick, informal survey
From: Paul Hsieh (qed_at_pobox.com)
Date: 04/12/04
- Next message: tmnet: "Can anyone help me on C++ question. tq"
- Previous message: Charles Richmond: "Re: Basic programming Question?"
- In reply to: Steven O.: "A very quick, informal survey"
- Next in thread: Arthur J. O'Dwyer: "Re: A very quick, informal survey"
- Reply: Arthur J. O'Dwyer: "Re: A very quick, informal survey"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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/
- Next message: tmnet: "Can anyone help me on C++ question. tq"
- Previous message: Charles Richmond: "Re: Basic programming Question?"
- In reply to: Steven O.: "A very quick, informal survey"
- Next in thread: Arthur J. O'Dwyer: "Re: A very quick, informal survey"
- Reply: Arthur J. O'Dwyer: "Re: A very quick, informal survey"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|