Most viewed recipes tagged "bit"http://code.activestate.com/recipes/tags/bit/views/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>
Bit operation (C)
2011-02-27T05:21:35-08:00Shao-chuan Wanghttp://code.activestate.com/recipes/users/4168519/http://code.activestate.com/recipes/577589-bit-operation/
<p style="color: grey">
C
recipe 577589
by <a href="/recipes/users/4168519/">Shao-chuan Wang</a>
(<a href="/recipes/tags/bit/">bit</a>, <a href="/recipes/tags/operation/">operation</a>).
</p>
<p>A bit operation (could be very long).</p>