+1 vote
368 views

How to find 4's complement of $7_{10}$?

Approach 1: Convert to base-4 and find its radix complement

$7_{10} = (13)_4$

Radix complement(4's complement) = $21_4 = 9_{10}$ (result)

Approach 2: Convert to base-5 and find its diminished radix complement

$7_{10} = (12)_5$

Diminished radix complement (4's complement) = $(32)_5 = (17)_{10}$ (result)

Are these approaches correct? If yes, why different results?!

closed with the note: Solved in comments

closed | 368 views
0

If n = number of digits , x is a number in the given radix

Now , if radix = p , then radix complement ie p's complement = pn - x

if radix =  q , then diminished radix complement ie. (q-1)'s  complement = (qn-1) - x

Now , if we equate both , pn - x  = (qn-1) - x

pn = qn-1

Now, suppose , if n = 1 , p=2 ,q= 3...then both will give same result

but if n = 2 then both will not give the same result...

So, we can say radix complement for base 'r' will not always be same as diminished radix complement for base 's'

for example , 2's complement for base 2 = 2n - x but 2's complement for base '3' , it will be (3n-1) - x

Here ,   We have to find 4's complement of 710 in base 4

So, 710 = (13)4

Now , (42-1)10 - (13)4 + 1

(15)10 - (13)4 + 1

(33)4 - (13)4 + 1

(21)4 = (9)10

So, 4's complement of 710 in base 4 will be 910

Now , We will find 4's complement of 710 in  base 5

So, 710 = (12)5

(52-1)10 - (12)5

(24)10 - (12)5

(44)5 - (12)5

(32)5 = (17)10

So, both are different because radix are different in both cases.

0
Thanks for the explanation.

If one asked 4's complement of $7_{10}$ then should we go with approach 1 or 2?! I mean, is there a standard to such questions?
+1

@akhilesh , base should be given in the question otherwise it does not make any sense..

Question should be like this :- "Find the 4's complement of (7)10  in base 4"

(or)

"Find the 4's complement of (7)10  in base 5"

0
diminished radix complement means (r-1)'s complement

right?

then diminished radix complement of $\left ( 17 \right )_{10}=\left ( 122 \right )_{3}$

then 4's complement will be 333-122=211+1=$\left ( 212 \right )_{4}$

Am I wrong?
https://gateoverflow.in/94054/digital-6s-complement
0

@srestha ,

Formulae of both radix and diminished radix complement are in base 10. so we have to convert it into required base

if we want to find 3's complement of (17)10 in base 4

then we have to 1st convert it into base(radix) 4

So , (17)10 = (101)4

Now , diminished radix complement or 3's complement will be =  [(43 - 1)]10 - (101)4 = (63)10 - (101)4

= (333)4 - (101)4 = (232)4= (46)10

Now 4's complement in base 4 will be = (232)4 + 1 =(233)4 = (47)10

0

" diminished radix complements are called by the radix − 1 "

means diminish radix complement of 5 is base 4 of a number

right?

+1

radix complement = r's complement  = (rn)10 - Number

diminished radix complement = (r-1)'s complement = (rn - 1)10 - Number

(rn - 1)r represents maximum number in radix/base 'r' with n digits

For example 999 is maximum 3 digit number in decimal number (base-10) system

777 is maximum 3 digit number in octal number system(base-8)

333 is maximum 3 digit number in base-4 number system..

0
yes thanks

Approach 1 is wrong:- First understand what we mean by b's complement (diminshed  radix complement). Take a number X  of n digit and find (bn -1) and subtract X from it.

You are converting to base 4 and its diminshed radix complement will be 3's complement no. 4's complement.

by Active (3.2k points)

1