views:

96

answers:

5

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?

A: 

The answer is, "A byte".

John Saunders
What about 101, 111, 1001, etc, etc?
sberry2A
I didn't mean to imply that was the only answer.
John Saunders
@sberry2A: Those values would still be the same - endianness refers to *byte* order, not *bit* order.
Pat
A: 

Binary palindrome?

http://dynet.com/palin/

sberry2A
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
A: 

Palindromic, even though that term is usually used for numbers that have digits that are the same both ways.

Ignacio Vazquez-Abrams
+1  A: 

how about zero :-)

Mike Two
How about -1? :-)
paxdiablo
and 0x1111, 0x2222, 0x3333 ... (or the equivalent sized to the storage employed)
dmckee
+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
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
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