Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.glorb.com!postnews.google.com!news1.google.com!Xl.tags.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local2.nntp.dca.giganews.com!nntp.earthlink.com!news.earthlink.com.POSTED!not-for-mail NNTP-Posting-Date: Thu, 08 Mar 2012 07:55:20 -0600 Message-ID: <4F58BA48.527D@mindspring.com> Date: Thu, 08 Mar 2012 08:55:20 -0500 From: pete Reply-To: pfiland@mindspring.com Organization: PF X-Mailer: Mozilla 3.04Gold (WinNT; I) MIME-Version: 1.0 Newsgroups: comp.lang.c Subject: Re: difference between ~0U and ~0 References: <6ee3baa7-5370-4fb6-acfe-262f2bc6036e@sc10g2000pbc.googlegroups.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Lines: 15 X-Usenet-Provider: http://www.giganews.com NNTP-Posting-Host: 4.154.219.165 X-Trace: sv3-mhuifh1UgONZzxSYHBGNfgdCAQjF/pQkQfluRxjj6SKKnaFCYIC7LeF70kPfarRMe/sPT+X0YxYkmIn!eXKCplJkKUj1cPCHpCyDnoBXcawPH2a6mRLgOin0cRyY5dNE9/9Piq3lIK81cD5twygPueHWOuaX!DDphvqND/bk= X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.40 X-Original-Bytes: 1331 Xref: csiph.com comp.lang.c:18327 somenath wrote: > According to my understanding ~0 is -1. > So I will get all bit 1 as a > result of ~0 in 2's complement system. Close, but backwards. ~0 is all bit 1. So you will get -1 as a result of ~0 in 2's complement system. -- pete