simple algo to check is input power of two