Move isPowerOf2 logic to Utils