Thursday, October 9, 2008

Big-endian VS Little-endian

I've long been confused by these two concepts, because I didn't find a good way to remember.
Today I met with them again and finally know where they come from and then can easily remember because I think I found what they actually mean.
For little-endian, see this graph
For big-endian see this graph
What is endian?
It means the end. So big-endian means an end(start) with big value!
So byte in the low address has bigger value.
For little-endian, an end has little value!
So byte in the low address has small value.

Then we can remember.

For 16 bits and 32 bits endian, they are different.
In 32 bits endian, each 32 bits are treated as a whole as a number.

11 comments:

Anonymous said...

I appreciate what you are doing bro

Anonymous said...

thanks a lot.. this will help me a lot tomorrow 4 my computer architecture exam.

Anonymous said...

i was reading wiki and i understand nothing, but this make sanse ... thanks a lot...

Anonymous said...

great work dude short and sweet answer.......

Anonymous said...

Sorry, but since when is the lowest byte considered as an end? I've always seen lower bytes first in memory dump/printout.
In fact big endian is nothing more than big mistake. There's no good reason to create such convention. But there are reasons for not making such convention - as you mentioned if we take not 8-bits but 16-bits or 32-bits chunks we get something else for big endian while little endian stays always same.

José Lima said...

I think the convention of the Big-Endian comes from the ocidental way of reading things - from left to right, from up to down. Natural to us, not so straight for the machine.

Nobody said...

Finally I got it.
Thank you A LOT !!!!!!!!
Really appreciated it.

Anonymous said...

Thanks for ur help :)

Anonymous said...

Nice man!

Anonymous said...

madarchod lavadya...

Anonymous said...

I hate it.

There isn't one single good reason for big endian to exist at all.

But thanks for the partial explanation anyway.