pub fn round_up_to_power2(n: u32) -> (u32, u32)
Given a 32-bit number, return the next highest power of 2, and the corresponding thift. e.g:
if n is 7, then function will return (8, 3), which 8 = 1 << 3