Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

shift depend on endianness?

Name: Anonymous 2008-01-26 14:55

I'm trying to make a little program endian-agnostic. Instead of using a union of a 32-bit integer and a byte array, I'm using bit shifts.

But I'm wondering, do the results of bit shifts also depend on the endianness? It doesn't seem like they do, but I wanted to be sure.

Name: Anonymous 2008-01-26 15:28

But I'm wondering, do the results of bit shifts also depend on the endianness? It doesn't seem like they do, but I wanted to be sure.

Name: Anonymous 2008-01-26 15:33

Try using your brain for once

Name: Anonymous 2008-01-26 15:35

>>3
You're right. It only too a few seconds to search Google and learn that bit shifts (in C/C++ at least) are endian-independent.

http://www.google.com/search?q=bit+shift+endian

Name: Anonymous 2011-02-18 20:35


Don't change these.
Name: Email:
Entire Thread Thread List