vadimgoncharov / bit-calculator

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Bit Calculator

Node Version 6.x.x Build Status Coverage Status

Function arguments are two bit representation of numbers ('101', '1', '10'...), and must return their sum in decimal representation.

Requirements

  • Not allowed to use parseInt and toString methods

Examples

console.assert(calculate('10', '10') === 4);
console.assert(calculate('10', '0') === 2);
console.assert(calculate('101', '10') === 7);

About

License:MIT License


Languages

Language:JavaScript 100.0%