Prove that in a self-complementing code the sum of the
weights must be 9?
Answer Posted / nobody
In self complementing code, 9's complement in decimal is the
1's complement in binary.
Now, assume a code with weights are W1,W2,W3 and W4.
We want to prove that,
W1 + W2 + W3 + W4 = 9
Let 'N' be a number in decimal.
Let N's binary equivalent in given code be
X1X2X3X4
Lets represent complement of N as COMP(N).
Let COMP(N)'s binary equivalent in given code be
Y1Y2Y3Y4
Therefore,
N = W1(X1) + W2(X2) + W3(X3) + W4(X4) ***************[1]
Now 9's complement of N is
[9's COMP(N)] = 9 - N
[9's COMP(N)] = 9 - [W1(X1) + W2(X2) + W3(X3) + W4(X4)]
***** (from eq.1) *******[2]
Now, COMP(N)'s binary equivalent in given code is Y1Y2Y3Y4.
COMP(N) = W1(Y1) + W2(Y2) + W3(Y3) + W4(Y4)
********************[3]
Now as it is a self complementing code, 9's complement in
decimal is equal to the 1's complement in binary.
Therefore,
[9's COMP(N)] = COMP(N)
From [2] and [3]
9 - [W1(X1) + W2(X2) + W3(X3) + W4(X4)] = W1(Y1) + W2(Y2) +
W3(Y3) + W4(Y4)
[W1(X1) + W2(X2) + W3(X3) + W4(X4)] + [W1(Y1) + W2(Y2) +
W3(Y3) + W4(Y4)] = 9
W1(X1+Y1) + W2(X2+Y2) + W3(X3+Y3) + W4(X4+Y4) = 9
****************************[4]
Now, as (X1,Y1) (X2,Y2), (X3,Y3), (X4,Y4) are complements of
each other, their sums will always be 1.
i.e
(X1 + Y1) = (X2 + Y2) = (X3 + Y3) = (X4 + Y4) = 1.
Putting this in eq. [4], we get,
W1(1) + W2(1) + W3(1) + W4(1) = 9
i.e
W1 + W2 + W3 + W4 = 9
| Is This Answer Correct ? | 27 Yes | 4 No |
Post New Answer View All Answers
4. What is your typical way of dealing with conflict?
Dear frds In my office we are using chiller . in that chiller inlet and outlet water diff. is 2.5 decgree always. if i intduce the cooling tower can i get good result in chiller Inlet water. reply plz.
what is the difference between verification and validation
I have Cleared Bank of India Clerical Examination.I just want to know how to prepare for interview and what are the parriculars that I have to submit......Pls someone help me with it
differance between radix sort and radix exchange sort
5. Can you work well under deadlines or pressure?
How do aeroplanes fly? Why can some fly up-side down?
What is the Boundary value analysis and Equlance class partition for select * from emp
What are the differences between 1 dimensional RAM and 2 dimensional RAM?
What is the actual procedure of charging synthetic oil if the machine is under positive refrigerant pressure.
can u tell me any JAM topics.........and answers also...plz send me.........e-mail: anitha839@gmail.com
Tell me about urself? asked me qstns on my resume what about higher studies any plans? where do u find urself after 3-4
what is the Relationship between quantity of Gas and capacity of AC machine in tonnage.
What is the meaning of "co relation" and what is the value of "co relation" in the performance testing environment.
IS THE SAMPLE POINT OF LPG SPHERE TANK PEFOR OR AFTER BUMP?