Topic: Bit Manipulation Problem / Level: beginner

Problem: Write a function to extract the last k bits of a number.

Run the code to see the output here...