Prove that in a self-complementing code the sum of the
weights must be 9?
Answers were Sorted based on User's Feedback
Answer / aamod joshi
Lets assume that the weights are w1,w2,w3 and w4.
Assume the first code is X1X2X3X4 and second number is
Y1Y2Y3Y4 where X1X2X3X4 + Y1Y2Y3Y4 = 9. e.g. if the weights
are 2,4,2,1 then 1011 = (1*2)+(0*4)+(1*2)+(1*2) = 5 and
0100 = (0*2)+(1*4)+(0*2)+(0*2)= 4 i.e. 1011+0100=4+5=9.
Putting this in mathematical equation,
(W1X1 + W2X2 + W3X3 + W4X4)
+ (W1Y1 + W2Y2 + W3Y3 + W4y4)
= 9
Which means
W1(X1+Y1) + W2 (X2+Y2) + W3 (X3+Y3) + W4 (X4+Y4) = 9
Now, as X1X2X3X4 and Y1Y2Y3Y4 are self-complementing, at a
time either of X1 and Y1 can be 1, the other will be zero.
Same for X2,Y2 and X3,Y3 and X4,Y4. Which further means
that X1+Y1 = 1, X2+Y2=1, X3+Y3=1, X4+Y4=1.
So,
W1(1) + W2(1) + W3(1) + W4(1) = 9
i.e. W1+W2+W3+W4 = 9 thus it proves that sum of the weights
has to be 9.
| Is This Answer Correct ? | 86 Yes | 13 No |
Answer / 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 |
Answer / vivek
I really dint understand this question or the answer. can u
please tell me which subject is this question related to ??
| Is This Answer Correct ? | 9 Yes | 9 No |
Answer / poojitha
In general 2421,5211,642-3,84-2-1 and excess-3 codes are satisfies the condition of self complementing code.All the above codes gives sum as 9 as shown below:
2+4+2+1=9
5+2+1+1=9
6+4+2-3=9
8+4-2-1=9
so,in the self complementing code sum of all weights is always 9.
| Is This Answer Correct ? | 6 Yes | 6 No |
Answer / munjal
if I am talking about 8421 code , then the sum must be 15 ,,
the question is limited to only 2421 code......
| Is This Answer Correct ? | 3 Yes | 4 No |
Answer / ankit agrawal
the sum of the number and its complements should be 9999
| Is This Answer Correct ? | 10 Yes | 34 No |
What is the time complexity T(n) of the nested loops below? For simplicity, you may assume that n is a power of 2. That is, n = 2k for some positive integer k. : i = n; while (i >= 1){ j = i; while (j <= n) { <body of the inner while loop > // Needs (1). j = 2 * j; } i = i/2; } :
can u give me the information about the questions asked by the bally in campus
how can i implement a program of polynomial adding,multiplication,through c language???
what are the difference between grounding,earthing and neutral???????....
hi friends, i got selected in tcs, i m doing my b.e in one of the college in coimbatore.. i don have questions to post u.. but i have valid suggestion..its waste to prepare apti for tcs by looking at last 10 year question from internet.they changed all the apti question this year(2009).. but apti questions is easy..prepare critical reasoning for gre 12th edition..mug up the answers in critical reasoning.. u can download ebook for gre 12th edition..solve the critical reasoing question at the same time mug up it.. there were totally 3 critical reasoning question asked.. two for gre 12th edition so if u mug up u can finish two questions in 3 min.. so u will have 27 min for other question so u can work it out and find the ans..above i mentioned as 3 questions tat is 3 question means ,three paargraph.. each para carries 4 question so totally 12 question in critical reasoning.. if u clear all 12 question u will be selected.80% percent sure.then don mug up synonyms from gre barron because they are asking same question from barron but the choice for the questions are changed.. so study synonyms and antonyms from internet.. some pupils have posted the questions.. in tech and h r don use complex word or don show tat u r so dminant.. talk with them how u will speak wit ur friend. u will be through.. don think wat i have posted above is lik some info in other site.. wat i said is true.. they changed apti tis time.. u will be selected if u follow wat i said..again i m saying pls concentrate on critical reasoning.. if all questions in it are right u r through..bye
Q1 Design a webpage for a hotel which displays all the information of the hotel such as rooms available, facilities, and packages along with rate list. Apply the different tags available to give it a good style.
PLEASE SEND ME NIC SCIENTIFIC OFFICER-2009 EXAM PATTERN AND QUESTION PAPERS
Discuss the various process operations, clearly stating what is involved in each process operation.
how am i supposed to convert a class program in C++ to Matlab? Do i also need to make classes in matlab too or I can do it without making classes???Can somebody help....
A rectangular beam section of 300 mm width and 500 mm effective depth is reinforced with 4 bars of 20 mm diameter, what shear reinforcement is required to resist 200 kN shear (use working stress method)?
is a student eligible to sit in the campus selection after getting 55% marks in class 12th.
it consists of 4 panel 2 for computers and 2 for ECE. Here are the questions asked in c-dot for c.s 1. c language. sorting=merge and quick, pointers i.e abut link list insertion deletion ,interpreter vs compiler, preprocessor, macros, what is int, array ,linklist , pointer basic queston were asked. networking = DHCP,ARQ,RARQ,DIFF BETWEEN UDP AND TCP, IF U HAVE MADE ANY LAN CHAT AUR GTALK APPLICATION THEN WHAT IS IMPLEMENTED IN IT I MEAN TCP AUR UDP? DNS, AND THINGS RELATED TO UR PROJECT AUR TRAIING. OPERATING SYSTEM= DEFINATION, FUNCTION , BLOCKED PROCESS, AND ALSO PLZZ GO THROUGH DIFF SCHEDULING ALGO, VIRTUAL MEMORY. JAVA= IF U HAVE DONE COURSE IN JAVA THEN JUSTIFY HOW JAVA IS BETTER DEN C++. PLEASE DO COMPARE PROPERLY BCZ MANY FEATURE OF JAVA ARE ALSO DER IN C++ SO WHAT IS THE BASIC DIFF BETWEEN THEM... DATABASE= SIMPLE PL/SQL QUERRY SYTENX AND INNER JOIN OUTER JOIN SO JUST HAVE A LOOK THAT SIMPLY WHAT ARE THE SYNTAX.... FIRST YOU WULD BE ASKED TO INTRODUCE YOUSELF . SECOND WOULD BE ASKED ABUT YOUR FAV SUBJECT. SO THATS IT ALLL THE BEST............. AND GUYS EVERY ONE SHULD POST THE LIST OF QUESTION ASKED IN ANY COMPANY IN THE FORUM WHERE IN SUBJECT THE COMPANY NAME SHULD BE MENTIONED
Civil Engineering (5086)
Mechanical Engineering (4456)
Electrical Engineering (16639)
Electronics Communications (3918)
Chemical Engineering (1095)
Aeronautical Engineering (239)
Bio Engineering (96)
Metallurgy (361)
Industrial Engineering (259)
Instrumentation (3014)
Automobile Engineering (332)
Mechatronics Engineering (97)
Marine Engineering (124)
Power Plant Engineering (172)
Textile Engineering (575)
Production Engineering (25)
Satellite Systems Engineering (106)
Engineering AllOther (1379)