FWIW, I posted an integer sqrt algorithm in Python that uses no division, only bitshifts.
stackoverflow.com/a/70841843/4014959 Of course, it's not as fast as implementations in C, but I mostly wrote it to illustrate the algorithm. Think of it as runnable pseudocode. ;) It'd be easy to adapt it to C, if you have code for basic arbitrary precision integer arithmetic.