xxxxxxxxxx
< Bitset > The C++ standard library also provides the bitset structure, which
corresponds to an array whose each value is either 0 or 1.
string s1 = bitset<8>(6).to_string(); //convert number to binary string
cout<<s1<<endl; //00000110
string s2 = "110010";
bitset<8> b1(s2); // [0, 0, 1, 1, 0, 0, 1, 0]
cout << b1.count(); //3