Bitwise Operators

 



  • Bitwise operator works on bits and perform bit-by-bit operation.
  • The truth tables for &, |, ^ and ~ is as follows:


  • The usual arithmetic conversions are performed on the operands, except with << and >>, in which case just integral promotion is performed on each operand.
  • If the shift count is negative or is greater than or equal to the number of bits contained in the object being shifted, the result of the shift is undefined.
Example: 





Post a Comment

0 Comments
* Please Don't Spam Here. All the Comments are Reviewed by Admin.