Welcome back to Rational Numbers and Terminating Decimals! In our first lesson, we established what rational numbers are — values that can be written as a fraction of two integers with a nonzero denominator. We saw that integers, signed fractions, and finite decimals all belong to this family.
Now, in this second lesson, we pick up a hands-on tool for moving between those two forms: long division. We will use it to convert any fraction into its decimal expansion, one digit at a time. More importantly, we will discover something elegant along the way: the division process itself reveals why every fraction's decimal must either come to a clean stop or settle into a repeating pattern. By the end of this lesson, you will be able to perform the conversion and explain the reason behind the result.
From Fractions to Decimals — Why We Need a Method
In daily life we often need a decimal where we only have a fraction. A recipe calls for 83 of a cup, but your digital kitchen scale reads in decimals. A test score is reported as 20, yet you want a percentage. In situations like these, converting a fraction to a decimal is a practical skill.
Setting Up Long Division for a Fraction
To convert ba into a decimal, we divide the numerator a by the denominator b. Here is the basic setup:
Place inside the division bracket and outside.
A Terminating Example: $\frac{3}{8}$
Let's walk through 83 in full detail. We are dividing 3 by 8.
Step 1 —8 does not fit into , so we write in the quotient and work with . Since , the first quotient digit after the decimal point is , and the remainder is .
Why Remainders Matter
Let's pause and look at the sequence of remainders from the example above: 6,4,0. Three observations are worth noting:
Every remainder is a whole number between 0 and b−1. When dividing by 8, that means the only possible remainders are or — just eight values.
A Repeating Example: $\frac{1}{3}$
Now let's try a fraction whose decimal does not terminate. We divide 1 by 3.
Step 1 —3 does not fit into 1, so we write 0. and work with 10. Since , the quotient digit is , and the remainder is .
Terminate or Repeat: The Only Two Outcomes
Here is the powerful observation that connects everything. When we divide by b, the remainder at every step must be a whole number from 0 to b−1. That gives us at most b possible remainder values, so one of two things must happen:
A remainder of 0 appears. The division stops, and we get a (like ).
When the Repeating Block Starts Late:
Sometimes the repeating pattern does not begin at the very first decimal digit. Let's see this with 65.
Step
Working Value
Quotient Digit
Remainder
1
50÷6
Conclusion and Next Steps
In this lesson we converted fractions to decimals using long division and discovered why every fraction's decimal must either terminate or fall into a repeating cycle. The explanation comes down to remainders: there are only finitely many possible values, so they must eventually repeat or hit zero. This simple fact guarantees that every rational number produces a predictable decimal pattern.
In the next lesson, we will focus on the terminating side of the story and learn how to convert terminating decimals back into their simplest fraction form. But first, it is time to practice: you will work through long divisions step by step, fill in missing digits and remainders, track remainder sequences, and pinpoint exactly where repeating blocks begin. Let's put those division skills to work!
Be a part of our community of 1M+ users who develop and demonstrate their skills on CodeSignal
17
As you may recall, a fraction like 41 and the decimal 0.25 represent the same rational number. We already converted decimals to fractions using place value, but what about going the other direction? When the answer is not obvious from memory, we need a reliable method — and that method is long division. The fraction bar in ba literally means "a divided by b," so to find the decimal expansion we simply carry out that division, one digit at a time.
a
b
If b is larger than a (common for proper fractions), write 0. in the quotient and append a zero to a so you begin working with a×10.
At each step, determine how many times b fits into the current working value, write that digit in the quotient, compute the remainder, bring down the next zero, and repeat.
The remainder at each step is the piece of information that carries forward into the next step. As we will soon see, it holds the key to understanding whether the decimal terminates or repeats.
3
0.
30
8×3=24
3
30−24=6
Step 2 — Bring down a 0 to get 60. Since 8×7=56, the next digit is 7, and the remainder is 60−56=4.
Step 3 — Bring down a 0 to get 40. Since 8×5=40, the next digit is 5, and the remainder is 40−40=0.
The moment the remainder hits zero, the division is finished. No more nonzero values carry forward, so no more digits are produced. The result is:
83=0.375
This is a terminating decimal — the process finished in a finite number of steps because the remainder eventually became zero.
0,1,2,3,4,5,6,
7
A remainder of 0 ended the process immediately.
Each remainder completely determines the next step of the division. If the same nonzero remainder appeared a second time, we would perform the exact same calculation and produce the exact same quotient digit, and then get the exact same next remainder, and so on — forever.
That last point is the big idea. The remainder is the only information carried forward, so once a remainder repeats, every digit that follows is locked into a cycle. Keep this in mind as we look at the next example.
3×3=9
3
10−9=1
Step 2 — Bring down a 0 to get 10 again. We are in exactly the same situation as Step 1. The quotient digit is 3, and the remainder is once again 1.
Because the remainder 1 keeps returning, the digit 3 will repeat forever:
31=0.333…
The decimal never terminates because the remainder never reaches 0. Instead, it cycles back to a value we have already seen, locking the quotient into a repeating loop.
terminating decimal
83=0.375
No remainder of 0 ever appears. With only b−1 nonzero possibilities, within at most b steps a remainder must show up a second time. From that point on, the quotient digits repeat in a cycle, producing a repeating decimal (like 31=0.333…).
There is no third option. Every rational number's decimal expansion is guaranteed to either terminate or repeat, and this guarantee comes directly from the limited supply of possible remainders. This elegant reasoning is sometimes called the Pigeonhole Principle — if you have more steps than available remainders, at least one remainder must be reused.
8
2
2
20÷6
3
2
At Step 2 the remainder is 2, which is the same remainder we got after Step 1. Every subsequent step will therefore produce the digit 3 with remainder 2, over and over. The result is:
65=0.8333…
Notice that the digit 8 appears just once, followed by the endlessly repeating 3. The repeated remainder (2) is what signals the start of the repeating block. By tracking your remainders as you divide, you always know exactly where the cycle begins — no guesswork required.