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 from in an (n+1)-element array C. State the problem formally and write pseudocode for adding the two integer.

This would be just like adding regular numbers, but instead of carrying when the addition of 2 digits gets 10 or bigger, you will carry when the addition of 2 numbers get 2 or bigger.

First now how to add binary numbers in paper. When you try to add binary numbers in paper, on the side, label the steps that you took
to add 2 binary numbers. Make sure to watch out for weird cases.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.