title: Adding two binary strings
body: <p>How does code block in while loop execute?</p>
  
  <pre><code> string addBinary(string a, string b)
      {
          string s = "";
  
          int c = 0, i = a.size() - 1, j = b.size() - 1;
          while(i &gt;= 0 || j &gt;= 0 || c == 1)
          {
              c += i &gt;= 0 ? a[i --] - '0' : 0;
              c += j &gt;= 0 ? b[j --] - '0' : 0;
              s = char(c % 2 + '0') + s;
              c /= 2;
          }
  
          return s;
      }
  </code></pre>
  
  <p>Also here <code>c</code> is <code>int</code> type, then what does <code>c%2+'0'</code> and any char <code>a[i]-'0'</code> mean?</p>