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

  1. Path: sparky!uunet!news.claremont.edu!ucivax!orion.oac.uci.edu!beckman.com!dn66!a_rubin
  2. Newsgroups: comp.lang.c
  3. Subject: Re: Byte Order Question
  4. Message-ID: <a_rubin.714324354@dn66>
  5. From: a_rubin@dsg4.dse.beckman.com (Arthur Rubin)
  6. Date: 20 Aug 92 15:25:54 GMT
  7. References: <1992Aug20.131614.23729@bnrmtl.bnr.ca>
  8. Nntp-Posting-Host: dn66.dse.beckman.com
  9. Lines: 15
  10.  
  11. In <1992Aug20.131614.23729@bnrmtl.bnr.ca> john@bnrmtl.bnr.ca (John Hickin) writes:
  12.  
  13. >Forgive me if this is a FAQ but here goes.
  14.  
  15. >Suppose int's are 2 bytes.  Then division of a positive number by 256 should
  16. >retrieve the most significant byte of the int.  What about a right shift by 8?
  17. >My suspicion is that the result of the shift of a positive number could depend
  18. >on whether the byte order is big or little endian.  Is my suspicion correct?
  19.  
  20. Nope.  It must produce the same result (for a positive number).
  21. --
  22. Arthur L. Rubin: a_rubin@dsg4.dse.beckman.com (work) Beckman Instruments/Brea
  23. 216-5888@mcimail.com 70707.453@compuserve.com arthur@pnet01.cts.com (personal)
  24. My opinions are my own, and do not represent those of my employer.
  25. My interaction with our news system is unstable; if you want to be sure I see a post, mail it.
  26.