Author: Robert Hyatt
Date: 19:38:22 12/03/98
Go up one level in this thread
On December 03, 1998 at 17:58:06, Andrew Dados wrote: > >On December 03, 1998 at 13:34:31, Inmann Werner wrote: > >>Thanks a lot Robert and Peter! >> >>It is what I need, and i am on the right path. >> >>But- >>are prozessors really as silly, not to have a simple code (in the prozessor) >>doing the bit testing? >> >>Werner > > All 32-bit Intel processors (and compatibles) since 386 have BSF/BSR >instructions made just this sort of bit testing/setting/resetting. For example >this assembler sequence: > >mov ecx,32 >bsf eax,ecx >jz @@nobits > >will give you number of first set bit in eax (5 in this case). Zero flag will be >set if no set bits >were present. BSR additionally resets first found bit. > > Andrew that is but one "piece" of the equation. first, we need 64 bit operations. Then we need a "population count" to count the number of set bits. Also some "bit operations" like on the old vax machines... like a pattern search in a bit string...
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.