• edited by
9,640 views
13 13 votes

When two $n$-bit binary numbers are added the sum will contain at the most

  1. $n$ bits
  2. $n + 2$ bits
  3. $n + 3$ bits
  4. $n + 1$ bits

4 Answers

Best answer
12 12 votes

Answer: (d)

This I think can be proved using induction, but that would be much more complicated than required to understand the intricacies. So, I will go with the intuitive approach.

At some point in addition of two n-bit numbers when two bit are added we inurn add three bits. First bit is the bit from the first operand, the second bit is the bit from the second operand and then third bit is the carry bit resulted due to addition of bits at previous place value.

Let the $n^{th}$ bit of operands including the carry bit (obtained from addition of bits at previous place value) be $1$ so as to get the maximum sum. In such a case the $n^{th}$ bit addition will give $11$, where the most significant bit is carry bit but ultimately become the most significant bit of final result. Thereby increasing the number of bit of result by just one. 


There is another way of convincing yourself that the result of addition will not have more than $(n+1)$ bits. For some value of $n$ perform addition with $2^n-1$ (largest n-bit binary number) as its both the operands and see if the result you get is of $(n+1)$ bits or not.

• selected by
4 4 votes

See, in worst case what will happen? 

like for 2 bits:           1  1

                                    1  1


                                1  1   0


for 3 bits:              1  1  1   0


for n bits :                 n+1

0 0 votes
  • Bit Capacity: $n$-bit numbers can represent $2^n$ distinct values.
  • Maximum Sum: The largest possible sum occurs when both $n$-bit numbers are their maximum value (all bits 1).
  • Carry-Out: Adding two $n$-bit numbers can generate a carry-out bit, extending the result beyond $n$ bits.
  • Example: Adding $1111$ (binary 4-bit) and $1111$ results in $11110$ (binary 5-bit, with a carry-out).

Therefore, the sum of two n-bit binary numbers can contain at most $n + 1$ bits to accommodate a potential carry-out.

Answer:
Position:
Show:

Related questions

8 8 votes
1 answers 1 answer
7.4k
7.4k views
sh!va asked May 7, 2017
7,427 views
Estimation at software development effort for organic software in basic COCOMO is:E = 2.0 (KLOC) 1.05 PME = 3.4 (KLOC) 1.06 PME = 2.4 (KLOC) 1.05 PME = 2.4 (KLOC) 1.07...
9 9 votes
5 answers 5 answers
8.9k
8.9k views
go_editor asked Sep 28, 2014
8,939 views
In the context of modular software design, which one of the following combinations is desirable?High cohesion and high couplingHigh cohesion and low couplingLow cohesion ...
9 9 votes
4 answers 4 answers
11.5k
11.5k views
Arjun asked May 9, 2017
11,514 views
What is the minimum number of two-input $\text{NAND}$ gates used to perform the function of two-input $\text{OR}$ gate?OneTwoThreeFour
5 5 votes
3 3 answers
14.6k
14.6k views
sh!va asked May 7, 2017
14,626 views
Advantage of synchronous sequential circuits over asynchronous one is :Lower hardware requirementBetter noise immunityFaster operationAll of the above