2019 20 1c

Computer Organization and Architecture2019-202 marksNumericalArithmetic & logic unit design

Perform the 2's complement subtraction of smaller number (101011) from larger number (111001).

Perform the 2's complement subtraction of smaller number (101011) from larger number (111001).

To subtract a smaller number from a larger one with 2's complement, we add the 2's complement of the smaller number to the larger number. The final carry out is thrown away.

The 2's complement of $101011$ is found by inverting every bit, which gives $010100$, and then adding 1:

$$010100 + 1 = 010101$$

Now add this to the larger number:

$$111001 + 010101 = 1,001110$$

The extra carry bit $1$ on the left is discarded. Therefore the answer is $001110$, which is $14$. Check: $57 - 43 = 14$.

Short on time? The 1, 5 and 10 mark versions of this answer, flashcards and practice sets come with a program pass.

Up nextWhat is the role of Multiplexer and Decoder?