Re: How to get certain bits from a value?
@SuperKoko: not on most implementations, but on all (I`ve seen, of course).
So if you say its theoretically possible, let´s put it the other way around: are you aware of any implementation that does mix up the bit order?
I just wanna be aware, if I happen to have to deal with such an implementation.
Re: How to get certain bits from a value?
Quote:
Originally Posted by Wild Thing
The byte order may vary, depending on your usage of char, int or long, but not the bit order.
It is completely at the compiler vendor's discretion. While I agree that it is unlikely that P or A will endup being the least or most significant bit, there is no prescribed way in which a compiler must arrange the data.