public int CountNeededBits(int source) { if (0 == source) { return 0; } else if (0 > source) { ulong fuckedUp = (ulong)(~source); return (this.CountNeededBits(fuckedUp) + 1); } else { ulong s2 = (ulong)source; return (this.CountNeededBits(s2) + 1); } }