Here's a good resource that explains it........http://www.purplemath.com/modules/percents2.htm#Decimal_to_Fraction
I don't know the exact way to do it, but if I have decimal 0.625 for example, I then put the decimal numbers over an exponential of 10, like 10000, so I would have the fraction 625/10000, which is equivilant to 0.625. From there, I find common factors and divide down to the simplified answer:
625 / 5 = 125 /25 = 5 / 5 = 1
10000 / 5 = 2000 /25 = 80 / 5 = 16
So my final answer would be 1/16.