DEV Community

HandsomeTan
HandsomeTan

Posted on

The conversion between decimal and binary

For integer parts, let the integer divides by k to which this integer part require to be converted, then fetch the resulting remainder and so on. Lastly, connect thse reminder together in order from bottom to top. For fraction part, let this part multiply by k, then fetch the integer part of resulting product and continue to make resulting remainder to mutiply by 'k' and so on. Finally, connect these integer parts in order from top to bottom.
The fundamental related to this method is not listed here and you can search for information about it on internet if you want to know that.

Top comments (0)