Algorithm 3.6 and Algorithm 3.14 provide a way to determine the quotient and remainder of a division problem by repeatedly subtracting or adding a fixed value, and that process has a very different feel from the process of long division that is often introduced in early mathematics. While the steps provided in the Division Algorithm always produce the correct quotient and remainder for the division problem given by valid input values, the process could be quite long if the number of steps required is very big. So, we now provide a second (often more practical) way to use a basic calculator to get the quotient and remainder of a division problem.
Rather than laboriously writing out the algorithmic steps of long division, we will demonstrate the process by example.
Example3.26.\(300 \fdiv 16\) and \(300\fmod 16\) with long division.
Let \(a := 300\) and \(b := 16\text{.}\) We perform the following long division:
Then, \(q = 18\) and \(r = 12\text{,}\) and we write \(300 \fdiv 16 = 18\) and \(300\fmod 16 = 12\text{.}\)
With a calculator the process of finding \(q=a\fdiv b\) and \(r=a\fmod b\) for an integer \(a\) and natural number \(b\) can be shortened. In the video in Figure 3.27 we introduce this method. This is followed by a detailed description of the strategy and more examples.
We now give a detailed description of the process for finding quotients and remainders with a basic calculator.
Strategy3.1.Calculator Long Division.
Suppose we are given an integer \(a\) and a natural number \(b\text{.}\) We give a strategy for finding the quotient \(a\fdiv b\) and the remainder \(a\fmod b\) with a calculator.
(a)
To find \(a\fdiv b\) and \(a\fmod b\) we set up the long division problem:
The quotient \(q\) is the biggest integer that is less than or equal to the numerical value of \(a \div b\text{.}\) If \(a\div b\) is an integer, then set \(q:=a\div b\text{,}\) otherwise, \(q\) is the integer to the left of \(a \div b\) on the number line. Place the entire quotient \(q\) on top of the long division:
A calculator gives us that \(300 \div 16 = 18.75\text{.}\)
(c)
The integer on the number line to the left of \(18.75\) is \(18\text{,}\) so we set \(q:=18\text{.}\) Place the entire quotient on top of the long division:
A calculator gives us that \(-457 \div 24 = -19.0416\dots\text{.}\)
(c)
The integer on the number line to the left of \(-19.0416\dots\) is \(-20\) so we set \(q := -20\text{.}\) Place the entire quotient on top of the long division:
Then \(q=-20\) and \(r=23\text{.}\) So we have \(-457 \fdiv 24 = -20\) and \(-457\fmod 24= 23\text{.}\)
In Checkpoint 3.31 use the strategy described above to find the quotient and remainder.
Checkpoint3.31.Quotient and remainder with long division.
Find the quotient and remainder of the division of \(-3262\) by \(258\text{.}\) Give at least one digit after the decimal point.
With a calculator compute \(d:=-3262\div 258=\) .
The quotient \(q\) is the integer to the left of \(d\) on the number line. Thus \(q=\) .
The remainder is \(r:=-3262-(258\cdot q)=\) .
So we have found that \(-3262\;\mathrm{div}\; 258=\) and \(-3262 \bmod 258=\).
When we divide a positive integer \(a\) by an integer \(b\) that is greater than \(a\) we can easily read of \(a\fdiv b\) and \(a\fmod b\text{.}\) Namely we have \(a\fdiv b=0\) and \(a\fmod b=a\text{.}\) Nevertheless, we consider this case an example, to see how our strategy performs in this case.
Example3.32.Divide \(10\) by \(55\) with calculator long division.
We find \(10 \fdiv 55\) and \(10\fmod 55\text{.}\) Let \(a = 10\) and \(b = 55\text{.}\) We use Strategy 3.1 to compute the quotient \(q=10\fdiv 55\) and remainder \(r=10\fmod 55\) of the division of \(10\) by \(55\text{.}\)
Then, \(q = 0\) and \(r = 10\text{,}\) and we have \(10 \fdiv 55 = 0\) and \(10\fmod 55=10\text{.}\)
When \(a\div b\) is an integer then the quotient \(a\fdiv b\) is equal to \(a\div b\) and the remainder is zero. We demonstrate that we also obtain this result using our calculator long division strategy.
Example3.33.Divide \(480\) by \(160\) with calculator long division.
We find \(480\fdiv 160\) and \(480\fmod 160\text{.}\) We use Strategy 3.1.
The closest integer to the left of \(104.4482..\text{.}\) on the number line is \(104\text{.}\) This is the quotient. Now we use it to compute the remainder:
The integer on the number line to the left of \(-1.48611..\text{.}\) is \(-2\) (starting at -1.48611 we go left on the number line until we find an integer). Thus \(-2\) is the quotient.
Now we compute the remainder by subtracting the quotient \(-2\) times \(72\) from \(-107\text{.}\)