0
\$\begingroup\$
  1. Four bits are required to represent the ten decimal digits, and since there are 2^4 combinations of four binary digits, six combinations are not used and the code is said to contain redundancy.

  2. The four binary digits can be allocated to ten decimal digits in a purely arbitrary manner and it is possible to generate 2.9 • 10^10 four-bit codes, only a few of which have any practical application.

Can anyone explain the second point?

\$\endgroup\$
  • \$\begingroup\$ Where did you get this information from? I would disagree with the second point, as there are only 16 different combinations of 4 binary digits. I've no idea where 2.9E10 comes from \$\endgroup\$ – Matt Taylor Apr 16 '13 at 14:33
  • \$\begingroup\$ I think this has something to do with the notion that if you brute force 10 digits of bcd, that's 40 bits. \$\endgroup\$ – gbarry Apr 16 '13 at 14:58
  • \$\begingroup\$ @MattTaylor digital logic design 4th edition- binary codes for decimal digits... \$\endgroup\$ – bkcpro Apr 16 '13 at 15:33
3
\$\begingroup\$

The mapping ("0000" => '0' decimal, "0001" => 1, "0010" => 2 ... "1001" => '9' decimal) is one possible allocation of binary codes to decimal.

("0000" => 0, "0001" => 1, "0011" => 2, ...) is another, a Gray code.

("1010" => 0, "0010" => 1, "1111" => 2, ...) is another, randomly generated. The mapping doesn't have to be in order, it's just much more convenient that way.

There are 2.9 • 10^10 such mappings from (all the 16 possible 4-bit codes) to (10 decimal digits).

| improve this answer | |
\$\endgroup\$
  • \$\begingroup\$ permutations and combinations: the correct answer is \$ \frac{16!}{6!}\$ = 16*15*14*13*...7 = 29,059430400 \$\endgroup\$ – placeholder Apr 16 '13 at 15:31
  • \$\begingroup\$ The specific math is this: When choosing k (10) items from a pool of (n) 16 in a particular sequence, the number of ways of doing it is n!/(n-k)! For this example, 16!/6! = 2.9e10. \$\endgroup\$ – Dave Tweed Apr 16 '13 at 15:41
  • \$\begingroup\$ the permutations not a problem 16c1*15c1...*7c1.. even i've thought about the same.. i.e. random assignment of 16 4 bit codes for 10 decimals... but why'd he have to say about this arbitrariness... when each decimal corresponds to a fixed number in binary.. why the mapping?? \$\endgroup\$ – bkcpro Apr 16 '13 at 16:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.