code: def __get_bit_values(self, number, size=32):
          
          res = list(self.__gen_bit_values(number))
          res.reverse()
          # 0-pad the most significant bit
          res = [0] * (size - len(res)) + res
          return res
docs: Get bit values as a list for a given number
  
          >>> get_bit_values(1) == [0]*31 + [1]
          True
  
          >>> get_bit_values(0xDEADBEEF)
          [1L, 1L, 0L, 1L, 1L, 1L, 1L,
          0L, 1L, 0L, 1L, 0L, 1L, 1L, 0L, 1L, 1L, 0L, 1L, 1L, 1L, 1L,
          1L, 0L, 1L, 1L, 1L, 0L, 1L, 1L, 1L, 1L]
  
          You may override the default word size of 32-bits to match your actual
          application.
          >>> get_bit_values(0x3, 2)
          [1L, 1L]
  
          >>> get_bit_values(0x3, 4)
          [0L, 0L, 1L, 1L]