5 kyu

Bit calculator

1,451 of 2,120riomus

Description:

In this kata your task is to create bit calculator. Function arguments are two bit representation of numbers ("101","1","10"...), and you must return their sum in decimal representation.

Test.expect(calculate("10","10") == 4);
Test.expect(calculate("10","0") == 2);
Test.expect(calculate("101","10") == 7);

parseInt and some Math functions are disabled.

Those Math functions are enabled: pow,round,random

Bits
Mathematics
Algorithms

More By Author:

Check out these other kata created by riomus

Stats:

CreatedFeb 1, 2014
PublishedFeb 1, 2014
Warriors Trained3555
Total Skips577
Total Code Submissions7730
Total Times Completed2120
JavaScript Completions1451
C# Completions675
Total Stars66
% of votes with a positive feedback rating90% of 301
Total "Very Satisfied" Votes244
Total "Somewhat Satisfied" Votes52
Total "Not Satisfied" Votes5
Total Rank Assessments13
Average Assessed Rank
5 kyu
Highest Assessed Rank
3 kyu
Lowest Assessed Rank
6 kyu
Ad
Contributors
  • riomus Avatar
  • kazk Avatar
  • user5036852 Avatar
  • hobovsky Avatar
Ad