Preview:
#include<bits/stdc++.h>
using namespace std;
int main()
{
   int a=0b101;
   int b=0b10110;
   b<<=4;        //means b=101100000 shifting of b by 4
   int c=a|b;
   int d=a&b;
   int e=a^b;
   cout<<bitset<9>(c)<<"\n";
   cout<<bitset<9>(d)<<"\n";
   cout<<bitset<10>(e)<<"\n";
   return 0;
}
downloadDownload PNG downloadDownload JPEG downloadDownload SVG

Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!

Click to optimize width for Twitter