[Tfug] Byte Order

Felix Tilley fetilley at earthlink.net
Thu Nov 16 21:52:44 MST 2006


I snipped the C file.  I have no means to test it.  I assume this does not work on unsigned integers.  Is this correct?  Anyway, this looks like a very useful program.

Felix
Tucson



+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Date: Thu, 16 Nov 2006 11:58:33 -0700
From: rfs_lists at mac.com
Subject: Re: [Tfug] Byte Order
To: Tucson Free Unix Group <tfug at tfug.org>
Message-ID: <CDCC0919-70D3-4E0E-AEE1-15EE3FF0D961 at mac.com>
Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed

Hi Jim,
For completeness, the sign is always the MSB, not necessarily the  
leftmost bit, and never the MSB of the low byte.

So -32767 is either
  1000000000000001
or
  0000000110000000
and never
  1000000100000000






More information about the tfug mailing list