Re: Backwards File Dump
briggs_at_encompasserve.org
Date: 11/25/03
- Next message: Rob Young: "Re: Sun to use AMD Opteron - announcement expected Monday"
- Previous message: Bill Todd: "Re: Sun to use AMD Opteron - announcement expected Monday"
- In reply to: JF Mezei: "Re: Backwards File Dump"
- Next in thread: Tom Linden: "RE: Backwards File Dump"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 25 Nov 2003 15:45:14 -0600
In article <3FC3BB31.F0BE45FA@istop.com>, JF Mezei <jfmezei.spamnot@istop.com> writes:
> briggs@encompasserve.org wrote:
>> Left shift in _HARDWARE_ on a little endian machine will multiply by 2.
>
> But in reality, it shifts the bits to the right. Correct ?
No. In reality, it shifts the bits a micron and a half one way or
the other to the next cell in the memory array. That may be north,
south, east, west, up or down. Referring to it as right or left is
pointless at best.
> If you forget endianness for a minute, as far as I know, all memory adressing
> schemes have adresses that grow from 0 to a very large number. (ok, the 8086
> with segment registers may be a different story). Books have page numbers that
> gow from 1 to some large number, and when the book is opened, the page number
> on the left is lower than the page number on the right.
>
> The convention is to have lower numbered adresses first on the left, and
> higher number adresses last on the right, because on the western world, we
> read from left to right.
And in Hebrew, decimal numbers are written with the high order
digits on the left just like in English.
Both observations merit a big "so what?"
>> No. It does not. It is possible to write C code to determine the
>> endian-ness of the architecture you are running upon. That's because
>> C code permits aliasing.
>
> But for normal operations, it does shield you from endianness. The majority of
> windows weenies program without knowing what endianness is. The fact that a
> shift-left assembler operation on VMS would multiply by 2 (standard) indicates
> that even at the assembler level, there is some shielding of endianness since
> in reality, it is a shift to the right on little endian machines.
No. You are dead wrong.
By universal convention, a left shift is a shift toward positions
of greater numeric significance. Little-endian does not change that.
Little endian puts positions of greater significance at higher numbered
bits (or higher numbered bytes). It does not put high order bits
on the "right".
>> In real life there is no such thing as left and right in memory.
>
> If that were the case, how come DUMP lists the hex part from right to left,
> and the text part from left to right ? It should be consistent.
Stop. Read what I wrote. Understand what I wrote. Then shut up.
There is no left and right in memory.
John Briggs
- Next message: Rob Young: "Re: Sun to use AMD Opteron - announcement expected Monday"
- Previous message: Bill Todd: "Re: Sun to use AMD Opteron - announcement expected Monday"
- In reply to: JF Mezei: "Re: Backwards File Dump"
- Next in thread: Tom Linden: "RE: Backwards File Dump"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|