Bit manipulation techniques are often ignored in algorithmic problem-solving books. This video is to teach various binary number manipulation techniques in Python that can be applied to solve various coding questions.
Techniques you will learn:
1. Bitwise AND
2. Bitwise OR
3 . Binary left shift
4. Binary right shift
5. Binary XOR (most useful)
6. One complement
7. Two's complement (Used to represent -ve numbers)
8. Get ith bit
9. Set ith bit
10. Toggle ith bit
11. Clear bits
12. Get the lowest set bits
13. Clear the lowest set bits
Important resources:
https://en.wikipedia.org/wiki/Exclusive_or
https://en.wikipedia.org/wiki/Two%27s_complement
Download
0 formats
No download links available.
Learn 14 bit manipulation techniques in Python | NatokHD