# 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% chance, after all) but I failed.

So, is there any wide known pratical trick to remember what is the difference between big endian and little endian?

• I thin kyou are better off stating what endianess is and saying you can never remember which way round it is so you always google it
– jk.
Apr 4, 2012 at 11:44
• I too have problems remembering it and there are too many confusing mnemotechnic tricks. My only reliable help is to cast the endianness spell on google so that I get the Wikipedia article. Apr 4, 2012 at 12:49
• Funny coincidence - I only stumbled on this link today, and it's surprisingly relevant commandcenter.blogspot.com/2012/04/byte-order-fallacy.html Apr 4, 2012 at 14:56
• @Nevermind I stopped reading that article after the second paragraph. "Of interest only to compiler writers and people who have to deal with memory mapped to registers"? Besides the fact that that's an awful garden path sentence, it implies that code that deals with registers is an edge case. Try using a computer sometime without device drivers. Sep 16, 2015 at 1:11

I've always thought that it's defined the wrong way, and that's also the tip to remember it. As a non-native English speaker, I see "end" as the opposite of "start" (although obviously "end" can mean either end - the start end, or the end end). Anyway, I just remember that "it's defined the wrong way" :)

• In big endian, the most significant (biggest) byte is in the start.
• In little endian, the least significant (littlest) byte is in the start.

Or, referring to bit endianness:

• 128 64 32 16 8 4 2 1 is big endian, because it ends to the little.
• 1 2 4 8 16 32 64 128 is little endian, because it ends to the big.

Even though the usual use of the word endianness refers to how bytes are ordered within a word, its generic meaning refers to the ordering of individually addressable sub-components within the representation of a larger data item (as explained in Wikipedia).

• ahh, but the little-endian lilliputians started (cracked) their eggs at the little end so it is the right way round
– jk.
Apr 4, 2012 at 11:57
• -1: Endian-ness refers to bytes within a word, not bits within a byte. Apr 4, 2012 at 12:29
• @kdgregory - In the end, bit numbering is impacted within a word. Have you tried bit-field structs accross different endians? I agree that the answer has it wrong, though. Apr 4, 2012 at 12:54
• @Kdgregory: According to Wikipedia, endianness refers to the ordering of individually addressable sub-components within the representation of a larger data item. That's the generic case. There's also a notion of bit endianness. You're right in that the most common use of endianness refers to how bytes are ordered within a word, and my examples admittedly didn't reflect that. Replaced the first example with the common case. Apr 4, 2012 at 12:55
• @kdgregory: Since when is existence of hardware required to justify CS theoretical notions? But very well: 8051 has bit-addressable registers. Ada language allows specifying the appropriate bit order for data type representation (pdf). Transmission order of bits over a serial medium of course needs to define bit endianness. The fact that the usual use of "endianness" refers to a special case (bytes in words) doesn't invalidate its generic meaning. Apr 4, 2012 at 14:41

My own tip :

• big endian = big-end first ! (the first byte (lowest address) is the MSB)
• little endian = little-end first ! (the first byte (lowest address) is the LSB)
• Yes, this is the way I think of it: Big Endian "Starts at the BIG end", while Little Endian "Starts at the Little end". It's like a baseball bat, there are two ends of the bat, one is big, the other is little. It's really not that hard of a concept. Apr 4, 2012 at 12:29

The best way to remember this is that civilized peoples seek out variety and hence eat their eggs differently than they order their numbers. Whereas we write decimal digits starting at the big digits first (big endian), we eat soft boiled eggs from the little end (little endian).

• This answer is mostly non-technical, yet it was completely accurate and made me laugh. Good job.
– user22815
Aug 28, 2015 at 23:50

Big-endian numbers start at the "big end". Little-endian numbers start at the "little end".

Both are an allusion to the issue of where to start eating your egg, as per Gulliver's Travels.

In this case, "end" is not the opposite of start, it just means any extreme of a (rope|string|number|sequence), thus them not being called "big finishian" or "little finishian" (which would definitely be the opposite of "start").

• Indeed. And the easiest (and most fun) way of remembering is to go and read Gulliver's Travels. I guarantee you'll never forget which is which again! Aug 29, 2015 at 13:13
• You should put "start eating" in bold (also 72pt, <blink>), that's really the whole reason for all the confusion here. Oct 22, 2018 at 9:00

The easiest way for me to remember is to change the word “endian” into “startian”. Big startian integers start with the big end (e.g. most significant bytes come first), and little startian integers start with the little end (e.g. least significant bytes come first).

• Feel free to pronounce startian as /'stɑːr.ʃən/ or /'stɑːr.ti.ən/ (omit the /r/ for non-rhotic accents) Apr 28, 2016 at 3:35
• This is pretty clever, and easy to remember. Nov 10, 2019 at 5:13
• Yes, I use the adjective "frontian" but it is the same thing. May 24 at 18:46
• This doesn't make sense to me. The big end and little end is where you start. In the original story (Gulliver's Travels) about which end of the egg to break they don't call themselves "big-breakian" and "little-breakian". May 26 at 21:45

I never could remember which is "big-endian" and which is "little-endian" but knew the endianness of PowerPC and Intel x86 processors. Little has most of the letters in common with Intel, so Intel x86 is little-endian.

Of course that's only useful if you know the byte order of PPC and x86. On the other hand, you should now remember that Intel x86 = little-endian. And remember that x86 and ARM are very, very compatible even with totally different instruction sets.

In big endian : (Ascending order)

Low to high i.e.

0 | 1 | 2 | 3 ^ ^ Start End

In little-Endian : (Descending order)

High to low

i.e.

3| 2 | 1 | 0 ^ ^ Start End

• The question asked for a practical trick to remember which one. Apr 2, 2016 at 7:45

I'd put it this way: Big is beautiful!

Big == beautiful == right.
The right endianess is the one that you can read in a hexdump, which is the one that puts the most significant byte first, as any sane human does.

Little == ugly == wrong.
The hexdumps produced by this endianess are just so plain wrong that you run away screaming "Brains!". Maybe this is some kind of alien abomination, we can only speculate to the origin of this atrocity. Nevertheless, it exists, and we are stuck with it.

Pitty, it's not always the best variant that makes the race...

• `Little == ugly == wrong` ... "Even the smallest person can change the course of the future" -Galadrial, LOTR Nov 10, 2019 at 5:15