1

As we know BCD is weighted as 8421. If we just place 1010 it becomes 10. But in reality its 0001 0000. Why is it like this ?

Soham De
  • 131
  • 1
    It's the whole point of BCD. The purpose is to have a binary representation that maps easily to base-10 representation. Cheap calculators use it, and it's also useful for financial calculations in which you don't want to deal with rounding problems when converting between base 2 and base 10. – Fabio Somenzi Dec 14 '16 at 16:15
  • 1
    For instance, $1/5$ has an exact finite representation in base $10$ ($0.2$), but in base $2$ it's $0.00110011...$. For people working with dollars and cents (or any other currency) this is not desirable. – Fabio Somenzi Dec 14 '16 at 16:21
  • The first 4 bits are the first digit 1. The second 4 bits are the second digit 0. – Ali Caglayan Dec 20 '16 at 06:25

1 Answers1

1

Because in BCD, each group of four represents one decimal digit. So the first four bits can only be used to represent 0-9, even though they COULD represent anything up to 16.

Why was it done this way? Probably to make it really easy to read off the decimal equivalent of the number, without any "carrying", etc.

John Hughes
  • 93,729
  • Thanks for the difference ! So can I say in a way BCD is kind of a subset of binary way of representing numbers ? If we take number 12 for example binary = 1100 , BCD= 0001 0010, so BCD is like representing decimal numbers like binary numbers but instead using 0-9 for each place like ones, tens hundreds and thousands. Got the difference now :) – Soham De Dec 14 '16 at 17:15
  • Yep, you've got it. – John Hughes Dec 14 '16 at 17:38