C#. Count Consecutive 1 bits in ulong : <p>Basically i want to count the number of consecutive 1 bits (1 bit groups) in a ulong. for example:
ulong x = 0x1BD11BDAA9FC1A22UL;
In binary it becomes: 1101111010001000110111101101010101001111111000001101000100010.
I need output as No of consecutive 1 bits = 16.</p>
