Binary Coded Decimal

Binary Coded Decimal

Published by: Nuru

Published date: 22 Jun 2021

Binary Coded Decimal Photo

Binary Coded Decimal

The following points describe everything about Binary Coded Decimal.

  •   Binary Coded Decimal is also known as BCD Code.
  •  The binary number system is the most natural system for a computer, but people are accustomed to the decimal system. So, to resolve this difference, the computer uses decimals in a coded form that the hardware understands.
  •  Binary Coded Decimal (BCD) represents each decimal digit with four bits.
  •  It is a 4-bit code used to represent numeric data only.
  •  A BCD number is a four-bit binary group that represents one of the ten decimal digits 0 through 9.
  •  It is also called natural binary codes because of the 8,4,2 and 1 weights attached to it.
  •  It is a weighted code.
  •  The main advantage of this code is its ease of conversion to and from decimal.
  • It is mostly used in simple electronic devices like calculators and microwaves because it is easier to process and display individual numbers on their Liquid Crystal Display(LCD) screens.
  •  It is less efficient than pure binary in the sense that it requires more bits.
  •  Another disadvantage of BCD code is that arithmetic operations are more complex than they are in pure binary.
  •  The BCD code 1010,1011,1100,1101,1110, and 1111 are not used.
  •  It represents each decimal digit with four bits
    – Ex. 0011 0010 1001 = 32910
  •  This is NOT the same as 0011001010012.

Example:

Decimal Number 4926.

4------> 0100

9------> 1001

2------> 0010

6------>  0110

But, according to Binary Coded Decimal, 0100 represents 8, 1001 represents 4, 0010 represents 2, and 0110 represents 1. Which means 8421 as binary decimal code. Therefore, binary decimal code and decimal code are not the same.

Binary Coded Decimal

Binary Addition

The addition of Binary Coded Decimal can be done by following steps;

Step1: Add the two BCD numbers, using the rules of binary addition.

Step2: If a 4-bit sum is equal to or less than 9, it is a valid BCD number.

Step3: If a 4-bit sum is greater than 9, or if a carry out of the 4-bit group Is generated, it is an invalid result, add 6(0110) to the 4-bit sum in order to skip the six invalid states and return the code to 8421. If a carry results when 6 is added, simply add the carry to the next 4-bit group.

Example: Add 00100011 + 00010101.

0010 0011 + 0001 0101= 0011 100000

i.e. 23+15=38