Reputation: 1861
I'm looking for division algorithm which will be equivalent to peasant multiplication algorithm, but i coudlnt find anything except fourier division algorithm, but maybe Someone coudl tell me about some other alogorithm ? Which will only use +
,-
and shifting operations.
Upvotes: 0
Views: 175
Reputation: 19601
If you do ordinary long division and write the numbers in base two you only need to do addition and subtraction because you work out the result one digit at a time. When microprocessors didn't have multiplication or division instructions this sort of thing was fairly common - see e.g. http://6502org.wikidot.com/software-math-intdiv
Upvotes: 1