bin-to-decimal

1.1.1 • Public • Published

bin-to-decimal

Build Status

converts binary numbers into decimal (base 10)

 
var binToDecimal = require('bin-to-decimal');
var dec = binToDecimal('100111100110101'); // 20277

Don't get excited about this. This was an exercise. You should just do.

let bin = 1010101;
let dec = parseInt((bin).toString(), 2); // 85

/bin-to-decimal/

    Package Sidebar

    Install

    npm i bin-to-decimal

    Weekly Downloads

    0

    Version

    1.1.1

    License

    MIT

    Last publish

    Collaborators

    • turbobeast