Team: PCIE/CXL Team
- Write a function to check if a number is a Power of 2
- Take care of signed number
- The main logic here is to remember that power of two representation in binary only has one bit high. If the number is signed
███████████████████████████████████
█████████████████████████████████████████
███████████████████████████████████████████████
██████████████████████████████████████████████████
████████████████████████████████████████████████████
██████████████████████████████████████████████████
████████████████████████████████████████████████
█████████████████████████████████████████████
███████████████████████████████████████████
███████████████████████████████████████████
█████████████████████████████████████████████
█████████████████████████████████████████████████
████████████████████████████████
███████████████████████████████████████
█████████████████████████████████████████████
██████████████████████████████████████████████████
████████████████████████████████████████████████████
████████████████████████████████████████████████████
███████████████████████████████████████████████████
████████████████████████████████████████████████
█████████████████████████████████████████████
████████████████████████████████████████████
█████████████████████████████████████████████
💬 Discussion (0)
No comments yet. Unlock this question to start the discussion.