void Mmax(int a, int b) { // use mask to assert the sign bit is 1 or not unsigned mask = 1 << 31; if (a-b) // a is not equal to b { if ((a-b) & mask) // sign bit is 1 cout << "a is smaller than b." << endl; else cout << "a is greater than b." << endl; } else cout << "a is equal to b." << endl; }