<gouthampradhan>string_AddBinary_1.java
private String calculate(String a, String b) {
    int carry = 0;
    int d = a.length() - b.length();
    StringBuilder sb = new StringBuilder();
    for (int i = a.length() - 1; i >= 0; i--) {
      int first = Integer.parseInt(String.valueOf(a.charAt(i)));
      int second = i - d >= 0 ? Integer.parseInt(String.valueOf(b.charAt(i - d))) : 0;
      int sum = (first + second + carry);
      carry = sum / 2;
      sb.append(sum % 2);
    }
    if (carry != 0) sb.append(carry);
    return sb.reverse().toString();
  }
private String var_0 ( String var_2 , String var_3 ) {
  int var_5 = 0 ;
  int var_7 = var_2 . length ( ) - var_3 . length ( ) ;
  StringBuilder var_9 = new StringBuilder ( ) ;
  for ( int var_11 = var_2 . length ( ) - 1 ;
  var_11 >= 0 ;
  var_11 -- ) {
    int var_16 = Integer . parseInt ( String . valueOf ( var_2 . charAt ( var_11 ) ) ) ;
    int var_17 = var_11 - var_7 >= 0 ? Integer . parseInt ( String . valueOf ( var_3 . charAt ( var_11 - var_7 ) ) ) : 0 ;
    int var_18 = ( var_16 + var_17 + var_5 ) ;
    var_5 = var_18 / 2 ;
    var_9 . append ( var_18 % 2 ) ;
  }
  if ( var_5 != 0 ) var_9 . append ( var_5 ) ;
  return var_9 . reverse ( ) . toString ( ) ;
}
