Binary Sum

  • number
  • string

Write a function that takes two binary strings and returns their sum (also a binary string).

Binary Sum
Examples:
  • ('0000101', '0000010') -> '0000111';
  • ('0000001', '0000001') -> '0000010';
  • ('111111', '000001') -> '1000000';
  • ('111111', '111111') -> '1111110';
  • ('111111', '000000') -> '111111';

Write your solution

Loading...