Basically you compute power of 2 based on your value using base 2 logarithm (which is not available so you need to use change-of-base formula). Inner ceil is because you want to round up and outside ceil is for original values lower than 1.
Alternative way is to use Binner (Dictionary) node prior to which you need to create dictionary table of 2^n boundaries and corresponding labels.