multiply the decimal value by 2, write out the value, take the decimal
part and multiply by 2 again and write out the value... once you have
zero multiplied by 2 you can stop. After you have finished, take the
whole part of the numbers you wrote out and read from top to bottom
and that is the value.
ie) 0.625(2) = 1.25
0.25(2) = 0.5
0.5(2) = 1.0
0.0(2) = 0.0 (you dont need this line, its just to show we
are finished)
So reading from top down, 0.625 in decimal = 0.101 in binary
I believe this was the first day of notes as well in case you are
trying to find it.
Thanks alot,
We know that 0.625 = 0.5 + 0.125 = 2^-1 + 2^-3 = 0.101_2 ("_2" denotes
"in binary")
This follows because, if you look at integers, you have that the 1st
place holder is 2^0, 2nd is 2^1, 3rd is 2^2, etc., so the first after
the decimal place would be 2^-1, second 2^-2, 3rd 2^-3, etc.
I use a similar approach to do simple decimal-binary calculations for
numbers less than 2^13 (since I can't be bothered to memorize 2^13 but I
know my other powers of 2, although it can theoretically be used for any
conversion). It's much faster than doing the division algorithm we
learned in class (although it's much easier to make a mistake, so be
careful).