title: Please explain to me the solution for the problem below
body: <p>Problem:</p>
  
  <p>Consider the problem of adding two n-bit binary integers, stored in two n-element arrays A and B. The sum of the two integers should be stored in binary form in an (n + 1)-element array C. State the problem formally and write pseudocode for adding the two integers.</p>
  
  <p>Solution:</p>
  
  <ol>
  <li>C ← [1 ... n + 1]    ▹ C is zero-filled.</li>
  <li>for i ← 1 to n</li>
  <li>do sum ← A[i] + B[i] + C[i]</li>
  <li>C[i] ← sum % 2</li>
  <li>C[i + 1] ← sum / 2    ▹ Integer division.</li>
  <li>output C</li>
  </ol>
  
  <p>Question:</p>
  
  <ol>
  <li>I thought the C[i] is A[i]+B[i] why are you adding sum ← A[i] + B[i] + C[i] in step 3?</li>
  <li>why sum % 2 (why need to use modulo in step 4?)</li>
  <li>why sum / 2 (why need to use division in step 5?)</li>
  </ol>
  
  <p>Could you please explain above solution with real example? Thanks.</p>