How was the 10's complement calculated for the signed numbers below?

6.3k Views Asked by At

In the image below, why is the given sum equal to +10, 627 ? Why the 10's complement of +9286 is 990714 and not 000714 (10000-9286) ? Why was there an overflow in part b) ?

enter image description here

1

There are 1 best solutions below

3
On

First of all, 10,627 is a mistake. They probably changed the operands and forgot to update the result.

Ten's complement arithmetic works just like two's complement arithmetic. I'll assume you are at least a bit familiar with that.

If you want to represent absolute values that require 5 digits, you need 6 digits, regardless of the base. Complementation of $x$ is equivalent to computing $10^6-x$. (In general, $b^n-x$ if $b$ is the base and $n$ is the number of digits.)

The arithmetic is done modulo $10^n$ (that is, $b^n$). Hence everything in excess of $10^n-1$ is thrown away. There's "overflow" also in case (d), even though it's not mentioned in the solutions.