Total members 10262 | Gratitudes |It is currently Thu May 24, 2012 4:07 am Login / Join Codemiles


All times are UTC [ DST ]




Post new topic Reply to topic  Quick reply  [ 1 post ] 
Author Question
 Question subject: Little & Big Endian representations
PostPosted: Mon Jun 11, 2007 1:26 pm 
Offline
Beginner
User avatar

Joined: Wed Mar 28, 2007 1:17 pm
Posts: 118
Location: Cairo-Egypt
Has thanked: 0 time
Have thanks: 5 time

:o Little & Big Endian

The adjectives big-endian and little-endian refer to which bytes are most significant in multi-byte data types and describe the order in which a sequence of bytes is stored in a computerط£آ¢أ¢â€ڑآ¬أ¢â€‍آ¢s memory.

In a big-endian system, the most significant value in the sequence is stored at the lowest storage address (i.e., first). In a little-endian system, the least significant value in the sequence is stored first. For example, consider the number 1025 (2 to the tenth power plus one) stored in a 4-byte integer:

00000000 00000000 00000100 00000001

Address Big-Endian representation of 1025 Little-Endian representation of 1025

00 00000000 00000001
01 00000000 00000100
02 00000100 00000000
03 00000001 00000000



Many mainframe computers, particularly IBM mainframes, use big-endian architecture. Most modern computers, including PCs, use the little-endian system. The PowerPC system is bi-endian because it can understand both systems.

Converting data between the two systems is sometimes referred to as the NUXI problem. Imagine the word UNIX stored in two 2-byte words. In a Big-Endian systems, it would be stored as UNIX. In a little-endian system, it would be stored as NUXI.

Note that the example above shows only big- and little-endian byte orders. The bit ordering within each byte can also be big- or little-endian, and some architectures actually use big-endian ordering for bits and little-endian ordering for bytes, or vice versa.

The terms big-endian and little-endian are derived from the Lilliputians of Gulliver's Travels, whose major political issue was whether soft-boiled eggs should be opened on the big side or the little side. Likewise, the big-/little-endian computer debate has much more to do with political issues than technological merits.


TOP
 Profile Send private message  
Reply with quote  
Post new topic Reply to topic Quick reply  [ 1 post ] 
Quick reply


  

All times are UTC [ DST ]


Users browsing similar posts

Users browsing this forum: No registered users and 1 guest



Jump to:  
Previous Question | Next Question 




Home
General Talks
Finished Projects
Code Library
Games
Tutorials

Java
C/C++
C-sharp
php
Script
JSP/Servlets
Ajax
ASP/ASP.net
Google SEO
Database
Communications
Phpbb3 styles
Photoshop tutorials
Flash tutorials
Find a job






Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
All copyrights reserved to codemiles.com 2007-2011
mileX v1.0 designed by codemiles team