How do I find $4$ digit $10$'s complement of $-456$ (withbase $10$)?
I am able to do $4$ digit $10$'s complement of a positive number (base 10) using the formula
$base^n - number$
where $n$ is the number of digits, in this case $4$.
i.e. $4$ digit $10$'s complement of $456$ is
$10^4 - 456 = 9544$
But I can't seem to find the negative. I've tried googling and looking in StackExchange Math but none seems to fit what I need.
I would appreciate any help!
Taking base($=$radix) as $r$ and $n$ number of digits, so called, Radix-Complement Representation for the complement of $n$-digit number is obtained by subtracting it from $r^n$. If $D$ is between $1$ and $r^n − 1$, then subtraction produces again result between $1$ and $r^n − 1$. For example for number $1849$ it's $10$'s complement is $8151$, for $100$ it's $10$'s complement is $9900$. So, you computation is correct, you obtained $10$'s complement in $4$ digits of $456$ and it is $9544$.
"negative" $(-456)$ i.e. complement of $456$ is exactly $9544$ in $10$'s complement representation. Now if you take $10$'s complement of $9544$ i.e. $(-(-456))$, then you, obviously, obtain $456$.
Addition.
Let's look in more detail. In $n=4$ digits we have $10^n=10000$ possible decimal combinations from $0$ up to $9999$. Now, when we have only this combinations, but we want to have also negative numbers, then in $10$'s complement representation we make following: we leave $0$ in its place and keep first $\frac{10^n}{2}-1$ combinations as positive numbers i.e. from $1$ up to $\frac{10^n}{2}-1=4999$. And we call negative numbers all numbers from $\frac{10^n}{2}=5000$ up to $9999$. Finally we have positive $4999$ numbers, negative $5000$ numbers and zero.
So, $9544$ is $10$'s complement representation of $(-456)$ and it is $10$'s complement of $456$.
Some books use circle for radix complement representation: $0$ is north pole. Increasing direction is clockwise and south pole is first negative number. BTW south pole is most bad place in this representation.