Bitmasks & Iterative Complete Search
🚀 Agenda
- Bitwise Operations
- Bit Masking
- Iterative Complete Search
- Practice Problems
1️⃣ Bitwise Operations
Bitwise operations are used to manipulate individual bits of binary numbers.
There are six bitwise operators in C++:
- AND (&)
- OR (|)
- XOR (^)
- NOT (~)
- Left Shift (<<)
- Right Shift (>>)
Commutative Property
(A operation B) == (B operation A)
((A operation B) operation C) == ((C operation B) operation A)
Bitwise AND (&)