1,225 views
0 votes
0 votes

How to convert (1234)10, decimal number to 2421 weighted code, self-complimentary code.

1 Answer

1 votes
1 votes
To convert a decimal no. to  2421 weighted code, do as follows:

Ex: 4 can be 2x0+4x1+2x0+1x0 here 4 is 0100

Any number > 4 has msb 1 whereas < 4 msb 0. It is known as self complementary bcz to get a number > 4 take 9's complement.

1 --  0 0 0 1

2 --  0 0 1 0

3 --  0 0 1 1

4 --  0 1 0 0

5 -- 9's complememt of 4 = 1 0 1 1

6 -- 1 1 0 0

7  -- 1 1 0 1

8 -- 1 1 1 0

9 -- 1 1 1 1
thus, 1234 in decimal can be written as 0001001000110100 in 2421 weighted code
edited by

Related questions

0 votes
0 votes
1 answer
1
sh!va asked Mar 3, 2017
477 views
Gray code for number 7 isa) 1100b) 1001c)0110d) 0100
0 votes
0 votes
1 answer
2
HeartBleed asked Feb 4, 2019
1,362 views
Let Z = X – Y, X, Y, Z are signed magnitude numbers and X, Y are represented in n-bit numbers. To avoid overflow minimum number of bits would require for Z is _________...
0 votes
0 votes
2 answers
3
iarnav asked Dec 27, 2017
695 views
How can we convert a signed number to it's equivalent unsigned number?Let's say I have signed number as -2 now what would be it's equivalent unsigned representation. Than...
0 votes
0 votes
2 answers
4
smartmeet asked Jan 10, 2017
540 views
(012.25)16 - (101110.101)2 = (__)2 = (__)10