Tuesday 23 June 2015

Q7,p2,d14. The Excess-3 decimal code is a self-complementing code because



(A) The binary sum of a code and its 9’s complement is equal to 9.
(B) It is a weighted code.
(C) Complement can be generated by inverting each bit pattern.
(D) The binary sum of a code and its 10’s complement is equal to 9.
Answer A,C
Explanation.

Excess 3 code is generated by adding 3 and representing in binary form.
0 is represented     011.
1 isrepresented as 100
2  is represented as 101.
3 is represented as 110.

Let take case A.  1 is represented as (100)
9th complement of (100) is 5 represenetd as (101) its sum is 0100+101=1001.equals to decimal 9.
In another case lets take the code 110.its 9’s complement is 3.
Addition 110+011=1001. Hence option A is true.
It is not weighted sum.

Self complimenting code produce 9’s complement on inverting bit.

No comments:

Post a Comment

Note: only a member of this blog may post a comment.