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
If you had a cylinder, sealed at both ends, with the pressure rising inside, would it blow at the end or split along the side first?
WHAT HAPPEN WHEN ANY SPINDLE RUN OVER 10 MM HEIGHT ABOVE BOLSTAR IN RING SPINNING FRAME
what is the quantity of cement and sand in 1 sq.m (mortar ratio ) a, 1:4 b, 1:3 c, 1:6
Guys! I coplted 10th with 80% and +2 with 64% now am dng c.s.e b.tech...i want to go abroad for higher studies i want to write tofel...plZ GIVE UR SUGGESTIONS!
A short CI column of hollow circular section has projecting bracket carrying a load of 10 tonnes. The load line is off the column by 20cm. The external diameter of the column is 350mm and thickness of metal is 25 mm. Find the maximum stress intensity in the section.
I want to join for load runner training..please suggest me which is the best institute for load runner training in bangalore?
what are the artifacts in coding phase in SDLC????
What is Mointer in Operating System?
can anybody send me the technical papers of hewitt associates pls...I cleared aps n GD n has only less time for technical round?
performance test required for a automatic bank teller?
what books to prepare for atc please
how can read number 1 to 100,without use anyloop.
what is software engineer
hi,i just want to know the best institute to learn oracle in bangalore because i am doing my BE there?
draw diagram of earthings