BitwiseOpt - 38
BitwiseOpt - 38
Bitwise Operator
& - and
| - or
^ - xor
~ - not
• Its working
• If you are making device drivers , systems program, System
application , core system program and in general if a person is
working more close towards electronic there this operator is used
• Left and Right shift
int x = 5 , y;
X= 0 0 0 0 0 1 0 1
0 0 0 0 0 1 0 1
• When you shift all the bits on left hand side by one space then 5 will
get multiplied by 2 , if you move them by 2 space it will be multiplied
by 4
• Here signed bit is not included , if the number is positive then it will
be positive and vice versa