[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Help with an algorithm
- From: Finn Wilcox <finnw@...>
- Date: Fri, 24 May 2013 07:09:49 +0100
On 24/05/2013 06:29, Vaughan McAlley wrote:
>
> I’d like to iterate through all 40-bit binary numbers that have a
> Hamming weight of 25 (ie. 25 of the bits are set to 1).
I think this may be what you want:
http://graphics.stanford.edu/~seander/bithacks.html#NextBitPermutation