Odd "endianness" [was Re: RE: Base 64 posts to the list]

Chuck Guzis cclist at sydex.com
Fri Dec 9 12:50:50 CST 2016

On 12/09/2016 07:02 AM, Paul Koning wrote:

> Rather than "can't make up their mind", a good reason to have
> selectable endian processors is that the best choice may depend on
> the application.  So for embedded systems in particular, it's good to
> be able to pick which you want.

My quip was an attempt at levity.

One interesting aspect of the later ARM (e.g. Cortex M3) are the
"reverse" instructions:

REV reverses the byte order in a 32-bit words.  Thus, ABCD becomes DCBA.

REV16 reverses the byte order in each halfword of a 32 bit word, ABCD
becomes BADC.

REVSH reverses the byte order in the low-order halfword and sign extends
to 32 bits.  Thus ABCD becomes SSDC (with S symbolizing the extended
sign bit)

RBIT reverses the bit order in a 32 bit word.

So lots of choices for those who feel that variety is the spice of life.


More information about the cctalk mailing list