That will not work for all decimals MG
Have a look at the instructions here
http://www.mathsisfun.com/converting-decimals-fractions.html
Times by 100 then put it over it, then simplify.
E.g. 0.20
0.20*100= 20
20/100 if the fraction.
Simplify = 1/20
for 3 decimal place you times by 1000
0.625/1
*1000
625/1000
Simplify
5/8
That will not work for all decimals MG
Have a look at the instructions here
http://www.mathsisfun.com/converting-decimals-fractions.html