I am trying to implement some fast binary exponentiation in python. I want to know the integers the binary representation of the number is returning 1. Maybe an example will be clearer:

```py
bin(13) # returns 1101 because one 8 + one 4 + one 1 = 13. 

```

How can I build a function that returns 8,4,1 passing the binary number as an argument? As you can see, I am not explicitly trying to get powers of 2 but the minimalist representation to multiply the powers together.