Here is a simple way to convert a decimal inch dimension to a fractional dimension.
Divide the decimal inch dimension by 0.0156. Then round to the nearest integer. This will be the nearest 64th of an inch.
For example, say I have 0.400-inches. 0.400/0.0156 = 25.6. I round up to 26. This means I should specify 26/64. Now, this fraction can be reduced by dividing numerator and denominator by 2 so I get 13/32. 13/32 = 0.406 with is as close to 0.400 as you can get with a granularity of 1/64th of an inch.
Where did 0.0156 come from? It is 1/64.
If you wanted to get to the nearest 32nd of an inch, divide by 0.0313. The nearest 16th of an inch, divide by 0.0625. I hope you see the trend here. I'm just doubling the previous number.