An easy method of converting a decimal number into binary number is by dividing the decimal number by 2 progressively, until the quotient of zero is obtained. The binary number is obtained by taking the remainder after each division in the reverse order. This method to convert decimal number into binary number is popularly known as double-dabble method.
Double-dabble method is used for converting integer into binary. However, if the decimal number is a fraction, its equivalent binary number is obtained by continuously multiplying the number by 2 while recording the carry in the integer position each time. This process is repeated until the product becomes zero. The carries in the forward order gives the required binary number.
Steps to convert Decimal Number into Binary:
The steps to convert decimal number into binary may be formulated as below:
Step-1: Separate the number into inter and fraction.
Step-2: Use double-dabble method for converting integer into binary. Divide the integer by 2 progressively until the quotient zero is obtained. The equivalent binary number is equal to the remainder in each division in reverse order.
Step-3: To convert fraction into binary, multiply the number by 2 continuously & record the carry in integer position each time after multiplication. Repeat this till product zero is obtained. The equivalent binary number will be equal to the carries in the forward order.
Step-4: Combine the binary number obtained for inter and fraction to get the overall binary number corresponding to the decimal number.
Let us now consider an example for better understanding of method to convert decimal number into binary number.
Example:
Convert the decimal number 53.625 into an equivalent binary number.
Solution:
Step-1: The integer is 53 and the fraction is 0.625.
Step-2: Double-dabble method to convert integer into binary. Divide 53 by 2 until remainder 0 is obtained.
Division | Generated Remainder |
2) 53 | |
2) 26 | 1 |
2) 13 | 0 |
2) 6 | 1 |
2) 3 | 0 |
2) 1 | 1 |
2) 0 | 1 |
Considering the remainders in the reverse order i.e. from bottom to top, the equivalent binary number is 110101.
Step-3: Fraction conversion into binary number
Multiply the fraction 0.625 by 2 continuously and record the carry in the integer position in each multiplication. Repeat the process till product zero is obtained.
Multiplication | Generated Integer |
2×0.625 = 1.25 | 1 |
2×0.25 = 0.5 | 0 |
2×0.5 = 1.0 | 1 |
2×0 = 0.0 | 0 |
The binary equivalent is obtained by reading the carry term from top to bottom. Thus, the binary form of 0.625 is 101.
Step-4: Combine the binary number obtained in step-2 & 3 together to get the equivalent binary number corresponding to decimal number. Therefore, the binary form of 53.625 will be (110101.101).