Cannot get the correct result following the division algorithm

57 Views Asked by At

I have the following algorithm which is supposed to be a Division algorithm:

enter image description here

where m is a's number of digits and n is the b's number of digits.

I tried to follow the steps taking a = 42 , b = 6 and the base β = 10, but I was not able to get the correct result which is 6.

I realy do not know what I am doing wrong.

For example I calculate the first r as follows : r = 2 * 10 + 4 Is this correct or not ?