Skip to content

PRO TIP Block youtube.com at the DNS level — Pi-hole, NextDNS or your hosts file — but allow youtube-nocookie.com and i.ytimg.com. These tutorials keep playing; the rabbit hole does not.

Learning without distractions

How to Convert a Decimal Number to Binary Number || Lesson 8 || Digital Logic || Learning Monkey ||

3.9K views on YouTube

Here we will try to understand How to Convert a Decimal Number to Binary Number.
In our previous discussion, we discussed Binary Number to Decimal Number.
There are two methods to convert a Decimal Number to Binary Number.
Sum of the Weights method.
Double Dabble method.
How to Convert a Decimal Number to Binary Number:

Sum of the Weights Method:

Steps to Convert a Decimal Number to Binary Number using Sum of the Weights Method.

Good for small numbers.
Various powers of 2 needs to be remembered.
First, obtain the largest decimal number which is a power of 2 not exceeding the given decimal number and record it.
Subtract this number from the given decimal number.
Repeat the above process on the successive reminder till you get a ‘0’ reminder.
The sum of the powers of 2 expressed in binary is equivalent to the original decimal number.
This method can also be applied to convert the decimal fractions to the binary.

Let’s understand the above steps by using an example.

Example:

Convert 172.625 to binary.

Consider the decimal integer part first ( 175 ).

Step 1: First, obtain the largest decimal number which is a power of 2 not exceeding the given decimal number and record it.

The largest decimal in powers of 2 not exceeding 175 is 2 power 7 which is 128.

Because if we take 2 power 8 it will 256 which is greater than 175.

Record the binary value of 128 which is 10000000.

Step 2: Subtract this number from the given decimal number.

175 – 128 = 47

Step 3: Repeat the above process on the successive reminder until you get a ‘0’ reminder.

The remainder obtained in the above step is 47.

On 47 we have to repeat step 1 and step 2.

47 – 32 (2 power 5) = 15. (Binary value of 32 is 100000)

Similarly, repeat the process until the remainder is zero.

15 – 8 (2 power 3) = 7. (Binary value of 8 is 1000)

7 – 4 (2 power 2) = 3. (Binary value of 4 is 100)

3 – 2 (2 power 1) = 1. (Binary value of 2 is 10)

1 – 1 (2 power 0) = 0. (Binary value of 1 is 1)

Step 4: The sum of the powers of 2 expressed in binary is equivalent to the original decimal number.

10000000 + 100000 + 1000 + 100 + 10 + 1 = 10101111

10101111 is the binary equivalent of 175.

Similarly, we will convert the decimal fraction to its binary equivalent.

0.625 – 0.5 (2 power -1 ) = 0.125 (Binary value of 0.5 is 0.1)

0.125 – 0.125 (2 power -3 ) = 0 (Binary value of 0.125 is 0.001)

The binary equivalent of ) 0.625 is (0.1 + 0.001 ) = 0.101

Finally, the Binay equivalent of 175.625 is 10101111.101.

Double Dabble method:

Steps to Convert a Decimal Number to Binary Number using Double Dabble Method.

The decimal integer part is converted into a binary integer by successive division by 2.
The decimal fraction part is converted into a binary fraction by successive multiplication by 2.
The decimal integer number is successively divided by 2 till the quotient is zero.
The last reminder is the Most Significant Bit MSB of the binary number.
The remainders are read from the bottom to the top to get the equivalent binary integer.
In the fraction part, the given decimal number is multiplied by 2, until the fraction part of the product is zero or until the desired accuracy is obtained.
The first integer is the Most Significant Bit MSB of the binary number.
The integers are read from top to bottom to get the binary fraction.

Let’s understand the above steps by using an example.

Example:

Convert 172.625 to binary.

Consider the decimal integer part first ( 175 ).

Step 1: The decimal integer number is successively divided by 2 till the quotient is zero.

Step  2 & 3:

The last reminder is the Most Significant Bit MSB of the binary number.
The remainders are read from the bottom to the top to get the equivalent binary integer.

After reading from bottom to top we will get 10101111 which is binary equivalent to the 175.

Similarly, we will convert the decimal fraction to its binary equivalent.

Step 1: In the fraction part, the given decimal number is multiplied by 2, until the fraction part of the product is zero or until the desired accuracy is obtained.

Step  2 & 3:

The first integer is the Most Significant Bit MSB of the binary number.
The integers are read from top to bottom to get the binary fraction.

After reading from top to bottom we will get 101 which is binary equivalent to the .625.

Finally, the Binay equivalent of 175.625 is 10101111.101.

Link for playlists:
https://www.youtube.com/channel/UCl8x4Pn9Mnh_C1fue-Yndig/playlists

Link for our website: https://learningmonkey.in

Follow us on Facebook @ https://www.facebook.com/learningmonkey

Follow us on Instagram @ https://www.instagram.com/learningmonkey1/

Follow us on Twitter @ https://twitter.com/_learningmonkey

Mail us @ learningmonkey01@gmail.com