Binary division restoring method
It's similar to the normal long division algorithm in decimal, with one modification to combine a check for less-than / greater-than with the subsequent subtraction. You can just do the subtraction regardless, and if the value is negative, then you &quot;messed up&quot; and shouldn't have subtracted it. Just add it back to undo the mistake, then continue on to the next digit.
For example, in normal decimal long division, if you were dividing 120 by 8, the first thing you would check is whether 8 &gt; 1. Since it is, you keep the value '8' as the first digit of your partial value and don't do any subtraction. Next you would drop down the 2 and check if 8 &gt; 12. It's not, so determine how many times it goes into 12, which is 1. (In binary, this answer is always 1). And so on...
Using the same example with the &quot;restoring method&quot;, you first do 1 - 8. The answer is -7, so the result will have a 0 in that bit/digit, and you add back +8 to get back to a partial value of 1. Then drop down the 2, do 12 - 8, and get a value of +4. Since it's positive, that digit of the result is a 1.
It's not how I would normally think of doing it, but I suppose it works. The example for decimal won't always work perfectly since it's missing the test for quotient digits 2 through 9.
Also, you asked where the 10 came from. It's just the decimal value of 01010, the first 5 bits of the dividend.