Decimal to Binary Converter

Calculator

The following calculator will help you to convert a Decimal number to a Binary number.

Examples

In this example, we will convert the positive integer decimal number to a binary number.

The following table provides the detail explanation of how to convert decimal (22) into binary number (10110).

NumberCalculationQuotientRemainder
2222 % 2110
1111 % 251
55 % 221
22 % 210
11 % 201

22 (decimal) = 10110 (binary)

Note: Read the remainder from bottom to top.

Examples

In this example, we will convert the negative integer decimal number to a binary number.

The following table provides the detail explanation of how to convert decimal (-75) into binary number (-1001011).

NumberCalculationQuotientRemainder
7575 % 2371
3737 % 2181
1818 % 290
99 % 241
44 % 220
22 % 210
11 % 201

-75 (decimal) = -1001011 (binary)

Note: Read the remainder from bottom to top.

Explanation: For negative integer decimal to binary number, proceed the steps as same as positive integer decimal to binary number and finally multiply the output by '-1'.

Examples

In this example, we will convert the fractional decimal number (15.125) to a binary number (1111.001).

Here, we have to split the fractional decimal number into two parts.

  1. Integer part - 15
  2. Fraction part - 0.125

Now, convert the Integer part of the given decimal number (15) into a binary number.

NumberCalculationQuotientRemainder
1515 % 271
77 % 231
33 % 211
11 % 201

15 (decimal) = 1111 (binary)

Note: Read the remainder from bottom to top.

Now, convert the Fraction part of the given decimal number (0.125) into a binary number.

NumberCalculationResultInteger
0.1250.125 × 20.2500
0.2500.250 × 20.5000
0.5000.500 × 211

0.125 (decimal) = 001 (binary)

Note: Read the Integer from top to bottom.

Explanation: Here, you have to stop the table when no more fractional part is available in 'Result' column of table 2. 'Integer' column in table 2 occurs from the integer part of 'Result' column of table 2.

Now, join both the result

15.125 (decimal) = 1111.001 (binary)

Useful links

Join Our Channel

Join our telegram channel to get an instant update on depreciation and new features on HTML, CSS, JavaScript, jQuery, Node.js, PHP and Python.

This channel is primarily useful for Full Stack Web Developer.

Share this Page

Meet the Author