0
Binary Coded Decimal with Example
Decimal numbers can also be represented directly by using binary digits in a coding scheme called the binarycoded decimal (BCD) code. We now illustrate this coding scheme using Example 17.
BCD Advantages and Disadvantages:
Advantages of BCD code
• Any large decimal number can be easily converted into corresponding binary number.
• We need remember only the binary equivalents of decimal numbers from 0 to 9.
• Conversion from BCD back to decimal is also very easy.
Disadvantages of BCD code
• The code is least efficient; it requires several symbols to represent even small numbers.
• Binary addition and subtraction can lead to wrong answers.
• Special codes are required for arithmetic operations.
• This is not a selfcomplementing code.
• Conversion to other coding schemes requires special methods.
Example 17: Convert the decimal number 234 into its BCD equivalent.
Solution: This coding scheme is illustrated in Table 1.22. The coding is done using a 4bit binary scheme. For example, decimal 2 is 0010 in BCD, decimal 3 is 0011, … , and decimal 9 is 1001. Decimal 10, however, must be written as 0001 0000 in BCD and not as 1010. For the desired conversion, we first draw Table 1.22 as shown. Then in the top row, we enter digits 3, 4, and 5. After this, below each decimal number, in the second row, we write its binaryequivalent numbers as shown. Thus, below decimal 3, we write 0011, below 5, 0100 and below 5, 0101, as shown.
Table 1.22 Decimal to BCD
Decimal number

3

4

5

BCD equivalent

0011

0100

0101

From Table 1.22, we find
(345)_{10} ≡ (0011 0100 0101)_{BCD}
As illustrated in Table 1.23, the decimal to BCD conversion is very simple, easy, and fast. Similarly, we can see that the BCD to decimal conversion is also very simple, easy, and fast. This is illustrated using Example 18.
Example 18: Convert the BCD number 100101110001 into its decimal equivalent.
Solution: We first separate the bits into groups of 4 bits each as shown in Table 1.23. Then write below each group the decimal equivalent of the binary number as shown.\
Table 1.23 BCD to Decimal
BCD number

1001

0111

0001

BCD equivalent

9

7

1

From Table 1.23, we get
(1001 0111 0001)_{BCD} ≡ (971)_{10}
BCD Advantages and Disadvantages:
Advantages of BCD code
• Any large decimal number can be easily converted into corresponding binary number.
• We need remember only the binary equivalents of decimal numbers from 0 to 9.
• Conversion from BCD back to decimal is also very easy.
Disadvantages of BCD code
• The code is least efficient; it requires several symbols to represent even small numbers.
• Binary addition and subtraction can lead to wrong answers.
• Special codes are required for arithmetic operations.
• This is not a selfcomplementing code.
• Conversion to other coding schemes requires special methods.
This post was written by: Sreejith Hrishikeshan
Sreejith Hrishikesan Nair is a MTech graduate in Communication Systems. He completed Btech Degree in Electronics and Communication.He is a person who wants to implement new ideas in the field of Technology.
Subscribe to:
Post Comments (Atom)
0 Responses to “Binary Coded Decimal with Example”
Post a Comment