# Decimal to Binary Conversion

**A decimal-to-binary code converter can be found at the bottom of this page. Simply enter the number you wish to convert, and the converter code will also explain the conversion process. Visit our binary conversion page to convert binary to base 10.**

**Decimal-to-binary**, sometimes referred to as "decimal to base 2," follows a straightforward method. It involves dividing the number to be converted, say N, by 2 (since binary is in base 2), and making note of the remainder. We continue dividing the quotient (N / 2) by 2, until we reach the division of (1 / 2), also making note of all remainders.

__Example 1__: Convert 98 from decimal to binary.

1) Divide 98 by 2, making note of the remainder. Continue dividing quotients by 2, making note of the remainders. Also note the star (*) beside the last remainder.

Division | Remainder, R |

98 / 2 = 49 | R=0 |

49 / 2 = 24 | R=1 |

24 / 2 = 12 | R=0 |

12 / 2 = 6 | R=0 |

6 / 2 = 3 | R=0 |

3 / 2 = 1 | R=1 |

1 / 2 = 0 | R=1* |

2) The sequence of remainders going up gives the answer. Starting from 1*, we have 1100010. Therefore, 98 in decimal is 1100010 in binary.

__Example 2__: Convert 21 into binary.

Division | Remainder, R |

21 / 2 = 10 | R=1 |

10 / 2 = 5 | R=0 |

5 / 2 = 2 | R=1 |

2 / 2 = 1 | R=0 |

1 / 2 = 0 | R=1 |

Therefore, 21 in decimal is 10101 in binary.

Home - Number Systems - Add - Subtract - Multiply - Divide - Convert Binary - Convert Decimal - Practice