Skip to content

knaresh10/BitManipuation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

Bit Manipulation

1. Bitwise Operators

  • & - bitwise AND takes two numbers as operands and does AND on every bit of two numbers. The result of AND is 1 only if both bits are 1.

  • | - bitwise OR takes two numbers as operands and does OR on every bit of two numbers. The result of OR is 1 if any of the two bits is 1.

  • ^ - bitwise XOR takes two numbers as operands and does XOR on every bit of two numbers. The result of XOR is 1 if the two bits are different.

  • ~ - bitwise NOT takes one number and inverts all bits of it

  • << - left shift operator. The left operands value is moved left by the number of bits specified by the right operand.

  • >> - right shift operator. The left operands value is moved right by the number of bits specified by the right operand.

bitwise operators in cpp

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages