I tried this before here Convert 34.2111 (decimal) to binary and now I am trying again in a different way.
When you have to convert base a to b where b is a^n you know that n digits of the number in base a = 1 digit in base b. In this case 10 isn't a power of 2 so at best you get $10 = 2^3+2^1$
What this means is that each digit of the given number in base 10 corresponds to 3 digits plus.... something? in base 2.
I did a correspondence table: $$0_{10} = 0_2\\ 1_{10} = 001_2 \\ 2_{10} = 010_2 \\ 3_{10} = 011_2 \\ 4_{10} = 100_2 \\ 5_{10} = 101_2 \\ 6_{10} = 110_2 \\ 7_{10} = 111_2 \\ 8_{10} = 1000_2 = 111_2+1_2 \\ 9_{10} = 1001_2 = 111_2+10_2$$
When I solve exercises like this base b is usually a power of a so I don't "add" anything. I write the correspondences up until n+1 digits (exclusive). If this was base 8 instead of decimal I'd only need to write the correspondences until 111_2. When solving this I noticed that the 3 (from the 34) doesn't correspond to 011_2 or 0011_2 but instead to 011_2+1_2=100_2 (because I do this as if I am solving for base 8 and then I add as if I am solving for base 2... because 10 = 2^3+2^1). So basically... 2 to the power that gives you the number closest to 10 (which is 8) and then add what's missing, which is either 0, 1 or 2 (decimal).
Using this I get:
$$3 = 011_2 + 01_2 = 0100_2 \\ 4 = 0100_2 + 00_2 = 0100_2 \\ 34 = 0100 0000_2 + 0000 0100_2 = 0100 0100_2$$
Only... the answer is 100010 (I'm only counting the integer part to keep it simple).
If I try to solve the decimal part I get:
$$2 = 0010_2 + 00_2 = 0010 \\ 1 = 0001_2 + 01_2 = 0010 \\ 2111 = 0010 0010 0010 0010$$
And this is... wrong.
I know that each unit/digit of that number in decimal is $0111 + 10 = 1001_2$ in binary because what you do is use a power of 2 and then add what's left.. when b is a power of two you don't have to add anything because there's nothing missing. Here it's trickier... if $10 = 2^3+2^1 = 2(2^2+1)$ then maybe a different way of doing this is solving the given digit in base 8, add a zero to the left and then add the excess (mod) to the closest power of 2... in the case of 3 it's one or 01_2 because the closest power is 2...
TL;DR I am trying to find a faster way of converting this than the one in the given link. I know it works but it's too messy. I am trying to apply the method I use for a -> b where b is a power of a but this time with non powers of a. Can anyone help me develop "my" method so I can apply it to these cases too?