Convert an integer to another base by repeated division and reading the remainders backwards. Convert a fractional part by repeated multiplication and reading the integer parts forwards. Some fractions terminate in one base but repeat forever in another.
Worked example
For decimal 13, division by two gives remainders 1, 0, 1, 1; reading upwards gives 1101. For 0.625, successive multiplication by two gives 1.25, 0.5 and 1.0. The extracted digits are 101, so 13.625 becomes binary 1101.101.
What to watch for
Do not reverse the fractional digits. A fixed number of bits may require rounding when the fraction does not terminate.
Try it yourself
Write decimal 5.25 in binary.
Answer: 5 is 101 and 0.25 is 0.01, because the second fractional weight is one quarter. Together they give 101.01.
How to study this topic
Write the base and bit width beside every value. Expand place weights before using a shortcut, then convert your answer back to decimal as an independent check. Representation and value are different ideas.
Explore related programmes
These recorded programmes are upcoming. This article is general educational content, not a syllabus or course sample.
Digital Electronics