piclist 1999\06\05\012853a >
Thread: 24-bit binary to BCD?
face BY : Lynx {Glenn Jones} email (remove spam text)

The way i convert to BCD is as follows. Note: this may not be most
efficient but it works. Also, this is to convert an 8bit into three BCD
digits, but its easily expandable
Start by subtracting 100 from your value. If result is negative, stop,
else increment 100's counter and loop
Next subtract 10. If result is negative stop. else increment 10's counter
and loop
Whats left is the units digit.

A member of the PI-100 Club:

On Fri, 4 Jun 1999, Gabriel Gonzalez wrote:

{Quote hidden}


In reply to: <000501beaf02$0182d760$3c2ee994@chih1.chih1.telmex.net.mx>
See also: www.piclist.com/techref/index.htm?key=bit+binary+bcd
Reply You must be a member of the piclist mailing list (not only a www.piclist.com member) to post to the piclist. This form requires JavaScript and a browser/email client that can handle form mailto: posts.
Subject (change) 24-bit binary to BCD?

month overview.

new search...