Perhaps an easier way would be to just do normal long division just in base 2.
1/3 = 0.3333... = 0.????...b
*2 = 0.6666... 0 -> 0.0???...b
*2 = 1.3333... 1 -> 0.01??...b
-1 = 0.3333...
*2 = 0.6666... 0 -> 0.010?...b
etc.Essentially:
1/3 * 4 = 4/3
4/3 = 1 + 1/3
So, working backwards, our number can be more and more closely approximated by repeatedly adding 1 and dividing by 4 - or in binary, prepending a 1 and shifting two places right: 0.01010101...