electrical4u.com logo Home MCQ Engineering Calculators Videos Basic Electrical Circuit Theories Electrical Laws Materials Batteries Illumination Generation Transmission Distribution Switchgear Protection Measurement Control System Utilities Safety Transformer Motor Generator Electrical Drives Electronics Devices Power Electronics Digital Electronics Biomedical Instrumentation

BCD or Binary Coded Decimal | BCD Conversion Addition Subtraction

Published on 24/2/2012 & updated on 5/9/2018
BCD or Binary Coded Decimal is that number system or code which has the binary numbers or digits to represent a decimal number.A decimal number contains 10 digits (0-9). Now the equivalent binary numbers can be found out of these 10 decimal numbers. In case of BCD the binary number formed by four binary digits, will be the equivalent code for the given decimal digits. In BCD we can use the binary number from 0000-1001 only, which are the decimal equivalent from 0-9 respectively. Suppose if a number have single decimal digit then it’s equivalent Binary Coded Decimal will be the respective four binary digits of that decimal number and if the number contains two decimal digits then it’s equivalent BCD will be the respective eight binary of the given decimal number. Four for the first decimal digit and next four for the second decimal digit. It may be cleared from an example.

Let, (12)10 be the decimal number whose equivalent Binary coded decimal will be 00010010. Four bits from L.S.B is binary equivalent of 2 and next four is the binary equivalent of 1. Table given below shows the binary and BCD codes for the decimal numbers 0 to 15. From the table below, we can conclude that after 9 the decimal equivalent binary number is of four bit but in case of BCD it is an eight bit number. This is the main difference between Binary number and binary coded decimal. For 0 to 9 decimal numbers both binary and BCD is equal but when decimal number is more than one bit BCD differs from binary.

Related pages
BCD or Binary Coded Decimal | BCD Conversion Addition Subtraction

Decimal numberBinary numberBinary Coded Decimal(BCD)
1010100001 0000
1110110001 0001
1211000001 0010
1311010001 0011
1411100001 0100
1511110001 0101

BCD Addition

Like other number system in BCD arithmetical operation may be required. BCD is a numerical code which has several rules for addition. The rules are given below in three steps with an example to make the idea of BCD Addition clear.
  1. At first the given number are to be added using the rule of binary. For example,
  2. In second step we have to judge the result of addition. Here two cases are shown to describe the rules of BCD Addition. In case 1 the result of addition of two binary number is greater than 9, which is not valid for BCD number. But the result of addition in case 2 is less than 9, which is valid for BCD numbers.
  3. If the four bit result of addition is greater than 9 and if a carry bit is present in the result then it is invalid and we have to add 6 whose binary equivalent is (0110)2 to the result of addition. Then the resultant that we would get will be a valid binary coded number. In case 1 the result was (1111)2, which is greater than 9 so we have to add 6 or (0110)2 to it.
As you can see the result is valid in BCD. But in case 2 the result was already valid BCD, so there is no need to add 6. This is how BCD Addition could be. Now a question may arrive that why 6 is being added to the addition result in case BCD Addition instead of any other numbers. It is done to skip the six invalid states of binary coded decimal i.e from 10 to 15 and again return to the BCD codes. Now the idea of BCD Addition can be cleared from two more examples. Example:1 Let, 0101 is added with 0110. Check your self. Example:2 Now let 0001 0011 is added to 0010 0110. So no need to add 6 as because both are less than (9)10. This is the process of BCD Addition.

BCD Subtraction

There are several methods of BCD Subtraction. BCD subtraction can be done by 1’s compliment method and 9’s compliment method or 10’s compliment method. Among all these methods 9’s compliment method or 10’s compliment method is the most easiest. We will clear our idea on both the methods of BCD Subtraction.

Method of BCD Subtraction : 1

In 1st method we will do BCD Subtraction by 1’s compliment method. There are several steps for this method shown below. They are:-
  1. At first 1’s compliment of the subtrahend is done.
  2. Then the complimented subtrahend is added to the other number from which the subtraction is to be done. This is called adder 1.
  3. Now in BCD Subtraction there is a term ‘EAC(end-around-carry)’. If there is a carry i.e if EAC = 1 the result of the subtraction is +ve and if EAC = 0 then the result is –ve. A table shown below gives the rules of EAC.
  4. carry of individual groupsEAC = 1EAC = 0
    1Transfer real result of adder 1 and add 0000 in adder 2Transfer 1’s compliment result of adder 1 and add 1010 in adder 2
    0Transfer real result of adder 1 and add 1010 in adder 2Transfer 1’s compliment result of adder 1 and add 0000 to adder 2
  5. In the final result if any carry bit occurs the it will be ignored.
Examples given below would make the idea clear of BCD Subtraction.

Example: - 1 In this example 0010 0001 0110 is subtracted from 0101 0100 0001.

Therefore, Now you can check yourself. We know that 541 − 216 = 325, Thus we can say that our result of BCD Subtraction is correct.

Example: - 2 In this example let 0101 0001 be subtracted from 0100 1001.

Method of BCD Subtraction: 2

In 2nd method we will do BCD subtraction in 9’s compliment method. Idea may be cleared from an example given below. Let (0101 0001) − (0010 0001) be the given subtraction. Binary Coded Decimal Subtraction using 10’s compliment is same as in case of 9’s compliment, here the only difference is that instead of 9’s compliment we have to do 10’s compliment of the subtrahend.

BCD Comversion

BCD conversion is very simple. In case of BCD conversion at first the decimal equivalent of the BCD codes are found out and then that decimal number can be changed to any other number system as required. To know the methods of conversion of number system you may read the topic binary number system.

Please Rate this Article
⚑ 8 total

New Articles
More Articles on Digital Electronics
Digital ElectronicsArithmeticLogic GateLogic FamiliesCominational CircuitSquentional CircuitShift RegistersLogical OperationDigital CountersDigital EncodersDigital DecoderMemoryAdderBinary Subtractor
Articles Categories
Write for Us
Basic Electrical
Electric Transformer
Electric Generator
Electric Motor
Electrical MCQ
Engineering Calculators
Video Lectures
Electrical Generation
Electric Transmission
Electric Protection
Electrical Measurement
Electronics Devices
Power Electronics
Digital Electronics