GATE CSE
First time here? Checkout the FAQ!
x
+5 votes
127 views

 

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

asked in Digital Logic by Veteran (16.4k points) 15 135 252 | 127 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 : http://stackoverflow.com/questions/25748301/self-complementing-codes-excess-3-84-2-1-2421

answered by Veteran (87.4k points) 15 57 292
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!


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
Top Users Oct 2017
  1. Arjun

    23242 Points

  2. Bikram

    17048 Points

  3. Habibkhan

    7096 Points

  4. srestha

    6012 Points

  5. Debashish Deka

    5430 Points

  6. jothee

    4928 Points

  7. Sachin Mittal 1

    4762 Points

  8. joshi_nitish

    4278 Points

  9. sushmita

    3954 Points

  10. Rishi yadav

    3744 Points


Recent Badges

Popular Question Rahul Jain25
Popular Question Ml_Nlp
Notable Question set2018
Notable Question rahul sharma 5
Notable Question Sanjay Sharma
Notable Question Lakshman Patel RJIT
Popular Question makhdoom ghaya
Popular Question Çșȇ ʛấẗẻ
Reader kenzou
Popular Question mystylecse
27,262 questions
35,076 answers
83,760 comments
33,185 users