// Collection of code snippets by Arne Vajhøj 
// (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) 
#include <iostream>

using namespace std;

int main()
{
   int v;
   cout << "Enter number: ";
   cin >> v;
   for(int i = 0; i < sizeof(v)*8; i++) {
      cout << ((v >> (sizeof(v)*8 - i - 1)) & 1);
   }
   cout << endl;
   return 0;
}
