For the sake of completion: if you want to convert fixed point representation to its binary equivalent you can perform the following operations:
Get the integer and fractional part.
from decimal import *
a = Decimal(3.625)
a_split = (int(a//1),a%1)
Convert the fractional part in its binary representation. To achieve this multiply successively by 2.
fr = a_split[1]
str(int(fr*2)) + str(int(2*(fr*2)%1)) + ...
You can read the explanation here.