Custom Search


BINARYCODED DECIMAL In today's technology, you hear a great deal about microprocessors. A microprocessor is an integrated circuit designed for two purposes: data processing and control. Computers and microprocessors both operate on a series of electrical pulses called words. A word can be represented by a binary number such as 10110011_{2}. The word length is described by the number of digits or BITS in the series. A series of four digits would be called a 4bit word and so forth. The most common are 4, 8, and 16bit words. Quite often, these words must use binarycoded decimal inputs. Binarycoded decimal, or BCD, is a method of using binary digits to represent the decimal digits 0 through 9. A decimal digit is represented by four binary digits, as shown below:
You should note in the table above that the BCD coding is the binary equivalent of the decimal digit. Since many devices use BCD, knowing how to handle this system is important. You must realize that BCD and binary are not the same. For example, 49_{10} in binary is 110001_{2}, but 49_{10} in BCD is 01001001_{BCD}. Each decimal digit is converted to its binary equivalent. BCD Conversion You can see by the above table, conversion of decimal to BCD or BCD to decimal is similar to the conversion of hexadecimal to binary and vice versa. For example, let's go through the conversion of 264_{10 }to BCD. We'll use the block format that you used in earlier conversions. First, write out the decimal number to be converted; then, below each digit write the BCD equivalent of that digit:
The BCD equivalent of 264_{10} is 001001100100_{BCD}. To convert from BCD to decimal, simply reverse the process as shown: _{}
BCD Addition The procedures followed in adding BCD are the same as those used in binary. There is, however, the possibility that addition of BCD values will result in invalid totals. The following example shows this: Add 9 and 6 in BCD:
The sum 1111_{2} is the binary equivalent of 15_{10}; however, 1111 is not a valid BCD number. You cannot exceed 1001 in BCD, so a correction factor must be made. To do this, you add 6_{10} (0110_{BCD}) to the sum of the two numbers. The "add 6" correction factor is added to any BCD group larger than 1001_{2}. Remember, there is no 1010_{2}, 1011_{2}, 1100_{2}, 1101_{2}, 1110_{2}, or 1111_{2} in BCD:
The sum plus the add 6 correction factor can then be converted back to decimal to check the answer. Put any carries that were developed in the add 6 process into a new 4bit word:
Now observe the addition of 60_{10} and 55_{10} in BCD: _{}
In this case, the higher order group is invalid, but the lower order group is valid. Therefore, the correction factor is added only to the higher order group as shown:
Convert this total to decimal to check your answer:
Remember that the correction factor is added only to groups that exceed 9_{10} (1001_{BCD}). Convert the following numbers to BCD and add: Q107. Q108. Q109. Q110. 