#include <bitset>
#include <cstdio>
#include <iostream>
int main()
{
std::bitset<8> b1(std::string("01100100")); std::cout<<b1<<std::endl;
std::bitset<8> b2(std::string("11111111")); std::cout<<b2<<std::endl; //see, this variable
//has been assigned
//the value 11111111
//whereas, during
//execution, it takes
//the value 11000111
std::cout << "b1 & b2: " << (b1 & b2) << '\n';
std::cout << "b1 | b2: " << (b1 | b2) << '\n';
std::cout << "b1 ^ b2: " << (b1 ^ b2) << '\n';
getchar();
return 0;
}
I2luY2x1ZGUgPGJpdHNldD4KI2luY2x1ZGUgPGNzdGRpbz4KI2luY2x1ZGUgPGlvc3RyZWFtPgoKaW50IG1haW4oKQp7CiAgICBzdGQ6OmJpdHNldDw4PiBiMShzdGQ6OnN0cmluZygiMDExMDAxMDAiKSk7IHN0ZDo6Y291dDw8YjE8PHN0ZDo6ZW5kbDsKICAgIHN0ZDo6Yml0c2V0PDg+IGIyKHN0ZDo6c3RyaW5nKCIxMTExMTExMSIpKTsgc3RkOjpjb3V0PDxiMjw8c3RkOjplbmRsOyAvL3NlZSwgdGhpcyB2YXJpYWJsZQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vaGFzIGJlZW4gYXNzaWduZWQKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvL3RoZSB2YWx1ZSAxMTExMTExMQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vd2hlcmVhcywgZHVyaW5nCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy9leGVjdXRpb24sIGl0IHRha2VzCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy90aGUgdmFsdWUgMTEwMDAxMTEKICAgIHN0ZDo6Y291dCA8PCAiYjEgJiBiMjogIiA8PCAoYjEgJiBiMikgPDwgJ1xuJzsKICAgIHN0ZDo6Y291dCA8PCAiYjEgfCBiMjogIiA8PCAoYjEgfCBiMikgPDwgJ1xuJzsKICAgIHN0ZDo6Y291dCA8PCAiYjEgXiBiMjogIiA8PCAoYjEgXiBiMikgPDwgJ1xuJzsKZ2V0Y2hhcigpOwpyZXR1cm4gMDsKfQ==