Re: Cohen's paper on byte order
From: Mok-Kong Shen (mok-kong.shen_at_t-online.de)
Date: 05/23/03
- Next message: Henrick Hellström: "Re: Triple AES (3AES)"
- Previous message: Andrew Swallow: "Re: Virtual Matrix Encryption"
- In reply to: Paul Schlyter: "Re: Cohen's paper on byte order"
- Next in thread: Douglas A. Gwyn: "Re: Cohen's paper on byte order"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Fri, 23 May 2003 11:07:20 +0200
Paul Schlyter wrote:
>
[snip]
> I've done some Google searches too, and haven't found
> anyhting which defines endian-ness except when storing
> numbers in computer memory.
For a two byte integer, if it is in the logical view
of the programer of the form B1 B2, where B1 has higher
numerical significance, then on an little-endian storage
it is stored as B2 B1 (considering the sequencing
starting from the lower address) and on big-endian
it's B1 B2. This is analogous to the case of decimal
digits, isn't it? (Consider the byte as corresponing
to a digit.) As I said previously, the endian issue
arose from the difference of hardware produced by the
manufacturers. I guess that the term endian wouldn't
be in use, if there were not such difference. For
everybody would be only conscious of one convention
of reading a number and that is defacto big-endian.
> OF COURSE direction of reading has nothing to do with the value of
> the number! But it's only the FIRST time you say that! Earlier you
> merely said "Direction of reading doesn't matter", and since we were
> discussing endian-ness I interpreted it as "Direction of reading
> doesn't matter to the endian-ness". Now you added the clarification
> "...the value of the number". That's an important clarification, and
> it's the first time you've included that clarification.
Both interpretations are o.k. Didn't I say (though
unfortunately with a grave typo) that the direction of
reading doesn't affect the location of any digit
in the sequence of digits representing a number. Now
it is that location that determines the power of
the base that is to be associated with that location.
How to determine that power is determined by the
endian of that number (a convention that the communication
partners have implicitly/explicitly agreed upon).
Where does the 'direction of reading' affect the
'endian' in the above chain of reasoning??
>
> > You have to read all the digits
>
> :-) ....of course.....
>
> > and have mentally the same image as that on paper in your mind.
>
> :-) ...no, that's not necessary! I do not think a computer has
> "mentally the same image as that on paper in its 'mind'", yet
> the computer is capable of figuring out the value of a number if
> you feed it a string of digits.
Doesn't one say that a computer has a 'memory'? It has
also to read all the digits (or bits), determine the
locations of the digits to know the numerical significance
of these (according to endian) and finally evaluate
the number.
> > Now from the positions you get the power of the base
> > associated with these and can compute the value of
> > the number.
>
> You could do it that way, yes, but there are other ways too. For
> instance, you can just consider the string of digits (or bytes) you
> read, in reading order, and that combined with the information about
> the endian-ness of that string will be enough to uniquely determine
> the value of the number.
Shortcuts are always conceivable. It is 'equivalent'
or amounts to the same thing, as one would say.
> "My" definition simply says the number is little-endian if you
> read the LSD first, and "big-endian" if you read the MSD first.
> There's no need to reconstruct an image of digits on paper -- all
> that matters is the order in which you read the digits, not their
> position if printed on paper.
But now, given a particular digit sequence on paper,
a digit can be LSD or MSD depending on your reading
direction. You may like to read it on Monday from
left to right and on Tuesday from right to left.
(Note that we have so far not restricted the freedom
of reading directions in our debate.) The number will
not have a unique value. If someone tells you that the
number he gives you is big-endian, you wouldn't know
its value, unless he 'additionally' tells you the
proper reading direction, right?
M. K. Shen
- Next message: Henrick Hellström: "Re: Triple AES (3AES)"
- Previous message: Andrew Swallow: "Re: Virtual Matrix Encryption"
- In reply to: Paul Schlyter: "Re: Cohen's paper on byte order"
- Next in thread: Douglas A. Gwyn: "Re: Cohen's paper on byte order"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|