Mnemonic device for little/big-endian; or Fix My Brain

A place to discuss the science of computers and programs, from algorithms to computability.

Formal proofs preferred.

Moderators: phlip, Moderators General, Prelates

User avatar
Pesto
Posts: 737
Joined: Wed Sep 05, 2007 5:33 pm UTC
Location: Berkeley, CA

Mnemonic device for little/big-endian; or Fix My Brain

Postby Pesto » Mon May 16, 2011 11:03 pm UTC

Roy G. Biv
Every Good Boy Deserves Fudge
My Very Educated Mother Just Served Us Nachos*

These are a few well-known mnemonic devices I can think of off the top of my head (for colors of the rainbow, lined notes in treble clef and the planet names, respectively).

Here's the problem I'm having. I can never keep big-endian vs. little-endian numbers straight. I understand the concept just fine, but I can never remember which is which, and I can't think of a good mnemonic device to get this fact drilled into my brain properly. Can anyone help out?

* Sorry, Pluto. I like nine pizzas, too.

Goplat
Posts: 490
Joined: Sun Mar 04, 2007 11:41 pm UTC

Re: Mnemonic device for little/big-endian; or Fix My Brain

Postby Goplat » Tue May 17, 2011 1:56 am UTC

Big-endian = big end (digit of largest place value) comes first
Little-endian = little end (digit of smallest place value) comes first

Does it really need more of a mnemonic than that?

Moose Hole
Posts: 398
Joined: Fri Jul 09, 2010 1:34 pm UTC

Re: Mnemonic device for little/big-endian; or Fix My Brain

Postby Moose Hole » Tue May 17, 2011 4:43 pm UTC

On buffet night, the big indian comes first. On orgy night, the little indian comes first. If you want a similar mnemonic to what you've stated, then you should give some kind of word ordering to remember.

Here are a couple of mine that I learned in 8th grade General Science:
Kids Pass Class Or Fail General Science (kingdom phylum class order family genus species)
I Vote [X] Late 'Cause Days Matter (roman numerals)

User avatar
Izawwlgood
WINNING
Posts: 18686
Joined: Mon Nov 19, 2007 3:55 pm UTC
Location: There may be lovelier lovelies...

Re: Mnemonic device for little/big-endian; or Fix My Brain

Postby Izawwlgood » Tue May 17, 2011 4:47 pm UTC

Nonono, King Phillip Came Over For Great Sex.
My mnenomic for the order of eukaryotic transcription factor arrival was something like Die All Big Elephant Handlers
... with gigantic melancholies and gigantic mirth, to tread the jeweled thrones of the Earth under his sandalled feet.

userxp
Posts: 436
Joined: Thu Jul 09, 2009 12:40 pm UTC

Re: Mnemonic device for little/big-endian; or Fix My Brain

Postby userxp » Tue May 17, 2011 8:30 pm UTC

Big endian: big numbers end fist
Little endian: little numbers end first.

Alternatively: big-endian numbers start from the big end, little-endian numbers start from the little end.

Moose Hole
Posts: 398
Joined: Fri Jul 09, 2010 1:34 pm UTC

Re: Mnemonic device for little/big-endian; or Fix My Brain

Postby Moose Hole » Tue May 17, 2011 8:43 pm UTC

userxp wrote:big-endian numbers start from the big end, little-endian numbers start from the little end.
Ok, so the mnemonic is: Bitches erase new stuff freshly to bring elephants, losers eradicate nipple sock forks to leave eggs. Simple!

User avatar
Kirby
Posts: 199
Joined: Tue Mar 30, 2010 11:08 pm UTC

Re: Mnemonic device for little/big-endian; or Fix My Brain

Postby Kirby » Tue May 17, 2011 10:05 pm UTC

The resistor color codes: Bad Boys Ravage Only Young Girls But Violet Gives Willingly (black brown red orange yellow green blue violet grey white)

A bit raunchy, but I've never forgotten it. And I've never even really needed to memorize the color codes!

EvanED
Posts: 4331
Joined: Mon Aug 07, 2006 6:28 am UTC
Location: Madison, WI
Contact:

Re: Mnemonic device for little/big-endian; or Fix My Brain

Postby EvanED » Thu May 19, 2011 12:24 am UTC

So anyone have ideas of mnemonics for remembering that x86 is little-endian? I actually have need to know this fairly often and for some reason I can't get it to stick.

squareroot
Posts: 548
Joined: Tue Jan 12, 2010 1:04 am UTC
Contact:

Re: Mnemonic device for little/big-endian; or Fix My Brain

Postby squareroot » Thu May 19, 2011 2:26 am UTC

For the longest time, I couldn't remember hot=left, cold=right. I tried many things to remember it. The only thing that ever worked was thinking that, when placing the first letters in alphabetical order (CHLR), and then connected the letters corresponding, arching over, the lines wouldn't intersect. The funny thing is, I didn't expect it to work, but it did, and I never had a moment of faltering trying to remember it.
<signature content="" style="tag:html;" overused meta />
Good fucking job Will Yu, you found me - __ -

User avatar
Pesto
Posts: 737
Joined: Wed Sep 05, 2007 5:33 pm UTC
Location: Berkeley, CA

Re: Mnemonic device for little/big-endian; or Fix My Brain

Postby Pesto » Thu May 19, 2011 9:45 pm UTC

Oops, forgot about this thread.

Goplat wrote:Big-endian = big end (digit of largest place value) comes first
Little-endian = little end (digit of smallest place value) comes first

