C++ Program for Bitwise Operators

Master C++ with Real-time Projects and Kickstart Your Career Start Now!!

Program 1

// Bitwise operator Demo
#include<iostream>
using namespace std;
int main()
{
      int a,b;
      system("cls");
      //a=(((7&6)|5)^3);
     // a=(((5|4)^9)&4);
    //  a=13>>2;
    a=(5&5|5)<<3;
      cout<<a;
    //    cout<<5<<3;
    //   cout<<(5<<3);

return 0;
}
/*
0111
0110
------
0110
0101
-----
0111
0011
-----
0100

*/

If you are Happy with DataFlair, do not forget to make us happy with your positive feedback on Google

courses

TechVidvan Team

TechVidvan Team provides high-quality content & courses on AI, ML, Data Science, Data Engineering, Data Analytics, programming, Python, DSA, Android, Flutter, full stack web dev, MERN, and many latest technology.

Leave a Reply

Your email address will not be published. Required fields are marked *