public static void Main()
Console.WriteLine("{0,32} | {1,7} | {2}\n", "Binary", "Decimal", "Comments");
Write(0xAB ^ 1337, "171 XOR 1337\n");
Write(0xAB ^ 1337, "171 XOR 1337");
Write(~'+' | 0xAB ^ 1337, "-44 OR 1426\n");
Write(-(~'+' | 0xAB ^ 1337), "-(-42)");
private static void Write(int value, string comment = null)
string binary = Convert.ToString(value, 2).PadLeft(32, '0');
Console.WriteLine("{0} | {1,7} | {2}", binary, value, comment);