To convert to binary the fractional part of a decimal number, you can multiply succesively the fractional part by 2. Each product will produce a 0 or a 1 in the integer part, which will be each digit of the binary representation (in order from left to right).
You can continue multiplying until the fractional part is 0, or until you obtain the number of digits needed (and then truncate or round).
Note that only the fractional numbers that are sum of negative powers of two will have an exact representation. You'll find that decimal numbers with a few digits are periodic in base 2.
From your examples the binary representation of 0.008 will start with 0.00000010...
0.008 x 2 = 0.016 First fractional digit is 0
0.016 x 2 = 0.032
0.032 x 2 = 0.064
0.064 x 2 = 0.128
0.128 x 2 = 0.256
0.256 x 2 = 0.512
0.512 x 2 = 1.024 First one
0.024 x 2 = 0.048
...
Note that multiplying by 2 in base two is equivalent to a shift to the left, or to move the dot to the right one digit, hence moving to the integer part the first fractional digit.