So I can do the non fractional part of the conversion (10011 is 19) but I have no idea how to convert .010. I can't find many resources or step by step guides for this either. Am I still using position and powers of 2?
Asked
Active
Viewed 123 times
0
-
You have an algorithm for this, keep multiplying with 2, and sieve out integer part. – jonsno Mar 09 '17 at 13:50
-
look at this stack overflow question and this page to get an idea. By the way $10011.010_2 = 19.25_{10}$ – Dando18 Mar 09 '17 at 13:54
-
Are you converting to or from binary? The question is somewhat confusing. – skyking Mar 09 '17 at 13:57
-
To decimal, apologies! – Chris T Mar 09 '17 at 14:05
2 Answers
1
As in base ten where the first decimal corresponds to $10^{-1}$, the second to $10^{-2}$.
In base two $0.abc...$ correspond to $a2^{-1} + b2^{-2} + c2^{-3}...$ where $a,b,c\in \{0,1\}$ are the bits.
Therefore 0.010 is $0 \cdot 2^{-1} + 1\cdot 2^{-2} + 0 \cdot 2^{-3} = 1/4$.
Zubzub
- 4,143
- 1
- 17
- 25