Wednesday, March 27, 2013

Binary-coded decimal(BCD)

  • Binary-coded decimal

In computing and electronic systems, binary-coded decimal (BCD) is a class of binary encodings of decimal numbers where each decimal digit is represented by a fixed number of bits, usually four or eight, although other sizes (such as six bits) have been used historically

As an example, encoding the decimal number 91 using uncompressed BCD results in the following binary pattern of two bytes:
Decimal:          9          1
Binary :  0000 1001  0000 0001

In packed BCD, the same number would fit into a single byte:
Decimal:     9    1
Binary :  1001 0001
https://en.wikipedia.org/wiki/Binary-coded_decimal




  • BCD to deciman conversion


Short for Binary Coded Decimal, BCD is also known as packet decimal and is numbers 0 through 9 converted to four-digit binary. Below is a list of the decimal numbers 0 through 9 and the binary conversion.

Using this conversion, the number 25, for example, would have a BCD number of 0010 0101 or 00100101. However, in binary, 25 is represented as 11001.

http://www.computerhope.com/jargon/b/bcd.htm

No comments:

Post a Comment