#include<iostream> #include<cstdio> #include<cstring> #include<string> #include<bitset> using namespace std; int main(){ bitset<16>A; bitset<16>B(0xfa2); bitset<16>C(string("100000")); cout<<A<<endl; cout<<B<<endl; cout<<C<<endl; cout<<(A^=B)<<endl; cout<<(A|=B)<<endl; cout<<(A^=B)<<endl; cout<<(A<<=1)<<endl; cout<<(A<<1)<<endl; cout<<(~A)<<endl; cout<<(A==B)<<endl; cout<<(A!=B)<<endl; cout<<(A&B)<<endl; cout<<(A|B)<<endl; cout<<A.size()<<endl; cout<<A.count()<<endl; cout<<A.any()<<endl; cout<<A.none()<<endl;
cout<<A.test()<<endl;
A.set(); int p=0,x=1; A.set(p); A.set(p,x); A.reset(); A.reset(p); A.flip(); A.flip(p); A.to_ulong(); A.to_string(); return 0; }