01-01-2013, 03:17 PM
Digital Logic and Software Principles
Digital Logic.ppt (Size: 777.5 KB / Downloads: 19)
Binary Coded Decimal BCD Numbers
Each decimal digit to be represented in BCD is converted into its 4 digit binary equivalent. The final number will consist of four times the number of original decimal digits.
As the decimal digits relating to 1010, 1011, 1100, 1101, 1110, 1111 do not exist these are invalid.
From BCD to Decimal:
Group the bits from the left into fours – if leading zeroes have been removed so that the total number of digits are a multiple of four.
Convert each group into its decimal equivalent.
BCD Subtraction
BCD numbers can be subtracted as long as certain rules are followed – these are.
if the subtraction produces a borrow
or if it creates an invalid BCD number
then correct the digit by subtracting six where the error occurred.