home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / lang / c / 12574 < prev    next >
Encoding:
Internet Message Format  |  1992-08-20  |  986 b 

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