How to take the square root of a number in a negative base?

829 Views Asked by At

For example, in negadecimal (base -10): how to take the square root of $185_{-10}=25_{10}$?

Or in negabinary (base -2): the square root of $1100100_{-2}=36_{10}$?

Converting to another base, taking the square root and converting back to the negative base is not an option. I'm looking for an algorithm fully done in the negative base.

I take the square root of a binary number by dividing a number like $11001_2=25_{10}$ as follows: $01|10|01$

And then conditionally subtracting $01$ from each segment from left to right, adding a $1$ to the answer and appending the answer to the $01$ subtraction. enter image description here