#include<iostream>
using namespace std;
int main()
{
int a = 7;
int b = 10;
cout << (a & b) << endl; // Bitwise AND
cout << (a | b) << endl; // Bitwise OR
cout << (a ^ b) << endl; // Bitwise XOR
cout << (a << b) << endl; // Bitwise left shift print a*2^10
cout << (a >> b) << endl; // Bitwise rigth shift print 0
cout << (~a) << endl; // Bitwise Not is a unary opeator too.
return 0;
}
I2luY2x1ZGU8aW9zdHJlYW0+CnVzaW5nIG5hbWVzcGFjZSBzdGQ7CmludCBtYWluKCkKewogICAgaW50IGEgPSA3OwogICAgaW50IGIgPSAxMDsKICAgIGNvdXQgPDwgKGEgJiBiKSA8PCBlbmRsOyAgICAgICAgLy8gQml0d2lzZSBBTkQKICAgIGNvdXQgPDwgKGEgfCBiKSA8PCBlbmRsOyAgICAgICAgLy8gQml0d2lzZSBPUgogICAgY291dCA8PCAoYSBeIGIpIDw8IGVuZGw7ICAgICAgICAvLyBCaXR3aXNlIFhPUgogICAgY291dCA8PCAoYSA8PCBiKSA8PCBlbmRsOyAgICAgICAvLyBCaXR3aXNlIGxlZnQgc2hpZnQgcHJpbnQgYSoyXjEwCiAgICBjb3V0IDw8IChhID4+IGIpIDw8IGVuZGw7ICAgICAgIC8vIEJpdHdpc2UgcmlndGggc2hpZnQgcHJpbnQgMAogICAgY291dCA8PCAofmEpIDw8IGVuZGw7ICAgICAgICAgICAvLyBCaXR3aXNlIE5vdCBpcyBhIHVuYXJ5IG9wZWF0b3IgdG9vLgogICAgcmV0dXJuIDA7Cn0=