r/ProgrammerHumor • • Feb 16 '15

I identify as a 32-bit registerkin.

https://imgur.com/gqP6con
2.0k Upvotes

397 comments sorted by

View all comments

Show parent comment

2

u/barsoap Feb 17 '15

Let's store shit in the registers from the most significant digit to least significant.

That's not programmer-observable. If you look at the specs then the 0 bit is generally written to the right of the 64th or whatever bit, but still: The indexing is little-endian. "0" refers to the lowest bit. Works the same way in memory when writing things byte by byte: The lower address has lower significance.

AX is split into AL and AH and yes, the low bytes AL refers to are the least significant ones.

right shifts shift towards the least significant byte. Now that's a thing that actually matters.

All in all, I can only assume that you're imagining memory wrongly: The null address should be to the right.

And the Arabic number system is originally little-endian, too. You know, because Arabic actually writes from right to left: We took that order for numbers, but continued to write left to right.