The Gateway to Computer Science Excellence
First time here? Checkout the FAQ!
x
+3 votes
129 views

The r ’s compliment of an n-digit decimal number N in base r is defined for all values of N except for N = 0. If the given number is (247)9, then its 9’s compliment will be equal to ( _____ )9.

in Digital Logic by (179 points) | 129 views
0
642?

1 Answer

+2 votes
Best answer
If base is r and you need to find r's complement then first find (r-1)'s complement.

Follow these steps:-

1. Subtract each digit of the given number from (r-1).

Here r=9 so r-1=8. Subtract 247 from 888 to get 641.

2. Then add 1 to it. 641+1=642

You can verify it for binary numbers, r=2. Say N=1011 then 1's complement is 0100. How we get it? By subtracting each digit drop from 1. So 1111-1011=0100. And add 1 so 2's complement becomes 0101.
by Boss (22.5k points)
selected by

Related questions

0 votes
1 answer
2
Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
50,339 questions
55,763 answers
192,337 comments
90,771 users