0.1₁₀ → binary — number base conversion
corenon-terminating in base 2
Answer
0.0(0011) repeating
Why this example is worth doing
One tenth has no finite binary representation: the multiplication cycle repeats forever with period four. This is the arithmetic root of every floating-point surprise a programmer ever meets, and the reason 0.1 + 0.2 is not 0.3 in most languages. The tool detects the cycle exactly using rational arithmetic rather than floating point — computing the repetend in floating point gets it wrong for exactly this value — and marks the repeating block.
Try your own input in the Binary ⇄ decimal ⇄ hex ⇄ octal. Convert between any two bases, integers and fractions, with the positional working.
How the answer is reached
Base 10 to base 2
Convert 0.1 from base 10 to base 2. The sign is carried across unchanged; only the magnitude is converted.
| digit | value | weight | weight (base 10) | digit x weight |
|---|---|---|---|---|
| 0 | 0 | 10^0 | 1 | 0 |
| 1 | 1 | 10^-1 | 0.1 | 0.1 |
| total | 0.1 |
Integer part: divide by 2 and read the remainders bottom to top.
| n | divide by | quotient | remainder |
|---|---|---|---|
| 0 | 0 ÷ 2 | 0 | 0 |
Fraction part: multiply by 2 and read the digits top to bottom.
| fraction | multiply by | product | digit |
|---|---|---|---|
| 0.1 | 0.1 × 2 | 0.2 | 0 |
| 0.2 | 0.2 × 2 | 0.4 | 0 |
| 0.4 | 0.4 × 2 | 0.8 | 0 |
| 0.8 | 0.8 × 2 | 1.6 | 1 |
| 0.6 | 0.6 × 2 | 1.2 | 1 |
0.1 (base 10)0.0(0011) (base 2)
The expansion repeats: the digits in brackets recur forever (period 4). Write them under a vinculum on paper.