Easy · Math

Add binary

Given two binary strings a and b (only '0' and '1', no leading zeros except "0" itself), return their sum as a binary string.

Examples

Example 1

{
  "a": "11",
  "b": "1"
}

Output: 100

Example 2

{
  "a": "1010",
  "b": "1011"
}

Output: 10101

Rebuild it in the studio

Open every published interview problem, solution, scene, and memory room free, with no account.

More Math problems