Popular recipes tagged "bitwise"http://code.activestate.com/recipes/tags/bitwise/popular/2013-12-01T02:21:14-08:00ActiveState Code RecipesEasy Bit Arrays using Long Integers (Python) 2013-12-01T02:21:14-08:00Mike Sweeneyhttp://code.activestate.com/recipes/users/4177990/http://code.activestate.com/recipes/578777-easy-bit-arrays-using-long-integers/ <p style="color: grey"> Python recipe 578777 by <a href="/recipes/users/4177990/">Mike Sweeney</a> (<a href="/recipes/tags/array/">array</a>, <a href="/recipes/tags/bit/">bit</a>, <a href="/recipes/tags/bitwise/">bitwise</a>, <a href="/recipes/tags/integer/">integer</a>, <a href="/recipes/tags/long/">long</a>). </p> <p>Some simple techniques for working with long integers as bit arrays. Python support for long integers allows fast bitwise operations on large bit arrays. Bitwise operations on 100 million bit arrays happen in the blink of an eye. They are also fast and compact when saving and loading to disk. Unfortunately bit set, get, append, pop etc are slow so another bit array technique may be preferred.</p> Floating point bitwise operations (Python) 2011-11-28T23:47:25-08:00Pyry Pakkanenhttp://code.activestate.com/recipes/users/4180119/http://code.activestate.com/recipes/577967-floating-point-bitwise-operations/ <p style="color: grey"> Python recipe 577967 by <a href="/recipes/users/4180119/">Pyry Pakkanen</a> (<a href="/recipes/tags/bitwise/">bitwise</a>, <a href="/recipes/tags/float/">float</a>, <a href="/recipes/tags/floating/">floating</a>, <a href="/recipes/tags/point/">point</a>). </p> <p>Implements bitwise operations for real numbers by using an infinite one's complement representation.</p>