Showing posts with label Bitwise Operator. Show all posts
Showing posts with label Bitwise Operator. Show all posts

Saturday, 28 April 2012

Program Of Bitwise Operator In C++

#include<iostream.h>
#include<conio.h>
main()
{
clrscr();
int a,b,c,d,e;
a=25;
b=15;
                                              c=a&b;        // &-->And Operator
                                                d=a|b;           // |--> Or Operator
                                               e=~a;           // ~a Negation of a
cout<<" a&b="<< c;
cout<<"\n  a|b="<< d;
cout<<"\n  ~a="<< e;
getch();
}
------------------------------------------------  

Define Bitwise Operator