int x = 12345678;
int y = ~x;//~是按位取反操作符
string xStr = Convert.ToString(x, 2).PadLeft(32, '0');//将int数值,转换成二进制字符串
string yStr = Convert.ToString(y, 2).PadLeft(32, '0');//长度32位,不足的用0补齐
Console.WriteLine(xStr);
Console.WriteLine(yStr);
10-26
864