Questions tagged [endianness]
16 questions
209
votes
11 answers
What is the advantage of little endian format?
Intel processors (and maybe some others) use the little endian format for storage.
I always wonder why someone would want to store the bytes in reverse order. Does this format have any advantages over the big endian format?

Cracker
- 3,153
- 5
- 19
- 20
52
votes
4 answers
Has Little Endian won?
When teaching recently about the Big vs. Little Endian battle, a student asked whether it had been settled, and I realized I didn't know. Looking at the Wikipedia article, it seems that the most popular current OS/architecture pairs use Little…

Ellen Spertus
- 728
- 1
- 6
- 13
24
votes
9 answers
Can I safely ignore byte order in networking?
I am developing a server-client application where the client will run on Windows and the server probably on Linux. Maybe I'll later port the client over to Mac and Linux, but not yet.
All home-computers these days run on little-endian. I googled a…

tkausl
- 594
- 6
- 13
19
votes
9 answers
Is there any practical trick to remember the difference between big-endian and little-endian?
I don't work every day with big-endian and little-endian problems and thus I find very difficult to remember which one is what.
Recently I got an interview asking the difference between the two; since I didn't remember I decided to "guess" (50%…

Emiliano
- 1,236
- 1
- 10
- 17
6
votes
2 answers
Processor architectures for testing C/C++ portability
Currently I'm working on a C/C++ code-base which is fairly portable, it can compile on most Unix like systems as well as MS-Windows (MSVC), using various popular compilers.
Previously I've found testing on different OS's and architectures can help…

ideasman42
- 873
- 6
- 18
5
votes
2 answers
Endianess ARM Assembly Confusion
I'm writing code using arm assembly language for college and the I'm really confused about endianess.
The default should be little endian but I'm sure the test string has been stored big endian. The first byte in memory at 0xA1000004 is 0x30 which…

richard davies
- 115
- 5
4
votes
1 answer
Endianness at bit level
I am learning the union and struct and I wrote the code below. What I do not understand is why the output is different when I change from a little endian to a big endian machine.
My understanding is that endianness is important when you have more…

user2296949
- 51
- 3
2
votes
3 answers
Is it worth supporting big-endian for a desktop-only application?
From what I've read (other questions on the site, etc...) the vast majority of desktop systems have little-endian architectures, and Windows doesn't even support big-endian. Now I'm wondering if it's even worth the extra effort to deal with…

Wingblade
- 207
- 2
- 6
2
votes
2 answers
Difference in endianness between operating systems
There is an assembler that I am writing that is located within the file asm.c located in this repository. It uses the instruction set located in the specs file to produce an output binary. (The program that would run this binary has not yet been…

LordCreepity
- 45
- 2
2
votes
4 answers
What is the use of MSB and LSB?
I have a hard time understanding the use of MSB (Most significant bit) vs. LSB (Least significant bit) and why they're used at all. It is my understanding that it has to do with Endianness, but I cannot get my head around it.
Basically: If I read a…

Benny Mose
- 147
- 1
- 1
- 6
1
vote
2 answers
C++ - BitVector logic
I have implemented a simple bit vector class. However, I have some problems with understanding, how to push data to it.
In a standard vector, push_back inserts new element et the end. A similar logic can be implemented for single bit.
However, I…

Martin Perry
- 141
- 5
1
vote
3 answers
What are the bytes between the MSB and LSB named?
I've searched around and can't find anything on what the middle bytes of a >16-bit integer are called, if anything. Are there standard names for these bytes?
E.g. the number 0x0D0C0B0A would have:
MSB ??? ??? LSB
0D 0C 0B 0A

paul
- 2,074
- 13
- 16
1
vote
1 answer
Little and Big endian confusion
Just to make sure if I understand this correctly. Is this right that little endian processors read the memory addresses from highest to the lowest address and where as a big endian processors suppose to read them from lowest to the highest…

cpx
- 369
- 1
- 3
- 13
1
vote
3 answers
Regarding little endian and big endian conversion
I have a query regarding big endian and little endian.
Basically the conversion is used to reverse the byte order in memory .
When we need to do the conversion, do we need convert each and every data types?

user2720323
- 991
- 3
- 12
- 11
0
votes
1 answer
Selecting the endianness of data in files generated by an embedded system
I have an embedded system running on a little-endian Cortex-M3. This system is able to accept packets from the network and reply to them. Now, I would like the system to start generating files. These files will then be downloaded and inspected with…

9a3eedi
- 2,101
- 3
- 23
- 29