Talk:Bit array

From Wikipedia, the free encyclopedia

"Find first one" pseudocode... after extensive searching on the net, I cannot find any way to perform this efficiently on an x86 processor (assembler code, pseudocode or c/other code). =( Is the following pseudocode the best way to implement it?

function findfirstone(number)
begin
 result = 0
 tmp = 1
 while tmp and number = 0 do
 begin
  result++
  tmp = tmp << 1
 end
end

Thanks in advance Themania 03:36, 12 February 2007 (UTC)

Excellent Page!

Thanks a lot, on behalf of myself and the other contributors. Deco 03:55, 9 February 2006 (UTC)