This is a computer architecture topic and it has been a while for 
me, so please feel free to correct me.  Basically, it is how multibyte 
values are stored in a particular computer architecture.  For instance, in 
big endian, the "last byte, has the most significant byte", and in little 
endian the "last byte, has the least significant byte".

         Given that a byte is 8 bits.
         Given an integer 64932  (2 bytes)
         This converts to

1111 1101   1010 0100
in binary.

In a little endian architecture, the data would be stored like
1111 1101   1010 0100

         One machine would store this value from "left to right" and the 
other would store it from "right to left".  In a big endian architecture, 
the data would be stored like

1010 0100   1111 1101

         Needless to say, this has caused much pain in the world.  It is 
purely a big religious war as to "which is better".  Also, one might 
quickly add "well if this is true, wouldn't all socket programming be 
borked?!?"  No.  They force you to convert back to "network form" vs "host 
form".  I believe network form is big endian, but not that it 
matters.  Everyone converts it to this form in C (or any other language) 
before it hits the network, so there is still cross OS
compatibility.

Now, looking at 42, it seems to be this in binary....

alone it is 101010, but in a byte, it would look liks

0010 1010

Maybe I got something mixed up?  Maybe with a 7 bit byte then it is
010 1010

At 10:05 AM 11/19/01 -0500, Matthew Tayler wrote:
>Ok dumb question of the day, what do you mean by Big Endian & Little Endian
>please ?
>
>Priscilla Oppenheimer wrote:
> >
> > At 10:12 PM 11/16/01, Kane, Christopher A. wrote:
> > >Someone was a Douglas Adams fan?
> >
> > Of course! Also another cool thing about 42 is that it's a
> > palindrome (the
> > same backwards and forwards in binary) and avoided the Little
> > Endian/ Big
> > Endian wars!
> >
> > Priscilla
> >


-Carroll Kong




Message Posted at:
http://www.groupstudy.com/form/read.php?f=7&i=26704&t=26538
--------------------------------------------------
FAQ, list archives, and subscription info: http://www.groupstudy.com/list/cisco.html
Report misconduct and Nondisclosure violations to [EMAIL PROTECTED]

Reply via email to