turbobeast / bin-to-decimal

converts binary numbers into decimal (base 10)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

About

converts binary numbers into decimal (base 10)

License:MIT License


Languages

Language:JavaScript 100.0%