In binary arithmetic, the two's complement of a number is obtained by adding which quantity to its one's complement?

Difficulty: Easy

Correct Answer: 1

Explanation:


Introduction / Context:
Two's complement is the dominant system for representing signed integers in digital computers. It simplifies arithmetic hardware and unifies addition and subtraction. Converting a binary value to its two's complement form is a key skill in computer organization and low-level programming.



Given Data / Assumptions:

  • Start with a binary number.
  • Compute its one's complement by inverting every bit (0 ↔ 1).
  • Determine what to add to obtain the two's complement representation.


Concept / Approach:
By definition, two's complement is formed by taking the one's complement and adding 1. This method yields the negative of the original number in two's complement arithmetic and supports seamless addition with carry propagation, avoiding separate subtraction circuitry.



Step-by-Step Solution:
Given binary N: produce one's complement N' by flipping bits.Compute two's complement as N_T = N' + 1.Therefore, the quantity to add to the one's complement is 1.Example: For 00101 (5), one's complement is 11010; adding 1 gives 11011, the two's complement (−5 in 5-bit representation).


Verification / Alternative check:
Hardware ALUs implement subtraction A − B as A + (two's complement of B). The consistent rule is invert B and add 1, confirming the 1 addition step is essential.



Why Other Options Are Wrong:

  • 0: Adding zero leaves the one's complement unchanged; that is not two's complement.
  • 10 or 12: These are not meaningful scalars in this context; the operation is specifically +1 in binary.
  • None of the above: Incorrect because adding 1 is the exact rule.


Common Pitfalls:
Forgetting to add the 1 after inversion, or confusing sign-magnitude with two's complement representation. Always invert then add 1.



Final Answer:
1

More Questions from Computer Fundamentals

Discussion & Comments

No comments yet. Be the first to comment!
Join Discussion