LearnWave
Learn it. Master it.

Encoding Schemes and Number System

Numbers with a fractional part

Convert a decimal fraction to binary.

Decimal fraction to another base: multiply the fraction by the new base. The whole-number part of the result is the next digit; keep the fraction part and repeat. Stop when the fraction becomes 0, when it starts to repeat, or after about 10 steps. Write the digits from top to bottom.

For example, (0.375)₁₀ to binary: 0.375 × 2 = 0.75; 0.75 × 2 = 1.5; 0.5 × 2 = 1.0. Reading from top to bottom: (0.375)₁₀ = (0.011)₂. Some fractions, like 0.1, never end in binary; their digits go on repeating.

Fraction in another base to decimal: the digits after the point have positional values b⁻¹, b⁻², b⁻³… (for base b). So for (110.11)₂: the whole part is 4 + 2 + 0 = 6, and the fraction is 1 × 2⁻¹ + 1 × 2⁻² = 0.5 + 0.25 = 0.75. Total: 6.75. In octal, the first digit after the point is worth 8⁻¹ = 1/8, the second 8⁻² = 1/64, and so on.

Fractional binary to octal or hexadecimal: group the whole-number part from right to left (as before), but group the fraction part from left to right, starting at the point, and add 0s at the end of the fraction if the last group is short.

  • To octal: (11010110.101)₂ = 011 010 110 . 101 = (326.5)₈.
  • To hexadecimal: (11010110.101)₂ = 1101 0110 . 1010 = (D6.A)₁₆.
Fractions: multiply, read top to bottom.
Fractions: multiply, read top to bottom.

Practise this lesson

Questions that get harder as you improve, a Tutor that helps without giving the answer away, and progress you can see. Free for every learner.

No account, no email address. Opens the real product.