Community

Finding the Binary Gap for a Number in .NET

(Hannes DuPreez) A binary gap is any sequence of consecutive zeros that is surrounded by ones at both ends in the binary representation of the number.