Updated ceilPowerOfTwo for signed int support