Repeated division with remainder that determines successive digits of a quotient. To generate the fractional digits in base , multiply the current remainder by , divide by the denominator, and keep the resulting remainder for the next step.
For integers and , an integer division algorithm determines the binary numeral system digits of a quotient by testing and conditionally subtracting successively halved multiples of the divisor. The loop invariant , together with , makes each step a halving of the remaining quotient interval. Start with and large enough that . To decrease by one, subtract from and add to exactly when . Both branches preserve the displayed equality and establish . When , the quotient and remainder conditions hold.
Articles by others on the same topic
Long division is a method used to divide larger numbers that cannot be easily divided in one step. It involves breaking down the division process into more manageable steps. The method is typically taught in elementary arithmetic and consists of a systematic approach to finding the quotient and the remainder of the division of two numbers.