0
$\begingroup$

x is an integer, and i can write it with $\log_2 x$ bit, and, viceversa, with $n$ bit i can write a number till $2^n$.. but.. how many bits to write $\sqrt x$ ?

EDIT: the integer part!

  • 0
    ohu yeah ross, i've got the point and i was writing last comment while you get me the solutions! thanks to all!2011-02-07

2 Answers 2

1

If $\sqrt{x}$ is not an integer, it will take a lot of bits.

Hint: If it is an integer (or you are just writing the integer part) you should have a rule of logarithms that will help. Do you know another way to express $\sqrt{x}$?

2

$log_2 \sqrt n = log_2 n^{\frac{1}{2}} = \frac{1}{2} log_2 x$

thanks to Yuval Filmus and Ross Millikan for comments