In order to convert decimals to binaries, we reverse the process outlined in Section G.1 for converting a binary to a decimal.

41 =_{10} | 20×2 | + 1 | Dividing 41 by 2, gives the quotient 20 and remainder 1. |

20 =_{10} | 10×2 | + 0 | We again divide the current quotient 20 by 2. |

10 =_{10} | 5×2 | + 0 | |

5 =_{10} | 2×2 | + 1 | We repeat this procedure until ... |

2 =_{10} | 1×2 | + 0 | |

1 =_{10} | 0×2 | + 1 | ... the quotient is 0. |

41 =_{10} | 101001_{2} |

The divisor used in the steps above is the base of the target number system (binary, base 2). The binary value, 101001` _{2}`, is represented by the remainders, with the last remainder as the left-most bit. Back substitution of the quotient gives the same result:

41_{10} | = (((((0×2 + 1)×2 + 0)×2 + 1)×2 + 0)×2 + 0)×2 + 1 |

= 1×2 ... |

Start Free Trial

No credit card required