class Solution: # @param n, an integer # @return an integer def reverseBits(self, n): b_num = str(bin(n))[2:] reverse_b_num = b_num[::-1] zoro_paddings = "0" * (32-len(b_num)) return (int(reverse_b_num+zoro_paddings, 2))