The Gateway to Computer Science Excellence
First time here? Checkout the FAQ!
+6 votes


Both (B) and (C) is answer? Please confirm?

asked in Digital Logic by Veteran (18.3k points) | 164 views

1 Answer

+9 votes
Best answer

The self complementary code has an important property which is :

Such codes have the property that the 9’s complement of a decimal number is obtained directly by changing 1’s to 0’s and 0’s to 1’s (i.e., by complementing each bit in the pattern)

And for that we require that the sum of digits of the representation should be equal to 9..

This can be also justified that C) is wrong in the following manner:

The decimal digit '0' can be represented in only way in 5 4 2 0 notation which is :  0 0 0 1 (in binary terms) ..So the 1's complement is : 1 1 1 0..So if we write this in decimal we get 5 + 4 + 2  = 11 which itself exceeds 9 first of all and secondly 9's complement of '0' is '9' but we are getting '11' instead..So it is not a self complementing code..

So option B) only satisfies this property..

Hence B) is the correct answer 


Reference :

answered by Veteran (100k points)
selected by
Yes B is only answer, regarding Option C I added 5+4+2+0 as 9 by mistake. so I thought C is also correct Option, thanks for your help and prompt response!

Related questions

+1 vote
0 answers
asked Oct 23, 2017 in Digital Logic by Sourajit25 Junior (605 points) | 164 views
+1 vote
0 answers
asked Jan 5 in Digital Logic by Pawan Kumar 2 Boss (5.1k points) | 49 views
+1 vote
0 answers

34,291 questions
41,038 answers
39,940 users