Forums

Big-Endian vs. Little-Endian

Started by Everett M. Greene August 20, 2004
"Tauno Voipio" <tauno.voipio@iki.fi.SPAMBAIT_REMOVE.invalid> writes:
> "Everett M. Greene" <mojaveg@iwvisp.com> wrote
> > At the risk of starting a flame war, which choice have people > > really made with regard to Little-Endian vs. Big-Endian for > > those processors where it's a design choice (ARM, PowerPC,...)? > > I'm asking in the context of using such processors in embedded > > applications where compatibility with anything in the outside > > world is not a factor. > > There is a slight advantage in little-endian: you can address > the least significant part of a longer item with the same > address as the original item.
And?
> In Intel 80x86 family, the lowest byte of a longword is > in the same address as the longword, which most often > is intuitively clear. This does not work in big-endian > architectures.
It may be intuitively clear, but for what purpose? How often do you wish to address the LSbyte of a multi-byte value?
"Peter Nachtwey" <pnachtwey@comcast.net> wrote:

>Hex dumps are things of the 80s.
...and the 60's, the 70's, the 90's, and the 00's... -- Dan Henry
On Sat, 21 Aug 2004 09:19:11 -0400, "John Harlow"
<sirsausage@hotmail.com> wrote:

>> There is a slight advantage in little-endian: you can address >> the least significant part of a longer item with the same >> address as the original item. > >But the hex dumps are harder to read! ;)
Use a proper dump program that dumps bytes from right to left as the VAX/VMS DUMP command did (since 1970's). Paul
Everett M. Greene ??:
> At the risk of starting a flame war, which choice have people > really made with regard to Little-Endian vs. Big-Endian for > those processors where it's a design choice (ARM, PowerPC,...)? > I'm asking in the context of using such processors in embedded > applications where compatibility with anything in the outside > world is not a factor.
network packets' header use the bigedian, but no need to call converting fuctions to convert the value in packet header if use bigedian machine BZ
Everett M. Greene <mojaveg@mojaveg.iwvisp.com> says...

>"Tauno Voipio" <tauno.voipio@iki.fi.SPAMBAIT_REMOVE.invalid> writes: > >> There is a slight advantage in little-endian: you can address >> the least significant part of a longer item with the same >> address as the original item. >> >> In Intel 80x86 family, the lowest byte of a longword is >> in the same address as the longword, which most often >> is intuitively clear. This does not work in big-endian >> architectures. > >It may be intuitively clear, but for what purpose? How >often do you wish to address the LSbyte of a multi-byte >value?
I do it all of the time, but I don't see having it at the same address as the longword as being any intuitively clearer. In fact, I find the opposite to be slightly more intuitive. How about 4-bit processors? I am sure that I am not the only one here who like them... Any opinions about Big-Endian vs. Little-Endian when using multiple nybbles to make bytes?
>>But the hex dumps are harder to read! ;) >> >> > > Hex dumps are things of the 80s.
Strange, I thought I was looking at one a few days ago :) Al
Al Borowski said...
> > >>But the hex dumps are harder to read! ;) > >> > > > > Hex dumps are things of the 80s. > > > Strange, I thought I was looking at one a few days ago :)
Me too. I've spent quite a bit of time looking at hex dumps in the last few months. Heck, I even added a hex dump routine to my embedded app so I could enjoy the luxury of hex dumps from some of our remotely-located and fairly inaccessible units. Casey
"Bill Zhao" <szbzhao@tom.com> wrote in message
news:cg8dqs$2sea$1@mail.cn99.com...
> Everett M. Greene ??: > > At the risk of starting a flame war, which choice have people > > really made with regard to Little-Endian vs. Big-Endian for > > those processors where it's a design choice (ARM, PowerPC,...)? > > I'm asking in the context of using such processors in embedded > > applications where compatibility with anything in the outside > > world is not a factor. > network packets' header use the bigedian, but no need to call converting > fuctions to convert the value in packet header if use bigedian machine
That partly depends whether the processor involved can read, or write, non-byte quantities at arbitrary addresses. Andrew
"Michael N. Moran" <mnmoran@bellsouth.net> wrote in message
news:WmJVc.9060$%n4.423@bignews6.bellsouth.net...
> Peter Nachtwey wrote: > > Hex dumps are things of the 80s. > > How sweet ... a newbie. ;-) > >
Hardly, I have been at this for at least as long as you. I just don't take pride in abusing myself looking at hex unless I must. The last hex dump I looked at was a couple years ago when there was a address line problem when bring up a board. However, bringing up a board doesn't take much time and chosing a big or little Endian CPU based on how it displays hex numbers for the hardware guys is short sighted. Peter Nachtwey
"Everett M. Greene" wrote:

>At the risk of starting a flame war, which choice have people >really made with regard to Little-Endian vs. Big-Endian for >those processors where it's a design choice (ARM, PowerPC,...)? >I'm asking in the context of using such processors in embedded >applications where compatibility with anything in the outside >world is not a factor.
I go with what the OS vendor choses so that I don't have to rebuild the supplied libraries. -- ======================================================================== Michael Kesti | "And like, one and one don't make | two, one and one make one." mkesti@gv.net | - The Who, Bargain