Math Fundamentals18 sections · 814 units
Open in Course

Section Recap

What we learned

You've learned bit manipulation from the ground up. You understand the six bitwise operators (AND, OR, XOR, NOT, left shift, right shift) and how to check, set, clear, and toggle individual bits.

You've seen powerful tricks: counting set bits in O(k)O(k) time, checking if a number is a power of 2 in O(1)O(1), finding a unique element with XOR, and representing subsets as bitmasks.

These techniques give you speed and efficiency that loops and data structures can't match. When you encounter problems involving binary representations, flags, or small sets, you now have the tools to solve them. Good job on finishing this section.