Binary Converter

Enter a number to convert

Summary

  • Number

    0.0

  • Binary

    0.0

Convert the Integer Part

  • Divide the integer by 2
  • Get the remainder
  • Repeat until the quotient is 0
  • Reverse the order of the remainders

i ÷ 2 = q i % 2 = r  

Integer Part: 0

Convert the Fraction Part

  • Multiply the fraction by 2: f × 2
  • Get the integer part of the result: int(r)
  • In the next step use the fraction part of the result: f = r - int(r)
  • Repeat while the fraction part is not 0: f ≠ 0
  • Use the integers in the order they were obtained
f × 2 = r int(r)  

Fraction Part: 0

Concatenate the Integer and Fraction Parts

  • Concatenate the integer and fraction parts
  • Truncate the result to the desired precision
  • Pad the result with 0s to the desired precision

Binary: 0.0