0,1,2,3,4,5,6,7,8,9,A,B,C,D,E
and F.
and F.
So to again proceed to 0 after 9 we have to go ahead by SIX places for (A,B,C,D,E,F = 6) which are not VALID in BCD
Binary Coded Decimal is simply decimal numbers coded in binary. So the number 5 is represented as (0101), the number 14 is (0001 0100). As you see, each decimal number is coded to 4 bits binary. To add two numbers in BCD, if the result is > 9 (0110) must be added because anything above (1001) is not a valid "decimal" number.
Example:
Take the numbers I used above, 5 (0101) + 9 (1001) = 14. If you don’t add (0110) to the result you would end up with 1110 which is an invalid BCD number. If you add (0110) to the result (1110) you get (0001 0100) which is a valid BCD number.
Note: Valid BCD numbers are
BCD Decimal
0001 1
0010 2
0011 3
0100 4
0101 5
0110 6
0111 7
1000 8
1001 9
BCD Decimal
0001 1
0010 2
0011 3
0100 4
0101 5
0110 6
0111 7
1000 8
1001 9
No comments :
Post a Comment