Download presentation
Presentation is loading. Please wait.
1
Big-Endians Little-Endians and Bi-Endians
Unfortunately there is not a universal standard for how the bytes in a word are stored in computer memory or how the bits are ordered in each byte. Byte Ordering - Suppose we are to store the 32-bit hexadecimal word AB1032FE into a byte addressable memory. Address Value Address Value AB FE FE AB This mapping is called big-endian since it stores the word with its most significant byte in the lowest address This mapping is called little-endian since it stores the word with its least significant byte in the lowest address
2
Big-Endian Address Map Byte Addr Little-Endian Address Map
For byte-addressing the order is immaterial. An issue arises when we want to reference a multibyte word with a single address. The Intel 80x86, Pentium II, VAX and Alpha are little-endian machines. Other such as the IBM 370/390, the Motorola 680x0, and Sun SPARC are big-endian systems. The PowerPC allows both modes and is said to be bi-endian. struct{ int a; //0x1112_1314 int pad; // double b; //0x2122_2324_2526_2728 char* c; //0x3132_3334 char d[7]; //'A','B','C','D','E','F','G' short e; //0x5152 int f; //0x6161_6364 } s; A B C D E F G 00 08 10 18 20 Byte Addr Big-Endian Address Map 00 08 10 18 20 A B C D E F G Byte Addr Little-Endian Address Map
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.