Contact: aviboots(AT)netvision.net.il
40,758 questions
53,129 answers
573 users
#include <bits/stdc++.h> using namespace std; int main() { bitset<4> bs1(string("1100")); bitset<6> bs2(string("101101")); cout << bs1 << endl; cout << bs2 << endl; return 0; } /* run: 1100 101101 */
#include <bits/stdc++.h> using namespace std; int main() { string s = "100110"; bitset<6> bs(s); cout << bs << endl; return 0; } /* run: 100110 */
#include <bits/stdc++.h> using namespace std; int main() { string s = "1101"; bitset<6> bs(s, 1); cout << bs << endl; return 0; } /* run: 000101 */
#include <bits/stdc++.h> using namespace std; int main() { string s = "11101"; bitset<6> bs(s, 2, 3); cout << bs << endl; return 0; } /* run: 000101 */
#include <bits/stdc++.h> using namespace std; int main() { bitset<6> bs(3); cout << bs << endl; return 0; } /* run: 000011 */