6 kyu
Adding Binary Numbers
567 of 1,380DivyanshBatham
Description:
##Task:
You have to write a function add
which takes two binary numbers as strings and returns their sum as a string.
##Note:
- You are
not allowed to convert binary to decimal & vice versa
. - The sum should contain
No leading zeroes
.
##Examples:
add('111','10'); => '1001'
add('1101','101'); => '10010'
add('1101','10111') => '100100'
Binary
Bits
Fundamentals
Similar Kata:
Stats:
Created | Aug 4, 2015 |
Published | Aug 5, 2015 |
Warriors Trained | 4270 |
Total Skips | 1048 |
Total Code Submissions | 9908 |
Total Times Completed | 1380 |
JavaScript Completions | 567 |
Ruby Completions | 117 |
Python Completions | 552 |
C# Completions | 186 |
Total Stars | 105 |
% of votes with a positive feedback rating | 87% of 319 |
Total "Very Satisfied" Votes | 261 |
Total "Somewhat Satisfied" Votes | 34 |
Total "Not Satisfied" Votes | 24 |