bit ordering and endianess
Posted
by Neeraj
on Stack Overflow
See other posts from Stack Overflow
or by Neeraj
Published on 2010-04-14T07:08:14Z
Indexed on
2010/04/14
7:13 UTC
Read the original article
Hit count: 186
I am reading a file byte-by-byte.
Say for example i have this byte: 0x41 (0100 0001) represented in hex.
Now, I want the first three bits of this byte, i.e (010).
I can use bitwise logic to extract the first three bits, but my question is will the first three bits be independent of endianess of the machine.(i.e they can't be 001)?
Thanks,
© Stack Overflow or respective owner