mathstodonumbernumber-systemvideo
Back to Mathematics

Decimal to Binary Number Conversion

November 10, 2023Updated: November 3, 2024
todonumbernumber-systemvideo

In this post we will cover how to convert decimal number to binary number. For binary to decimal conversion refer - [Binary to Decimal Number Conversion](binary-to-decimal-number-conversion).

Procedure

To convert a decimal number to any other number system, follow these steps:

  1. Modulo Operation: Compute the remainder of the number when divided by the base, i.e., number % base.
  2. Record the Remainder: Write down the remainder obtained.
  3. Division Operation: Divide the number by the base, i.e., number / base.
  4. Repeat: Continue the above steps until the number becomes zero (number > 0).

Finally, write down all the remainders in reverse order to get the binary representation.

Example

Let's convert (22)10(22)_{10} into Binary format, where base value is 2.

Pictorial Explanation

decimal-to-binary-conversion.excalidraw

Video Explanation

<div class="youtube-embed"><iframe src="https://www.youtube.com/embed/XvYaQ1mwo78" frameborder="0" allowfullscreen></iframe></div>

More Examples

Here's a quick reference table that shows the binary equivalents of decimal numbers from 0 to 9:

DecimalBinary
00000
10001
20010
30011
40100
50101
60110
70111
81000
91001