program logic based on endianness
- From: sam_cit@xxxxxxxxxxx
- Date: Fri, 10 Aug 2007 05:07:44 -0700
Hi Everyone,
I have a program unit which does >> and << of an integer which is of
4 bytes length. The logic of shifting and action based on the result,
assumes that the system is big-endian.
Accordingly, if i need the program to work fine in a little-endian
system. I understand that the code needs to be changed.
I wanted to know if the above holds true for bitwise and (&) and
bitwise or (|). I think, the processor should take care of the
operation a&b or a|b irrespective of the endianness of the system.
Please provide your comments.
Thanks in advance!!!
.
- Follow-Ups:
- Re: program logic based on endianness
- From: Pascal Bourguignon
- Re: program logic based on endianness
- From: Eric Sosman
- Re: program logic based on endianness
- Prev by Date: Re: Does sigwait catch SIGCHLD?
- Next by Date: Re: program logic based on endianness
- Previous by thread: How to set non standard baudrates for tty device.
- Next by thread: Re: program logic based on endianness
- Index(es):
Relevant Pages
|