----- Original Message -----=20 From: "Olin Lathrop" To: "Microcontroller discussion list - Public." Sent: Tuesday, May 03, 2011 8:22 AM Subject: Re: [PIC] Biinary to BCD > 'William Chops" Westfield ' > IIRC, COBOL has BCD data types. Or a decimal data type usually >> implemented as BCD. Or something. It allows the language to do >> "exact" operations on quantities of money, where the business types >> apparently don't trust the vague inexactness of floating point. > > That's a argument for integer versus floating point, not for a BCD > representation of that integer in particular. What you really need is=20 > extra > wide integer support. 32 bits is not enough dynamic range when in units= =20 > of > cents. BCD made (makes?) sense when the ratio of (human-readable) input-output to= =20 calculations was (is?) rather high. It takes quite a bit of crunch to convert between BCD and binary. BCD can certainly make sense in a microcontroller environment just to avoid= =20 the conversion overhead. In contrast, if my memory doesn't fail me, the decimal data types in SQL=20 server are actually stored as binary with an implied decimal point. -- Bob Ammerman --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .