Every rational number has a base-2 representation, but only the ones with denominators that are powers of 2 will require a finite number of bits to fully represent it.
For example,
[tex]\dfrac12 = 1\cdot2^{-1} = 0.1_2[/tex]
[tex]\dfrac14 = 1\cdot2^{-2} = 0.01_2[/tex]
[tex]\dfrac34 = \dfrac12 + \dfrac14 = 0.11_2[/tex]
[tex]\dfrac{1023}{1024} = 1 - \dfrac1{2^{10}} = 1_2 - 0.0000000001_2 = 0.1111111111_2[/tex]
whereas a number whose denominator contains anything else like 1/3 will need an infinite number of bits to represent it exactly.
[tex]\dfrac13 = \dfrac1{2^2} + \dfrac1{12} = \dfrac1{2^2} + \dfrac1{2^4} + \dfrac1{48} = \dfrac1{2^2} + \dfrac1{2^4} + \dfrac1{2^8} + \dfrac1{192}[/tex]
and so on, so that it has a repeating but non-terminating base-2 representation
[tex]\dfrac13 = 0.010101\ldots_2[/tex]