One of my old classmates just asked me this and I'm at a total loss. Google gave me a lot of definitions of endian-ness, but not the term for this special case. IS there even a term for this?
views:
96answers:
5What about 101, 111, 1001, etc, etc?
sberry2A
2010-02-09 06:05:19
I didn't mean to imply that was the only answer.
John Saunders
2010-02-09 06:13:01
@sberry2A: Those values would still be the same - endianness refers to *byte* order, not *bit* order.
Pat
2010-03-18 23:02:25
Not quite, see Dale Hagglund's answer. Big endian and little endian agree on the representation of a byte. They disagree on the arrangement of bytes to form multibyte quantities.
Ken
2010-02-09 09:40:40
A:
Palindromic, even though that term is usually used for numbers that have digits that are the same both ways.
Ignacio Vazquez-Abrams
2010-02-09 06:04:29
+4
A:
See palindrome. Consider, for example, a 32-bit integer as a sequence of four byte values when stored in memory. If the sequence of four bytes is a palindrome, then the it has the same integer value in both big- and little-endian. So,
- all 8-bit integers are palindromes,
- all 16-bit integers of the form AA (where A is a byte) are palindromes,
- all 32-bit integers of the form AAAA or ABBA (where A and B are bytes) are palindromes,
and so on. Historically, there have been architectures with mixed endianness (notably the VAX), but here I'm limiting myself to pure big- or little-endian representations.
Dale Hagglund
2010-02-09 06:10:14
They have (rarely) been platforms with stored the bytes of machine words in one endianness, but the words of the larger representations in the other. Called mixed endianness. So, for maximum generality, stick with all byte the same.
dmckee
2010-02-09 14:13:52
Thanks for pointing that out. I updated my response to mention mixed-endian architectures, and added the caveat that I'm discussing only pure big- and little-endian representations.
Dale Hagglund
2010-02-09 17:29:56