// Borrow in the subtraction of unsigned integers // // #include // Prior to C++20 header file for input and output // import ; // Since C++20 // #include // Header for bitset (binary representation) import std; // Since C++23 STD Module for standard data types and functions using std::cout; using std::endl; int main() { unsigned int a, b, c; // unsigned integers // ----- No Borrow a > b a = 2; b = 1; c = a - b; // a > b, no borrow cout << "a = " << a << ", b = " << b << endl; cout << "Result c: Decimal = " << c << " Binary = " << std::bitset<32>(c) << endl; cout << " ---------------------------------" << endl; // ----- Borrow a < b a = 1; b = 2; c = a - b; // a < b, borrow cout << "a = " << a << ", b = " << b << endl; cout << "Result c: Decimal = " << c << " Binary = " << std::bitset<32>(c) << endl; return 0; }