On Mon, 15 Feb 2010, Christopher Cole wrote: > Josh Koffman wrote: > > Hi all. I'm thinking of a project where I'll have a 9 bit > > binary number, and I'll want to display it on a 3 digit > > 7 segment display. To do this I'll need to extract the > > hundreds, tens, and ones digits from the number... > > For this, I would use the "Shift and Add-3 Algorithm" to do the conversion you need: > > http://www.engr.udayton.edu/faculty/jloomis/ece314/notes/devices/binary_to_BCD/bin_to_BCD.html > Seriously?! I'm curious, how would you efficiently compare each BCD digit (of a 3 digit packed BCD number) to 5 after each shift on a PIC? Regards Sergio Masci -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist