add downscale utility functions: roundPowerOfTwoLargestEnclosed, roundPowerOfTwoSmallestEnclosing, downscalePowerOfTwoLargestEnclosed, downscalePowerOfTwoSmallestEnclosing