[olug] Stupid Vim trick-Big/Little Endian

Matthew G. Marsh mgm at midwestlinux.com
Thu Apr 11 11:25:05 UTC 2002


On Thu, 11 Apr 2002, Brian Weber wrote:

> > -----Original Message-----
> > From: Brian Roberson [mailto:roberson at olug.org]
> >
> > not at all, you are absolutely correct, endian is a byte
> > ordering, just as you say, where little endian has the
> > ls-byte ( least signifigant byte ) in the lower address range
> > and big-endian is the reverse. let me try not to confuse
> > anyone here....
> >
> > If you have a 16 bit word ( 2 bytes ) , addressed 0x0 and 0x1
> > , where the value of these locations are 0x0 = 00000001 0x1 =
> > 00000011 depending on the endian, you can read the value of
> > that word as either 13 or 31
> >
> > ( little endian = 31 ; big endian = 13 )
> >
>
> 	In the never ending quest for knowledge, I will be the one to
> ask.  WHY.  I don't see the advantage in having one over the other.

The original reason had everything to do with hardware. As in flipflops
and serial busses. In early hardware you had no control over how your data
was coming out of a calculation (calculation as referring to a set of
logic operations performed by your usual assortment of logic ICs)
especially when you used one of the "microprocessor" type of logic arrays.

Because of this there were several attempts to standardize the method of
dealing with these outputs. Essentially everything was determined to
either come out LSB first or MSB first. Note that this only has relevance
when dealing with bytes, nibbles, or words, as single bits are both LS&MS
simultaneosly. So long as you knew from the spec sheet which bit comes
first you could design the rest of your circuits appropriately. In the
parlance you designed for either little endian or big endian output.

Over time several standards emerged which specified one style or the other
as in Networking outputs. Usually if you go back far enough you will find
that this is due to the most popular chipsets using a specified style and
everyone just following along. As is the case with most standards.

Most of this is also moot if you are dealing with parallel circuits but
those are truly rare beasties - bear in mind that your microprocessor in
what ever you have for a computer is essentially a serial processing
device from the bit level.

And the rest of the story is - as "they" say - history.

> ________________________________________
> If the grass seems so much greener on the other side, it's likely that
> the residents there are just full of S**!
>
> Brian Weber

--------------------------------------------------
Matthew G. Marsh,  President
Paktronix Systems LLC
1506 North 59th Street
Omaha  NE  68104
Phone: (402) 932-7250
Email: mgm at midwestlinux.com
WWW:  http://www.midwestlinux.com
--------------------------------------------------


-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_

For help contact olug-help at olug.org - run by ezmlm
to unsubscribe, send mail to olug-unsubscribe at olug.org
or `mail olug-unsubscribe at olug.org < /dev/null`
(c)1998-2002 OLUG http://www.olug.org

-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_




More information about the OLUG mailing list