Author: E. Nielsen
Date: 14:12:23 09/18/04
Go up one level in this thread
On September 16, 2004 at 21:20:50, Uri Blass wrote:
>...doing a loop on the 1's of a bitboard...
Well, I suppose it depends on which representation you choose for your
bitboard...
If it is in two's-complement form (i.e. signed) you can find the rightmost 1-bit
with following formula:
x & (-x)
Regards,
Eyưun Nielsen
P.s.: And I would also recommend the book "Hacker's Delight" by Henry S. Warren,
Jr. which is full of stuff like this. :)
This page took 0 seconds to execute
Last modified: Thu, 15 Apr 21 08:11:13 -0700
Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.