Question regarding r's complement

140 Views Asked by At

This question was asked in a test in my undergrad course

A computer, using 3-digit radix complement arithmetic with an unknown radix r, gives the following results expressed in radix complement form:

(m + n)r = (087)r; (m − n)r = (005)r ; (n − m)r = (184)r

Identify the radix r and the decimal values of m and n.

This is what I did:

Adding last 2 equations,

(m-n+n-m)r = (005)r + (184)r

-> 0 = (005)r + (184)r

-> 0 = 5r0 + 1r2 + 8r1 + 4r0

Because this equation has no integer solutions, therefore no valid r exists.

Am I correct?

1

There are 1 best solutions below

1
On

Assuming that in $3$-digit $r$'s complement, $-x$ is the complement with respect to $r^3$. Let $x = m-n$

$x = (005)_r$

$-x = (184)_r$

$r^3 = 1\cdot r^2 + 8 \cdot r + 9$

Since $-x$ has a $8$ in it, we have $r\ge 8+1$. But then it will not satisfy our derived equation.

Perhaps there was a typo in the exam?