Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #20568

Re: signed to unsigned

Date 2012-02-17 14:37 -0500
From Dave Angel <d@davea.name>
Subject Re: signed to unsigned
References <436b024b-20f7-462b-a21e-11f44802e578@s7g2000vby.googlegroups.com> <mailman.5923.1329506097.27778.python-list@python.org> <17514709-e8bc-4533-b9db-5cf9b27c4c90@m2g2000vbc.googlegroups.com>
Newsgroups comp.lang.python
Message-ID <mailman.5924.1329507479.27778.python-list@python.org> (permalink)

Show all headers | View raw


On 02/17/2012 02:22 PM, Brad Tilley wrote:
>>>>> 0xffffffff&  -327681234
>> 3967286062
> Very nice! Thanks for that example. Unsigned long longs:
>
> 0xffffffffffffffff&  -9151314442815602945
> 9295429630893948671L
Or more generally, use modulo

-13452324 % 2^64

-- 

DaveA

Back to comp.lang.python | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

signed to unsigned Brad Tilley <kj4eit@gmail.com> - 2012-02-17 10:51 -0800
  Re: signed to unsigned Chris Rebert <clp2@rebertia.com> - 2012-02-17 11:05 -0800
    Re: signed to unsigned Brad Tilley <kj4eit@gmail.com> - 2012-02-17 11:10 -0800
  Re: signed to unsigned Peter Otten <__peter__@web.de> - 2012-02-17 20:14 +0100
    Re: signed to unsigned Brad Tilley <kj4eit@gmail.com> - 2012-02-17 11:22 -0800
      Re: signed to unsigned Dave Angel <d@davea.name> - 2012-02-17 14:37 -0500

csiph-web