>> I've heard about interesting trick shifting bits individually >> into different positions by multiplying on constant on micros >> with hardware multiplication unit. > > Pretty simple, actually. A left shift (towards the MSB) is the > same as a multiply by 2. Each subsequent by 2 is a shift. This is obvious, but I think Dmitriy had something else in mind: "shifting bits individually into different positions." The keyword is "individually", I don't see a reason to use hardware multiply if you can use shift left/shift right. Best regards, Vitaliy -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist