I am studying a Computer Organization course, but in the slides it is mentioned that I have to convert fraction numbers to IEEE floating point representation. To do that first, I have to convert the irrational number to fractional representation, for example here are some common fraction approximations:
In the slide, they tried to explain how the fractional approximation of 1/3 was done, but I still didn't understand it:
How do I convert 1/3 to fractional approximation? I can't seem to find any method online?


This is just converting a decimal expression into a binary one. Take, for instance, $0.703125$. First, subtract off the largest power of $2$ that you can; in this case, $\frac{1}{2}$. Now you are left with $0.203125$. Now, the largest power of $2$ less than or equal to the number is $1/8 = 0.125$, and you get $0.078125$ left over. Repeat the process; we can subtract $1/16$ and then $1/64$, and then we are left with $0$. Therefore, $$0.703125_{10} = 0.101101_2 = \frac{1}{2}+\frac{1}{8}+\frac{1}{16}+\frac{1}{64}$$ With rational numbers whose denominator is a power of $2$, the process will eventually terminate. With other rational numbers, it will never terminate, but the pattern of 0's and 1's you get will be periodic. With irrational numbers, it will not be periodic. For the latter two cases, just perform this process to get however many digits you need (for IEEE 32-bit floating point numbers, I believe this number is 24 digits).