If I wanted to know how many times the number x needs to be divided by 2 to get its binary form, is there a formula to calculate it? I can't find one.
Asked
Active
Viewed 42 times
0
-
I think it will help if you give some examples where you give the number and the calculation you want. – Will Jagy Jan 23 '20 at 00:46
-
2It's the number of binary digits the number has ($\pm 1$), which is related to its binary logarithm $\log_2$. Is taking log "fast" enough? – peterwhy Jan 23 '20 at 00:53
-
so if I want to calculate how many steps for the decimal number 10240 binary form has 14 digits and I have to calculate $\log_210240 +1$ which means it would take 14 steps? waw thanks – Hiken No Ace Jan 23 '20 at 01:13