Computer Science, asked by sivarenuka6186, 1 year ago

Write the procedure to convert fractional Decimal to Binary

Answers

Answered by aqibkincsem
12
Given the fraction decimal number is n and the integral is k we will convert the decimal number n into the equivalent binary number up to k precision after decimal point.

The first step is to divide the decimal number by 2 and store the reminders in an array.

Dividing the quotient by 2 is the next step.

Repeat the previous step where you divide the quotient by 2 until and unless you get to the quotient where it equals to zero.

Equivalent binary number would then become reverse to all the remainders of the step 1.
Similar questions