In computers, subtraction is generally carried out by

2018

In computers, subtraction is generally carried out by

  1. A.

    9’s complement

  2. B.

    1’s complement

  3. C.

    10’s complement

  4. D.

    2’s complement

Attempted by 1290 students.

Show answer & explanation

Correct answer: D

Answer: 2’s complement

Explanation: Computers generally carry out subtraction by adding the two's complement of the number to be subtracted. This simplifies hardware design and handles signed numbers without separate subtraction circuits.

  • Step 1: Form the two's complement of the subtrahend by inverting all bits (one's complement) and then adding 1.

  • Step 2: Add that two's complement to the minuend using normal binary addition.

  • Step 3: For fixed-width arithmetic, if there is a carry out of the most significant bit, discard it. The remaining bits are the correct result in two's complement representation.

Note: 1's complement and decimal complements (9's or 10's complement) are alternative methods used in other contexts, but two's complement is the standard for binary computer arithmetic because it avoids two zeros and simplifies carry handling.

Example (4-bit): compute 9 − 5.

  • 9 = 1001, 5 = 0101.

  • Two's complement of 5: invert 0101 → 1010, add 1 → 1011.

  • Add: 1001 + 1011 = 1 0100. Discard carry out (leftmost 1) → 0100 = 4, which is the correct result.

A video solution is available for this question — log in and enroll to watch it.

Explore the full course: Nta Ugc Net Paper 1