On Tue, 9 Feb 2010, 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. The PICList.org website has an 8 bit version to do this > (http://www.piclist.org/techref/microchip/math/radix/b2oth-8b3d-jsv.htm). > Has anyone seen a 9 bit version (or a higher bit version that's easily > foolable, I guess up to 16 bit would be easy)? > > Binary maths and translations aren't my strong point so I'd love to > see an example rather than trying to write one myself. Multiprecision arithmetic is a pretty fundamental aspect of 8 bit processors. I would strongly recommend that you learn to be comfortable with it. Having a good reason to learn something helps. You've got one now so take advantage of the situation and learn to do 16 bit addition and subtraction. Friendly 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