avr-gcc-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [avr-gcc-list] BCD and packed BCD


From: Randy Ott
Subject: Re: [avr-gcc-list] BCD and packed BCD
Date: Wed, 29 May 2002 16:34:29 -0500

Brandon,

BCD or 'binary coded decimal' is just a representation of decimal digits
from 0 to 9 in binary.  Since it only takes 4 bits to represent 0 to 9, you
can fit two digits in a byte.  This is called packed BCD.

For example, the number 99 can be represented as 10011001, this looks like
0x99 in hex.  Precision decimal math can be done easily with BCD and it
makes conversion to ASCII characters very easy.

Randy Ott

----- Original Message -----
From: "Brandon Tolbert" <address@hidden>
To: "AVR List" <address@hidden>
Sent: Wednesday, May 29, 2002 2:05 PM
Subject: [avr-gcc-list] BCD and packed BCD


Does anyone know the difference between bcd and packed bcd?



avr-gcc-list at http://avr1.org



reply via email to

[Prev in Thread] Current Thread [Next in Thread]