Does it really need more of a mnemonic than that?

You've hit on exactly the problem I have. The phrase "comes first" is meaningless to me in this context. Both byte orderings seem perfectly sensible to me, so much so that I have no concept of "first."

The concepts my brain can latch onto concretely are "Most/Least Significant Byte" and "low/high memory addresses." I suppose a mnemonic device that would help me would be one that maps a pairing of these concepts to its proper endian-ness.

Since people are listing their favorite mnemonics, I should probably share my own.

I Don't Particularly Like My Ass

This is a mnemonic for the first six musical modes. The seventh mode, dorian, isn't generally used so it wasn't included in the mnemonic.

A good mnemonic for a three-against-four rhythmic pattern is the phrase, "Pass the god damn butter."

Edit:
squareroot wrote:For the longest time, I couldn't remember hot=left, cold=right. I tried many things to remember it. The only thing that ever worked was thinking that, when placing the first letters in alphabetical order (CHLR), and then connected the letters corresponding, arching over, the lines wouldn't intersect. The funny thing is, I didn't expect it to work, but it did, and I never had a moment of faltering trying to remember it.

I learned a similarly bizarre mnemonic device for French diction in grad school. It makes no sense, but another guy in class with me repeated it so many times it just stuck. "è" is pronounced "eh", and "é" is pronounced "ay", and you can remember "é" is pronounced "ay" because the accent "points to Nova Scotia."

Moose Hole
Posts: 398
Joined: Fri Jul 09, 2010 1:34 pm UTC

Re: Mnemonic device for little/big-endian; or Fix My Brain

Postby Moose Hole » Fri May 20, 2011 2:46 pm UTC

Pesto wrote:The phrase "comes first" is meaningless to me in this context.
I had the same problem with, "Righty tighty, lefty loosey." Does the top of the screw go right, or the bottom? Clockwise and counterclockwise make a lot more sense for screws.

themandotcom
Posts: 64
Joined: Tue Jun 05, 2007 10:50 pm UTC
Contact:

Re: Mnemonic device for little/big-endian; or Fix My Brain

Postby themandotcom » Fri May 20, 2011 3:05 pm UTC

Moose Hole wrote:I had the same problem with, "Righty tighty, lefty loosey." Does the top of the screw go right, or the bottom? Clockwise and counterclockwise make a lot more sense for screws.

How often are you turning screws upside down? lol
e^pi*i=WHAT??

EvanED
Posts: 4331
Joined: Mon Aug 07, 2006 6:28 am UTC
Location: Madison, WI
Contact:

Re: Mnemonic device for little/big-endian; or Fix My Brain

Postby EvanED » Fri May 20, 2011 3:31 pm UTC

Righty-tighty is dumb. What works for me? The right hand rule from physics. Take your right hand, make a loose fist, and stick out your thumb. Note that your fingers are curling around in one direction. If you turn the screw in that direction, it will travel in the direction your thumb points.

Meem1029
Posts: 379
Joined: Wed Jul 21, 2010 1:11 am UTC

Re: Mnemonic device for little/big-endian; or Fix My Brain

Postby Meem1029 » Fri May 20, 2011 7:09 pm UTC

themandotcom wrote:
Moose Hole wrote:I had the same problem with, "Righty tighty, lefty loosey." Does the top of the screw go right, or the bottom? Clockwise and counterclockwise make a lot more sense for screws.

How often are you turning screws upside down? lol


Have you ever worked in a theater doing tech stuff? I would guess not. When hanging/focusing lights it is not uncommon to be twisting yourself into weird positions to be able to reach the screws. Same thing goes for some scenery building.
cjmcjmcjmcjm wrote:If it can't be done in an 80x24 terminal, it's not worth doing

Moose Hole
Posts: 398
Joined: Fri Jul 09, 2010 1:34 pm UTC

Re: Mnemonic device for little/big-endian; or Fix My Brain

Postby Moose Hole » Fri May 20, 2011 7:15 pm UTC

I've done a lot of upside-down tightening, usually for plumbing and sprinklers and junk. I just mean when I tried to tighten a screw, I didn't know which part of it goes right. Especially if it's pointed straight down and there is no top of the circle.

User avatar
Pesto
Posts: 737
Joined: Wed Sep 05, 2007 5:33 pm UTC
Location: Berkeley, CA

Re: Mnemonic device for little/big-endian; or Fix My Brain

Postby Pesto » Sun May 22, 2011 8:23 pm UTC

EvanED wrote:Righty-tighty is dumb. What works for me? The right hand rule from physics. Take your right hand, make a loose fist, and stick out your thumb. Note that your fingers are curling around in one direction. If you turn the screw in that direction, it will travel in the direction your thumb points.

:shock: Life changing revelation.

I mean, this isn't even practically useful for me, because I never had a problem with righty-tighty, and I never have to tighten screws, but the right hand rule is simply a much better mnemonic device.

Oh, and I think I just thought of a good mnemonic for little-endian.

in Little endian the Least significant bit is in the Lowest memory address.

You can pronounce it "LLL". Or just pretend you're Carl Sagan. </silliness>

User avatar
Kow
Posts: 195
Joined: Sat Apr 19, 2008 12:37 pm UTC

Re: Mnemonic device for little/big-endian; or Fix My Brain

Postby Kow » Thu Jul 28, 2011 7:13 am UTC

My problem with big and little endian is that to me, the end is on the right which is completely opposite of what it is.
Image


Return to “Computer Science”

Who is online

Users browsing this forum: No registered users and 9 guests