need code to gen all bit possibilities for 64 bits
Grant Edwards
grante at visi.com
Thu May 31 13:05:47 EDT 2001
In article <serbhtsuij5m0mpsib1tvksrpemcpcceic at 4ax.com>, Tim Roberts wrote:
>> I need code to generate bit configs for 64 bits. I know that this could
>>be big. I would like to be able to start and stop at a certain point and
>>write the results to a file to input to another program.
>
>The easiest way to generate all possible 64-bit patterns is to count:
>
>i = 0L
>while i < (2L ** 64L): print i
>
>Printing 18 quintillion numbers is going to take a very, very, VERY long
>time. At one per microsecond, I get about 500,000 years.
I think the while loop above is going to run longer than
500,000 years. :)
--
Grant Edwards grante Yow! Look! A ladder! Maybe
at it leads to heaven, or
visi.com a sandwich!
More information about the Python-list
mailing list