fork download
  1. #include <iostream>
  2. #include <bitset>
  3.  
  4. int main(){
  5. uint64_t r1, r2;
  6. int32_t a1 = 3 , a2 = 7;
  7. int32_t b1 = 7 , b2 = 3 ;
  8. r1=(static_cast<uint64_t>(a1)<<32)| b1;
  9. r2=(static_cast<uint64_t>(a2)<<32)| b2;
  10. std::bitset<64> bs1(r1);
  11. std::bitset<64> bs2(r2);
  12. std::cout << bs1.to_string() << std::endl;
  13. std::cout << bs2.to_string() << std::endl;
  14.  
  15. }
Success #stdin #stdout 0s 3272KB
stdin
Standard input is empty
stdout
0000000000000000000000000000001100000000000000000000000000000111
0000000000000000000000000000011100000000000000000000000000000011