Binary Addition + 0 1 0 1

Published by Juan esteban in

Create a function that takes two numbers and returns their sum as a binary string.

Examples

addBinary(1, 1) ➞ "10"

addBinary(1, 2) ➞ "11"

addBinary(4, 5) ➞ "1001"

Notes

  • Remember to return the converted result as a string.
  • Check the resources tab in case you are stuck :)
Watch a quick demo on how Edabit works.