Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.freenet.ag!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.020 X-Spam-Evidence: '*H*': 0.96; '*S*': 0.00; 'python.': 0.02; 'means,': 0.09; 'python': 0.11; '23,': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'subject:python': 0.16; 'wrote:': 0.18; '(not': 0.18; 'implementing': 0.19; 'thu,': 0.19; 'not,': 0.20; 'example': 0.22; 'header:In-Reply-To:1': 0.27; 'idea': 0.28; 'is?': 0.30; 'message-id:@mail.gmail.com': 0.30; 'clever': 0.31; 'anyone': 0.31; 'probably': 0.32; 'received:209.85': 0.35; 'received:209.85.220': 0.35; 'received:google.com': 0.35; 'should': 0.36; 'received:209': 0.37; 'to:addr:python-list': 0.38; 'pm,': 0.38; 'to:addr:python.org': 0.39; 'how': 0.40; 'numbers': 0.61; 'term': 0.63; 'telling': 0.64; 'subject:Complement': 0.84; '2013': 0.98 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=tx5GBmLWIWvdwoig7tK6hv2PXJ86yTUzxp/mux9/tW0=; b=TVYSxH0lFgZlpX2slqiYTwOkdabt11WLCbra1RyocJlXFRRxKp5m22M7ck6bONZzWE 5soqzndiIN9in5iZpXMV/ReWbUacDnsFfMvGyYx1IGeAm1DZK+XTxQRf6t1f9iRQeIIT 1h8aHayeqF1VJw+oPbnZinRn2KYUcPTIPErqkxnVTBsW1MjKgf7mkF/tJhvZmSKIXf6c RAlIlGlFmhTOUAIyIrtDe9VIiOaz3y7CBb8d+h2wPmxkVnRy+tE6R/0P2c11/sn/pq/P N8dWIT66eHR/uC+JnB369V/F60I06y+tP2l/q5s9jRtvUnMsqPAlgFuHP9+3ORU3SuIL 2CwA== MIME-Version: 1.0 X-Received: by 10.52.164.163 with SMTP id yr3mr3939536vdb.76.1369303423159; Thu, 23 May 2013 03:03:43 -0700 (PDT) In-Reply-To: <53dc6273-5aed-44e9-8f39-7eb7f4f3a1b1@googlegroups.com> References: <53dc6273-5aed-44e9-8f39-7eb7f4f3a1b1@googlegroups.com> Date: Thu, 23 May 2013 20:03:43 +1000 Subject: Re: 2's Complement in python help. From: Chris Angelico To: python-list@python.org Content-Type: text/plain; charset=ISO-8859-1 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 10 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1369303432 news.xs4all.nl 15962 [2001:888:2000:d::a6]:33772 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:45789 On Thu, May 23, 2013 at 7:54 PM, wrote: > Can anyone give me an idea of how to find the 2's Complement in python with an example Do you know what two's complement is? (Not to be confused with two's compliment, which is when numbers start telling you how clever you are.) If not, you should probably look it up on Wikipedia or something. Once you know what the term means, you can start implementing in Python. ChrisA