fork(73) download
  1. #include <iostream>
  2. #include <bitset>
  3. using namespace std;
  4.  
  5. int main() {
  6. std::bitset<32> mybit(-3);
  7. int mybit_int = (int)(mybit.to_ulong());
  8. cout << mybit_int << endl;
  9. return 0;
  10. }
Success #stdin #stdout 0s 3460KB
stdin
Standard input is empty
stdout
-3