how to multiply using shifts


function mul(a,b)
{
	x=0;
	repeat N times
	{
		shiftright ( a -> carry, 1 bit)
		if (carry)
		{
			x += b;
		}
		shiftleft ( b <- 0, 1 bit)
	}
	return x;
}

how to divide using shifts

how to sqrt using shifts

function sqrt(x)
{
	r=0; y=0;
	repeat N times
	{
		shiftleft ( y <- x < 00, 2 bits)
		shiftleft ( r <- 0, 1 bit)
		if (x > r)
		{
			r++;
			x -= r;
			r++;
		}
	}
	return r;
}