home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!wupost!sdd.hp.com!mips!think.com!barmar
- From: barmar@think.com (Barry Margolin)
- Newsgroups: comp.lang.c
- Subject: Re: Byte Order Question
- Date: 20 Aug 1992 15:27:23 GMT
- Organization: Thinking Machines Corporation, Cambridge MA, USA
- Lines: 12
- Message-ID: <170dkrINNkjf@early-bird.think.com>
- References: <1992Aug20.131614.23729@bnrmtl.bnr.ca>
- NNTP-Posting-Host: telecaster.think.com
-
- In article <1992Aug20.131614.23729@bnrmtl.bnr.ca> bnrmtl!john@larry.mcrcim.mcgill.edu writes:
- >My suspicion is that the result of the shift of a positive number could depend
- >on whether the byte order is big or little endian. Is my suspicion correct?
-
- No. The shift operators are defined on the abstract numerical value, and
- aren't implementation-dependent. A right shift always shifts from the high
- order byte to the low order byte, no matter what the byte order is.
- --
- Barry Margolin
- System Manager, Thinking Machines Corp.
-
- barmar@think.com {uunet,harvard}!think!barmar
-