CSharp examples for System:String Endian
Return word where all the (low end) ones are set
using System;/*from w w w . j a va2s . c o m*/ public class Main{ // Return word where all the (low end) ones are set. // Example: 01011011 --> 00000011 // Return 0 if lowest bit is zero: // 10110110 --> 0 public static UInt32 LowBits( UInt32 x ) { if( ~0U == x ) return ~0U; return (((x+1)^x) >> 1); } }