Codes for Decimal Digits
There are even codes for representing decimal digits. These codes use 4-bits for EACH decimal digits; it is NOT the same as converting from decimal to binary.
BCD Code0 = % 00001 = % 00012 = % 00103 = % 00114 = % 01005 = % 01016 = % 01107 = % 01118 = % 10009 = % 1001
In BCD code, each decimal digit simply represented by its binary equivalent. 96 = % 1001 0110 = $ 96 (BCD code)Advantage: easy to convertDisadvantage: takes more bits to store a number:
255 = % 1111 1111 = $ FF (binary code) 255 = % 0010 0101 0101 = $ 255 (BCD code)takes only 8 bits in binary, takes 12 bits in BCD.