Bitwise Operators ( &, |, ^, ~, <<, >> )
Bitwise operators modify variables considering the bit patterns that represent the values they store.
operator asm equivalent description
& AND Bitwise AND
| OR Bitwise Inclusive OR
^ XOR Bitwise Exclusive OR
~ NOT Unary complement (bit inversion)
<< SHL Shift Left
>> SHR Shift Right
Bitwise operators modify variables considering the bit patterns that represent the values they store.
operator asm equivalent description
& AND Bitwise AND
| OR Bitwise Inclusive OR
^ XOR Bitwise Exclusive OR
~ NOT Unary complement (bit inversion)
<< SHL Shift Left
>> SHR Shift Right
Learn More :
Operators
- Operating with variables in C++
- Assignment operator (=) in C++
- Arithmetic operators ( +, -, , , % ) in C++
- Increase and decrease (++, --) operators in C++
- Relational and equality operators ( ==, !=, >, <, >=, <= ) in C++
- Logical operators ( !, &&, || ) in C++
- Conditional operator ( ? ) in C++
- Comma operator ( , ) in C++
- Precedence of Operators in C++