Binary Code & Binary Logic

Binary Code & Binary Logic or Binary Coded is a number scheme or code that has a decimal number or digits.
There is a 10-digit decimal number (0-9). For a single decimal number then it is equal to the four binary numbers of that decimal number, then if that number includes two decimal numbers then the BCD equivalent of a decimal number is the following eight binary digits. For the first, there are four decimal digits, and for the second, there are four decimal numbers.

Decimal number

Let, (12)10 be the decimal number whose binary counterpart is 00010010. The binary equivalent of 4 bits from L.S.B to 2 and the next four to 1.
The following table lists the decimal number binary and BCD codes 0 to 15. We can infer from the table below that, after 9 the binary number is 4-bit, but for BCD, it is 8-bit. This is the key distinction between binary and binary decimal coded. Binary and Binary Code & Binary Logic are identical for 0 to 9 decimal numbers so where the decimal number is more than one bit BCD add-on may be requested, similar to other numbers for arithmetical BCD functioning. BCD is a number code that has a number of add-on rules. In three steps with an example, the rules are given below to explain the concept of BCD addition.

  1. At first, the given number is to be added using the rule of binary. For example,
Binary Code & Binary Logic

We must assess the outcome of the inclusion in the second phase. The laws of BCD Addition have seen in two ways. In case 1, the product of two binary numbers that is not true for the BCD number is greater than 9. In case 1. However, in case 2 the results are less than 9, which are true for BCD numbers.

Where the added four-bit value is greater than nine and if the result contains a carrier bit. It is invalid and 6 have to be added whose binary counterpart is (0110)2. The result is then a true binary number that we can get. In case 1 (1111)2, which is larger than 9, it must be added to 6 or (0110)2.

Binary Code & Binary Logic

Result of Binary Code & Binary Logic

The result is correct in BCD, as you can see.
But in case 2 the results were still BCD accurate, so no 6 must be added. This may be BCD Addition.
Now one might wonder why 6 is allocated to the add-on if BCD is added rather than any other numbers. 6 invalid binary code states (10 to 15) will be ignored, and the BCD codes will be restored.
Two more explanations now allow us to clear up the concept of BCD Addition.

Example:1

Let, 0101 is added with 0110.

Binary Code & Binary Logic

Check your self.

Binary Code & Binary Logic